Page 1 of 1

newbie and Rules

Posted: 22 Jun 2017, 19:38
by leafy
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

Re: newbie and Rules

Posted: 22 Jun 2017, 20:03
by grovkillen
When you say "controller" 1 and 2 do you mean ESP Easy units?

Re: newbie and Rules

Posted: 22 Jun 2017, 21:43
by leafy
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