Choose style:

Author Topic: Planned and Unplanned Startup of Almond+  (Read 1299 times)

0 Members and 1 Guest are viewing this topic.

Offline fillibar

  • Backer
  • *
  • Posts: 2048
  • Thanks: 4
  • Registered : 02/08/2013
    YearsYearsYearsYearsYearsYears
Planned and Unplanned Startup of Almond+
« on: July 06, 2015, 11:31:35 pm »
Feature Request:
Almond+ to have an Event available in Rules (and maybe a status somewhere) that tracks whether the Almond+ powered up due to a planned reboot/startup or an unplanned one.

What:
There could be two variables on the Almond+.
One (potentially a boolean) which tracks whether the Almond+ is going to restart (per a user selected/initiated means).
Second (probably an integer) which tracks whether the Almond+ underwent an startup that was planned or not. This is the most important and would need to be exposed.

How it works:
By default the boolean is False and the integer is set to 0.
When the Almond+ powers on it checks the boolean.
If this is true then it sets the integer to a value (let's call it 1), indicating a planned startup happened.
If this is false then it sets the integer to something different, 2 for example, indicating an unplanned startup happened.
The boolean is reset to False.

Why:
This could give users an easy way to identify if they had experienced a power failure (unplanned startup). With an event that they could base a reaction to that power failure on if needed. As a simple example, imagine your Almond+ experiences an unplanned startup during the night. You have a rule created that if there is an unplanned startup it should flash your bedroom lights at 6am to wake you up. You do this because your alarm clock lost the time when it lost power and would not wake you up otherwise. Or you have a rule that changes your house's status LED color to a warning orange (or whatever) to let you know something odd happened during the night.
There is value in a planned startup also. Maybe you want to have the Almond+ perform a "self test" of lights and such when it powers on so you can check for problems.

What else:
Have the integer able to be reset to 0 readily including in the rules. That way the Almond+ can run the unplanned startup rule as you need it then clear the value so it is reset and waiting for the next time.
A possible option (tougher for me to think of useful examples) would be exposing the boolean. By knowing that the Almond+ is going to be shutdown (and likely restarted) by the user MAYBE there could be some useful rule that could be configured to respond to that prior to the Almond+ actually shutting down. Then when it starts up again a "planned startup" based rule could be run.
Almond 3 mesh handling the home.

 

Page created in 0.124 seconds with 21 queries.