I want to set the blinking state of a LED on a dashboard while the garagen door is closing / opening.
I am using Meross nodes to get the state of the door (is closed, is opened, it is opening, it is closing). My issue is following:
At the moment I show the end state of the door (is open/closed) by LED. But, while the door is moving I can't see the state of the door - until the end positions are arived. The idea was to show a blinking LED while the door is moving.
I get the payload from the Meross node: [payload.state: "open"] at the moment the movement starts and the payload from the Meross node: [payload.digest.garageDoor[0].open] at the moment the door is in the open position.
I want the LED to flash during this time. How can I achieve this?
I built a control system for my garage door 4-years ago using a Finite State Machine (FSM).
I installed two microswitches to detect when the door was fully open or fully closed. These signals were detected by a Wemos D1 Mini which sent the "state" to Node-RED using MQTT.
I also re-purposed a broken key-fob and connected it an output pin on the Wemos so I could "simulate" someone pressing the key-fob. My garage door is a bit dumb as once you have told it to "open" it will continue that operation until the door is fully open. If during that time you press the key-fob it will "stop" and if you press the key-fob again it will reverse its direction of travel and start "closing". A similar sequence happens when I tell the door to close. I think this is for safety reasons so if the door encounters an obstacle it will "stop" immediately. I mimicked that behaviour in the FSM mainly so I could also use Alexa to control the door.
Here's a screenshot of the state diagram showing the transitions.
Thanks for your response!
The system is already running and I actually wont install additional hardware. I just looking for a possibility to modify my dashboard with the blinking LED for the working state.
You are right. But, the question was how I get the LED flash for two states and the same LED (at the same position on the dashboard) with two different colors for each "end-position" state.
In the meantime I solved the issue.
I prepared the payload and all other states (colors, blink, text) in advance before I handed over it to the dashboard template.