i'm working o the following rules, but VAR is not being read (i guess)
Code: Select all
On System#Boot do
Monitor GPIO,4 // D2
let,1,0
endon
on MQTT#Connected do
event,publishstatus
endon
// loop
// B58 - gpio 14 - statusoff P3 D5
On B58 do
pulse,14,1,500
pulse,2,0,500
let,1,1
endon
// B24 - gpio 12 status24 P2 D6
On B24 do
pulse,12,1,500
pulse,2,0,500
let,1,1
endon
// BOFF - gpio 13 statusoff P1 D7
On BOFF do
pulse,13,1,500
pulse,2,0,500
endon
on GPIO#4=1 do
if %v1%=1
// Publish,%sysname%/status,Working!!
endif
endon
on GPIO#4=0 do
if %v1%=1
let,1,0
endif
endon
Code: Select all
112032: WD : Uptime 19 ConnectFailures 0 FreeMem 23936 WiFiStatus WL_CONNECTED
1117336: HTTP: event,B58
1117388: EVENT: b58
1117400: ACT : pulse,14,1,500
1117401: Command: pulse
1117903: SW : GPIO 14 Pulsed for 500 mS
1117922: ACT : pulse,2,0,500
1117924: Command: pulse
1118426: SW : GPIO 2 Pulsed for 500 mS
1118428: ACT : let,1,1
1118429: Command: let
1118451: SW : GPIO=4 State=1 Output value=1
1118488: EVENT: VACC#status=1.00
1121477: EVENT: Clock#Time=Thu,16:47
1125876: HTTP: event,Boff
1125949: EVENT: boff
1125968: ACT : pulse,13,1,500
1125969: Command: pulse
1126471: SW : GPIO 13 Pulsed for 500 mS
1126473: ACT : pulse,2,0,500
1126474: Command: pulse
1126976: SW : GPIO 2 Pulsed for 500 mS
1126988: SW : GPIO=4 State=0 Output value=0
1126994: EVENT: VACC#status=0.00
1142032: WD : Uptime 19 ConnectFailures 0 FreeMem 23936 WiFiStatus WL_CONNECTED
Not find out what is wrong...