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.
If you have a question or need help, this is the place to be.
Wilson2517
Posts: 8 Joined: Thu Nov 05, 2009 5:55 pm
Post
by Wilson2517 » Tue Jun 07, 2016 12:30 am
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
kgschlosser
Site Admin
Posts: 5190 Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA
Post
by kgschlosser » Tue Jun 07, 2016 12:46 am
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
Wilson2517
Posts: 8 Joined: Thu Nov 05, 2009 5:55 pm
Post
by Wilson2517 » Tue Jun 07, 2016 1:22 am
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.
kgschlosser
Site Admin
Posts: 5190 Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA
Post
by kgschlosser » Wed Jun 08, 2016 8:05 am
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