Hi,
I'm using a sonoff modified as a dry contact to open a electric door.
I'm using the command ESPIP/control?cmd=Pulse,12,1,1000 to switch the relay on and off after a delay of 1sec.
Is it the best way to do it ?
Second question, i want to have the led switching on when the relay is on.
How can i set that ?
I have another issue, when. set that commande as on and off in domoticz, it look to go in a loop if i enable send to controller in the espeasy.
I want to set the same command in on and off, so i can ask google to open or close ( just click the relay)
otherwise i have to create a rule to switch de relay off after a timer of 1 sec ?
Thx
Switch led on when relay actif
Moderators: grovkillen, Stuntteam, TD-er
Re: Switch led on when relay actif
I think i get it with that rule:
Code: Select all
On TurnOn do
gpio,12,1
gpio,13,0
Publish domoticz/in,{"idx":47,"nvalue":1}
timerSet 1,1
EndOn
on Rules#Timer=1 do
gpio,12,0
gpio,13,1
Publish domoticz/in,{"idx":47,"nvalue":0}
endon
Re: Switch led on when relay actif
That does look OK to me, but there are others here way more experienced with rules
What I like about your solution is that it is not blocking.
The pulse command is blocking all other executions, but this solution isn't.
What I like about your solution is that it is not blocking.
The pulse command is blocking all other executions, but this solution isn't.
Who is online
Users browsing this forum: No registered users and 48 guests