Help needed on automated curtain project
Posted: 12 Dec 2020, 22:45
Hi,
Looking for some help to make my automated curtains dummy proof before installing it all.
Got an Wemos D1 to control an engine to open or close the curtains. Enabled rules and got it working based on the script below.
On curtaindown do
gpio 12,0
gpio 13,1
timerset 1,10 //set timer 1 for 10 seconds
Endon
On curtainstop do
gpio 12,0
gpio 13,0
Endon
On curtainup do
gpio 12,1
gpio 13,0
timerset 1,10 //set timer 1 for 10 seconds
Endon
Also use Domoticz to activate the rules http://192.168.178.123/control?cmd=event,curtainup, http://192.168.178.123/control?cmd=event,curtainstop and
curtainstop http://192.168.178.123/control?cmd=event,curtaindown
When curtains are fully open (0%) and the button curtainsdown is activated it runs 10 seconds based on timerset so it stops when fully closed(100%).
When it needs to be open again curtainsup Is activated an it runs exact the wright time to open again. The big risk is that the curtains are fully open (0%) and "open" button is pussed again it will again run for 10 seconds but can’t because it is already open so something will break for sure.
To prevent this a variable should be set so when status is fully open (0%) and the button "open" is pussed it checks and will not run again again because of the curent value. This should also be the done when fully closed (100%) so it can’t run for a second time.
I think it should be done with the TaskValueSet but I’m just not experienced enough how to get it done or figure it out.
Big wish is to be able to open it for 50% and be sure when half way fully open or closed can’t be used otherwise it would also go to far.
For now one thing at a time.
Would be great is someone could help me.
Looking for some help to make my automated curtains dummy proof before installing it all.
Got an Wemos D1 to control an engine to open or close the curtains. Enabled rules and got it working based on the script below.
On curtaindown do
gpio 12,0
gpio 13,1
timerset 1,10 //set timer 1 for 10 seconds
Endon
On curtainstop do
gpio 12,0
gpio 13,0
Endon
On curtainup do
gpio 12,1
gpio 13,0
timerset 1,10 //set timer 1 for 10 seconds
Endon
Also use Domoticz to activate the rules http://192.168.178.123/control?cmd=event,curtainup, http://192.168.178.123/control?cmd=event,curtainstop and
curtainstop http://192.168.178.123/control?cmd=event,curtaindown
When curtains are fully open (0%) and the button curtainsdown is activated it runs 10 seconds based on timerset so it stops when fully closed(100%).
When it needs to be open again curtainsup Is activated an it runs exact the wright time to open again. The big risk is that the curtains are fully open (0%) and "open" button is pussed again it will again run for 10 seconds but can’t because it is already open so something will break for sure.
To prevent this a variable should be set so when status is fully open (0%) and the button "open" is pussed it checks and will not run again again because of the curent value. This should also be the done when fully closed (100%) so it can’t run for a second time.
I think it should be done with the TaskValueSet but I’m just not experienced enough how to get it done or figure it out.
Big wish is to be able to open it for 50% and be sure when half way fully open or closed can’t be used otherwise it would also go to far.
For now one thing at a time.
Would be great is someone could help me.