In my quest to find a way to know if a door is locked, I stumbled on the very promising Puck.js project.
The Puck.js Lite is small (enough), simple and efficient and would be able to do all I need, except possibly one thing: fire a button release event.
The idea is to mount the Puck inside the door casing, replace the button with an external one and position the button in the strike plate hole in such a way that it is only pressed by the deadbolt when the door is locked.
As far as I can tell, by looking at the examples and Home Assistant integration, there are only pressed events available (single, double, long, etc.). For my concept to work, I'd like the Puck to fire an event when the button is pressed (door being locked), and an event when the button is being released (door being unlocked).
While it might not be the 'normal' purpose of the device, is there already a button release event available, despite it not being included in the documentation?
If not, is it possible to introduce this event?
If yes, will this still be in an energy efficient way? Not that there's some permanent activation taking place due to the way the hardware is currently set up. We are talking about presses that can take minutes/hours/days/weeks in the end.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
In my quest to find a way to know if a door is locked, I stumbled on the very promising Puck.js project.
The Puck.js Lite is small (enough), simple and efficient and would be able to do all I need, except possibly one thing: fire a button release event.
The idea is to mount the Puck inside the door casing, replace the button with an external one and position the button in the strike plate hole in such a way that it is only pressed by the deadbolt when the door is locked.
As far as I can tell, by looking at the examples and Home Assistant integration, there are only pressed events available (single, double, long, etc.). For my concept to work, I'd like the Puck to fire an event when the button is pressed (door being locked), and an event when the button is being released (door being unlocked).
While it might not be the 'normal' purpose of the device, is there already a button release event available, despite it not being included in the documentation?
If not, is it possible to introduce this event?
If yes, will this still be in an energy efficient way? Not that there's some permanent activation taking place due to the way the hardware is currently set up. We are talking about presses that can take minutes/hours/days/weeks in the end.