Closed hilsonp closed 1 year ago
sounds interesting, what should happen when Cover 1 is opened or closed by another mechanism in HA ? The state onscreen would be out of sync & showing wrong info, or the display will be waiting for the timed wakeup and update at that time.
The way I saw it was: If the state is changed by other means (automation, action), chances are low that a user is monitoring the label. I find therefore acceptable to have the label incorrect until the next wake up cycle.
For sure, for this to work, I will need to have an automation triggered by the cover/window state to change the label accordingly.
Staying awake is really costing a lot of battery life. Maybe something like this would be better:
There are 2 options you could use with the current firmware:
@nplan This is a neat way of doing it ! Indeed, for each action, I have a good idea of the maximum time it takes.
Between 2 and 3, will HB change the label on the screen to opening ? If yes, you have to keep HB awoken long enough for HA to complete 2.
Instead of setting a "check_back_in", we could set statically in HB configuration, for each button, a "check_back_after" that would accept a comma separated list of delays. For example, for button1, I know that after a press on the button, it takes about 3s for the cover to start moving and HA to update the label to opening, then it takes another 10s for the cover to fully open and have HA change the label to opened. I would then set on the HB configuration, the button1 check_back_after to "3,10" then goes to sleep with regular wakeup intervals.
It achieves the same goal, is easier to explain and setup (nothing to be done on HA, everything is set on HB config, staticallly). The cost on the battery would be 2 smaller sleep periods after each button press.
The check_back_after is a list and could contain n values only limited by the string length ;-)
Between 2 and 3 it depends on how quickly HA sends the new label. HB waits around 500 ms before going to sleep.
I'm not sure I understand the use case you have in mind. Do you want a confirmation that the action was triggered? For example if the cover in your example is in another room?
I love this proposal, I face the same issue. I need to wait to see the actual status.
For me I immediately send back a new text to a button after it has been pressed, but can image there is fixed delay time.
@nplan The use case is the following:
Let's imagine that cover1 is managed by HB button 1.
If a cover1 is closed and someone presses HB button 1, and if I could setup HB button 1 wake-up times after being pressed to [1000, 30000] then:
The cost is 2 extra wake-up for HB. The benefit is a sense of almost real-time feedback for the user.
I also like this proposal. I have automations that update the icon after a button is pushed, and like others here I need to wait before the new icon appears. I think the process that @hilsonp describes would work very well indeed.
Added this functionality in v2.3.0. @hilsonp Please test.
There was also a bug that prevented a label change, if triggered within the same wake-up period, after a button press. Should work now.
I have a similar need - I change the display after the button is pressed, but some actions are taking a fraction longer than the device does so it goes to sleep before the new label is published - I'd love it if I could add a delay or sleep after the publish to give the processing more time to complete. Could this be a configurable delay?
@antonpiatek see here: https://docs.home-buttons.com/original/user_guide/#schedule-wakeup
I think it's what you're looking for.
@antonpiatek see here: https://docs.home-buttons.com/original/user_guide/#schedule-wakeup
I think it's what you're looking for.
Wonderful, thanks!
I fully understand why the device needs to stay asleep as much as possible to reach this awesome 18 months battery life.
Nevertheless, I would like to benefit from the screen and not have it just like a nice clean label.
Most of the interaction happen just after the user presses a button. I would therefore suggest to have the device stay awoken for a configurable account on seconds after a button press.
Here is my usecase:
I use the Home Buttons to control 3 windows and 3 covers.
This way, we get the best of both worlds. Long battery life and updates following user interactions (when they are obviously in front of the screen).
I would be ok if that decreases battery life by 3. This behaviour would be optional.
As of now, I have buttons with a screen but need to wait 10" to see the cover state which is useless. A simple zigbee button would allow the same kind of control.
What do you think about it?