Home Assistant and smartSleep
-
Hi,
I am creating a battery driven alarm siren with led light flash. The thought specs for it is that it will listen for incoming messages from Home Assistant through the MySensors GW, when a message to drive the siren/alarm is received it will stay awake for a couple of minutes to wait further instructions. In order to achieve that I thought of using the smartSleep functionality, wake up every minute to look for messages from Home Assistant. If there is a message the device will instead of sleeping be awake powering the siren and led through a transistor plus waiting for new instructions.
According to my understanding and tests HA should be able to buffer messages to be sent once the device is awake. Functionality according to I_PRE_SLEEP_NOTIFICATION and I_POST_SLEEP_NOTIFICATION in docs.
The problem I face is that the first message is delivered, once the siren or led is switched ON. Then when the device is awake, no more I_PRE_SLEEP_NOTIFICATION and I_POST_SLEEP_NOTIFICATION will be sent from the device. After that it seems like HA is not sending messages at trigger, I guess just buffering and waiting for pre and post sleep commands.
Is this expected behavior?, am I wrong?, is there a way to reset what I guess is a smartSleep flag on the device in HA? Is there any other workarounds that is feasible?
Basically what I want to do, smartSleep and wake up every minute, if a message is received the device will be awake for a minute, when certain conditions are fulfilled the device will smartSleep again and the cycle is restarted.
Suggested Topics
-
Hass.io and Ethernet Gateway on PI
Home Assistant • 16 Aug 2017, 00:22 • pgv 28 Dec 2017, 08:43 -
Home Assistant v 0.12
Home Assistant • 30 Jan 2016, 13:57 • martinhjelmare 30 Jan 2016, 15:05 -
Removing pro mini led bricked the board
Hardware • 29 Feb 2016, 20:40 • tripy 29 Oct 2017, 20:45 -
Disable external module to preserve battery life
Hardware • 3 Dec 2014, 23:52 • jonnyfishman 3 Dec 2014, 23:52 -
Problem with light control between mysensors and HA
Troubleshooting • 7 Jan 2019, 08:55 • Misna 9 Jan 2019, 07:17 -
Power sensor? Battery?
Development • 18 Jun 2016, 00:26 • CrankyCoder 18 Jun 2016, 19:47 -
send() after receive()
Development • 13 Jan 2020, 21:08 • Honza Liška 16 Jan 2020, 22:52