@PaulAntonDeen wrote:
I have a relay that needs to close and open again to move the garage door. When the door is closed it starts moving open, when the relay is activated while moving it stops. When it then activates again it starts moving in the closed direction etc. In short all movement commands are just shortly closing and opening the relay. To make matters worse it does not always open when I give it a command: starts to move, decides that the power is to high and gives up. It might take a couple of retries to actually get it open. So I want to make a script that closes and opens the relay and then monitors a magnetic contact sensor to see if the door is open. If not, retry until it actually opens. On top of that I would like to use the same magnetic contact to report open or close for the door. Here is what I have so far (in scripts.yaml):
garage_deur_open_dicht: sequence: - alias: Garage deur pulse aan service: light.turn_on data: entity_id: light.garage_deur_opener - alias: Garage deur pulse uit service: light.turn_off data: entity_id: light.garage_deur_opener
My relay gets reported by deconz as a light but it is actual just a relay.
The contact sensor is: binary_sensor.openclose_21 which reports ‘on’ when the door is not closed and ‘off’ when it is closed.
I currently call the script to pulse the relay to move the garage door but will not know if it worked until I get eyes on the door or look at the binary_sensor.
Posts: 3
Participants: 2