need help in rules
Moderators: grovkillen, Stuntteam, TD-er
need help in rules
I am trying this in Rules
on GPIO13#value do
if [GPIO13#value] = 0
NeoPixelAll,0,0,255
timerSet 1,30 // 30 sec timer
endon
on Rules#Timer=1 do
NeoPixelAll,0,0,0
endif
endon
but it does not trigger and nothing happens.
Thanks in advance
on GPIO13#value do
if [GPIO13#value] = 0
NeoPixelAll,0,0,255
timerSet 1,30 // 30 sec timer
endon
on Rules#Timer=1 do
NeoPixelAll,0,0,0
endif
endon
but it does not trigger and nothing happens.
Thanks in advance
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: need help in rules
Is your device named "GPIO13" and it's value named "value"?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: need help in rules
I have tried this but does not work
on lock#Switch do
if [lock#Switch]=0
NeoPixelAll,0,0,255
timerSet 1,30 // 30 sec timer
endon
on Rules#Timer=1 do
NeoPixelAll,0,0,0
endif
endon
on lock#Switch do
if [lock#Switch]=0
NeoPixelAll,0,0,255
timerSet 1,30 // 30 sec timer
endon
on Rules#Timer=1 do
NeoPixelAll,0,0,0
endif
endon
Re: need help in rules
lock is a pushbutton in domoticz which I use to activate gpio13 to 1 and 0
this is the log
this is the log
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: need help in rules
Almost nailed it:
Code: Select all
on lock#Switch do
if [lock#Switch]=0
NeoPixelAll,0,0,255
timerSet 1,30 // 30 sec timer
endif
endon
on Rules#Timer=1 do
NeoPixelAll,0,0,0
endon
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: need help in rules
will try
Thanks
Thanks
Re: need help in rules
Should also work like this
No if statement required, and find it good practice as additional nested if statement is possible
Code: Select all
on lock#Switch=0 do
NeoPixelAll,0,0,255
timerSet 1,30 // 30 sec timer
endon
on Rules#Timer=1 do
NeoPixelAll,0,0,0
endo
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8
Who is online
Users browsing this forum: No registered users and 0 guests