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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login