I am writing a python program to work with my Minimote to control a few lights. I wrote a simple python program to detect when a button is pressed and it was working until I changed the conditional for the parameter value from != to >. I am seeing the button presses in the log file as well as in the popup box on the screen. Here is the code snipit:
while (hg.Program.IsEnabled):
genVal = hg.Modules.WithName('MiniMote').Get().Parameter('Sensor.Generic').Value;
print "genVal ="+genVal;
if genVal > '0':
print "genVal > 0"
time.sleep(1)
When I changed "if genVal != '0' " to "if genVal > '0' " the program stopped detecting the change in the Sensor.Generic value. Here is a snipit from my log file:
2016-11-08 23:15:39.9526 Debug 01-0A-00-04-00-09-04-2B-01-01-00-D7
2016-11-08 23:15:39.9526 Debug ZWaveMessage (RawData=01-0A-00-04-00-09-04-2B-01-01-00-D7)
2016-11-08 23:15:39.9526 Debug ZWaveMessage (Direction=Inbound, Header=SOF, NodeId=9, Type=Request, Function=ApplicationCommandHandler, CommandClass=SceneActivation)
2016-11-08 23:15:39.9537 Debug 06
2016-11-08 23:15:39.9537 Debug NodeUpdated (NodeId=9, Parameter=SensorGeneric, Value=1)
2016-11-08 23:15:39.9551 Info HomeAutomation.ZWave 9 ZWave Node Sensor.Generic 1
genVal =0genVal =0
genVal =0genVal =0
genVal =0genVal =0
genVal =0genVal =0
I have tried to delete and recreate the program but no luck. Yes I did try putting back the != but that does't work either. I also restarted homegenie on my raspberry pi which did not work and then tried rebooting the raspberry pi but still no luck. By the way I am running HomeGenie Version 1.1 beta r525
Any ideas are welcome.