(Resolved) Rule not triggering - "on GPIO#04 do"
Posted: 14 Aug 2022, 14:15
Hi All
Have a strange one and i presume i am doing something wrong here.
Rule 1 - This is working as i can see the event in the log file - EVENT: GPIO#4=0, EVENT: GPIO#4=1
on System#Boot do
Monitor GPIO,04
endon
Rule 2 - This rule is not triggering even though i see the GPIO=0 event in the logs
on GPIO#04=0 do
Let,2,0 // Set Var 2 to zero
Let,2,([var#2]+1) // add 1 pulse to Var 2
Let,2,([Var#2]/1000) // Divide by 1000 - 1000 pulses per kWh
Let,1,([var#1]-[var#2]) // Subtract Var 2 from Var 1 - Var 1 is kWh from WEB interface
endon
Any idea what i am doing wrong?
Have a strange one and i presume i am doing something wrong here.
Rule 1 - This is working as i can see the event in the log file - EVENT: GPIO#4=0, EVENT: GPIO#4=1
on System#Boot do
Monitor GPIO,04
endon
Rule 2 - This rule is not triggering even though i see the GPIO=0 event in the logs
on GPIO#04=0 do
Let,2,0 // Set Var 2 to zero
Let,2,([var#2]+1) // add 1 pulse to Var 2
Let,2,([Var#2]/1000) // Divide by 1000 - 1000 pulses per kWh
Let,1,([var#1]-[var#2]) // Subtract Var 2 from Var 1 - Var 1 is kWh from WEB interface
endon
Any idea what i am doing wrong?