Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Read string for change and re-send string from Serial Port

If you have a question or need help, this is the place to be.
Post Reply
Wilson2517
Posts: 8
Joined: Thu Nov 05, 2009 5:55 pm

Read string for change and re-send string from Serial Port

Post by Wilson2517 »

Hi,

I have a serial port read any string.
I want use phyton for capture regex and active a Variable, but I dont now to do make the code.

for example this is the string

Serial.iPhoneFer_Online

Ineed only capture Fer and active variable to true, but I need condition for this, IF Online fire command and IF Offline fire other command.

Best Regards :D
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Read string for change and re-send string from Serial Po

Post by kgschlosser »

ok so you just want to set a variable to true or false depending on the event???


what i need. i need the events and payloads that you are wanting to make into a bool variable

and i am not sure what you want to do with regex and the serial port.

you have to be very detailed and specific that way i can get the right thing going for you
If you like the work I have been doing then feel free to Image
Wilson2517
Posts: 8
Joined: Thu Nov 05, 2009 5:55 pm

Re: Read string for change and re-send string from Serial Po

Post by Wilson2517 »

Yes, I want this.

The string is iPhoneFerOnline, on the log could be Serial.iPhoneFerOnline.

So could be

var StatusUpdate = false

IF (var StatusUpdate == true){

Serial.Write("Update_Ready")

}else {

Serial.Write(No_Update)

}

for example I know the code is diferent.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Read string for change and re-send string from Serial Po

Post by kgschlosser »

what is setting the StatusUpdate variable?

the event you are saying is something that is posting already into eventghost???


i can do the code easily but i need to know what event will set the variable True, and what event will set it False

and you also have to have the serial plugin installed for this to work
If you like the work I have been doing then feel free to Image
Post Reply