Hi,I am trying to switch a relay on controller 1( gpio 12) by using a rule on controller 2.
Need assistance to troubleshoot were i am going wrong.
the rule on controller 1 is :-
On PIR#Switch=1 do
if [LDR#Light]<300
sendTo 2,event,lighton
endon
the Html command
http://192.168.1.11/control?cmd=event,lighton
works..
rule for lighton is :-
On lighton do
gpio ,12,1
endon
Cheers
newbie and Rules
Moderators: grovkillen, Stuntteam, TD-er
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: newbie and Rules
When you say "controller" 1 and 2 do you mean ESP Easy units?
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: newbie and Rules
yeah .. I have sorted it thanks to this post https://www.letscontrolit.com/forum/vie ... f=6&t=2992
I did not realize that PIR was the name parameter ....
As i was using mqtt i thought it would be easier to have all my names set to the room location (livingroom).
Have amended setup now and it is working .
my new rule is :-
On PIR#Switch=1 do
if [LDR#Light]<150
sendTo 2,event,lighton
timerSet,1,10
endon
On Rules#Timer=1 do
sendTo 2,event,lightoff
endon
thank you for reply
I did not realize that PIR was the name parameter ....
As i was using mqtt i thought it would be easier to have all my names set to the room location (livingroom).
Have amended setup now and it is working .
my new rule is :-
On PIR#Switch=1 do
if [LDR#Light]<150
sendTo 2,event,lighton
timerSet,1,10
endon
On Rules#Timer=1 do
sendTo 2,event,lightoff
endon
thank you for reply
Who is online
Users browsing this forum: Ahrefs [Bot] and 23 guests