#7
Post
by gerardovf » 22 Nov 2016, 15:22
Yes, please! I need a plugin to control my blinds. I read two buttons (to rise/lower the blind locally). I then operate one of two relays to move the blind motor accordingly. I have created rules so that only one relay is activated at a time (I can send commands either locally or using MQTT).
I then use a HC-SR04 ultrasonic sensor to get feedback with the current blind position.
I have found that the HC-SR04 is missing many measurements when using rules, so right now I am forced to use two ElectroDragons to test the concept properly until I get a dedicated blind plugin.
Here are the rules:
On BTN_UP#SWITCH=1 do
if [BTN_DWN#SWITCH]=1
GPIO,13,0
else
if [RLY_DWN#SWITCH]=1
GPIO,13,0
else
GPIO,12,1
timerSet,1,20 //Set Timer 1 for the next event in 20 seconds
endif
endif
endon
On BTN_UP#SWITCH=0 do
GPIO,13,0
GPIO,12,0
endon
On BTN_DWN#SWITCH=1 do
if [BTN_UP#SWITCH]=1
GPIO,12,0
else
if [RLY_UP#SWITCH]=1
GPIO,12,0
else
GPIO,13,1
timerSet,1,20 //Set Timer 1 for the next event in 20 seconds
endif
endif
endon
On BTN_DWN#SWITCH=0 do
GPIO,13,0
GPIO,12,0
endon
On Rules#Timer=1 do //When Timer1 expires, do
GPIO,13,0
GPIO,12,0
endon
On STOP#SWITCH=1 do
GPIO,13,0
GPIO,12,0
endon
-
Attachments
-

- IMG_20161118_102838.jpg (165.01 KiB) Viewed 9541 times
-

- IMG_20161119_104654.jpg (215.39 KiB) Viewed 9541 times