Page 1 of 1
Problem with rule for Axa Remote [SOLVED]
Posted: 29 Aug 2021, 11:28
by ManS-H
I'm using the Wemos D1 mini to control my Axa Remote by relays.
I use the following rules for opening and closing the window.
on wcraam-open do
gpio,0,0 // relay on
timerSet 1,2 // 2 seconds timer
endon
on Rules#Timer=1 do
gpio,0,1 // relay off
endon
on wcraam-dicht do
gpio,5,0 // relay on
timerSet 2,2 // 2 seconds timer
endon
on Rules#Timer=2 do
gpio,5,1 // relay off
endon
Now I want to activate the "Stop function" and my question is how can I combine both rules to one new rule with the name wcraam-stop and a pause of 20 seconds between both rules.
I have tried several possibilities but my knowledge is too limited to get this done.
Who can help me to make this possible.
Re: Problem with rule for Axa Remote
Posted: 29 Aug 2021, 11:38
by TD-er
Hmm this might get a bit complicated very easily when adding new combinations, but I guess just a stop may be managable.
I do see that we might benefit from a new feature to schedule events at a specific time.
Code: Select all
on wcraam-open do
gpio,0,0 // relay on
timerSet 1,2 // 2 seconds timer
endon
on Rules#Timer=1 do
gpio,0,1 // relay off
endon
on wcraam-dicht do
gpio,5,0 // relay on
timerSet 2,2 // 2 seconds timer
endon
on Rules#Timer=2 do
gpio,5,1 // relay off
endon
on wcraam-stop do
asyncevent,wcraam-open
timerSet 3,20 // 20 seconds timer
endon
on Rules#Timer=3 do
asyncevent,wcraam-dicht
endon
Re: Problem with rule for Axa Remote
Posted: 29 Aug 2021, 13:07
by ManS-H
Thanks TD-er,
That was the solution, asyncevent.
I control AXA with three relays for each command one relay, so i changed the code a bit. And this works as a charm.
Code: Select all
on wcraam-open do
gpio,0,0 // relay on
timerSet 1,2 // 2 seconds timer
endon
on Rules#Timer=1 do
gpio,0,1 // relay off
endon
on wcraam-dicht do
gpio,4,0 // relay on
timerSet 2,2 // 2 seconds timer
endon
on Rules#Timer=2 do
gpio,4,1 // relay off
endon
on wcraam-open/stop do
gpio,5,0 // relay on
timerSet 3,2 // 2 seconds timer
endon
on Rules#Timer=3 do
gpio,5,1 // relay off
endon
on wcraam-stop do
asyncevent,wcraam-open
timerSet 4,20 // 20 seconds timer
endon
on Rules#Timer=4 do
asyncevent,wcraam-open/stop
endon
Re: Problem with rule for Axa Remote [SOLVED]
Posted: 29 Aug 2021, 15:29
by TD-er
Great
I wonder if using a slash will ever lead to issues in an event 'name', but I guess it will not really be a problem.
Re: Problem with rule for Axa Remote [SOLVED]
Posted: 29 Aug 2021, 18:47
by ManS-H
TD-er wrote: ↑29 Aug 2021, 15:29
Great
I wonder if using a slash will ever lead to issues in an event 'name', but I guess it will not really be a problem.
No problem at all
- ESPEasy-1.jpg (64.82 KiB) Viewed 6558 times
Re: Problem with rule for Axa Remote [SOLVED]
Posted: 29 Aug 2021, 19:02
by TD-er
Well you can send events via more ways than just the rules.
For example via HTTP.
Not sure what will happen if you try to send an event command via HTTP, since a slash can be part of an URL.
But I am not sure it can also be used as a GET parameter.