hi friends.
please help me.
i want use a toggle switch (up-down) with relay. i use usual rules or usual setting but there is some problem.
i need 2 feature for relay control with espeasy. but i can not do it with rule , please help.
first , i want key work with relay locally , until when wifi is disconnect(for each reason) so we can on/off light handy.
second , i dont want relay on / off just with "key = 0" or "key = 1" . i want relay work with change state of toggle key.for example when light on with key (key up) then light off with domoticz app, so i want i can light on again with key but just one change state of toggle key (key down) .now if we light on/off with key and light off/on with app, so if we want again turn on with key , we must change 2 state (one up and one down) and this is bad. so i need help for a rule that we run this 2 feature in one rule .
thank you
help to create a rule for a toggle switch with espeasy
Moderator: leecollings
-
- Posts: 139
- Joined: Tuesday 06 September 2016 20:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version: L stab
- Location: Belgium
- Contact:
Re: help to create a rule for a toggle switch with espeasy
You have to enable "rules" on your ESP and create a rule
maybe you can check also
https://www.letscontrolit.com/forum/vie ... php?t=1655
I don't have any experience with this
maybe you can check also
https://www.letscontrolit.com/forum/vie ... php?t=1655
I don't have any experience with this
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
Re: help to create a rule for a toggle switch with espeasy
In Domoticz:
http://192.168.0.120/control?cmd=event,toggle
In EspEasy:
On toggle do
if [Schemerlamp-1#Switch]=0
gpio,0,1 // Lamp on
else
gpio,0,0 // Lamp off
endif
EndOn
See this as an example, see of this works for your situation.
http://192.168.0.120/control?cmd=event,toggle
In EspEasy:
On toggle do
if [Schemerlamp-1#Switch]=0
gpio,0,1 // Lamp on
else
gpio,0,0 // Lamp off
endif
EndOn
See this as an example, see of this works for your situation.
-
- Posts: 112
- Joined: Tuesday 13 September 2016 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Contact:
Re: help to create a rule for a toggle switch with espeasy
hi thank you for answer. i enable rules but i can not create this tule that i need. there is a problem in all of code in rules for toggling.Lebo2d9 wrote:You have to enable "rules" on your ESP and create a rule
maybe you can check also
https://www.letscontrolit.com/forum/vie ... php?t=1655
I don't have any experience with this
Code: Select all
if [key_1#Switch]=0
i want use a STATE and OLDSTATE for if . for example :
Code: Select all
if [key_1#Switch]=oldstate
-
- Posts: 112
- Joined: Tuesday 13 September 2016 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Contact:
Re: help to create a rule for a toggle switch with espeasy
hi thank you for answer. i enable rules but i can not create this tule that i need. there is a problem in all of code in rules for toggling.Lebo2d9 wrote:You have to enable "rules" on your ESP and create a rule
maybe you can check also
https://www.letscontrolit.com/forum/vie ... php?t=1655
I don't have any experience with this
Code: Select all
if [key_1#Switch]=0
i want use a STATE and OLDSTATE for if . for example :
Code: Select all
if [key_1#Switch]=oldstate
-
- Posts: 112
- Joined: Tuesday 13 September 2016 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Contact:
Re: help to create a rule for a toggle switch with espeasy
i think this is not work for once push key (up or down) but i will test, just one question , in domoticz use this command for both on/off action?Herman-H wrote:In Domoticz:
http://192.168.0.120/control?cmd=event,toggle
In EspEasy:
On toggle do
if [Schemerlamp-1#Switch]=0
gpio,0,1 // Lamp on
else
gpio,0,0 // Lamp off
endif
EndOn
See this as an example, see of this works for your situation.
Who is online
Users browsing this forum: No registered users and 1 guest