New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android next alarm sensor not triggering automations or Node Red time nodes at alarm time #2616
Comments
Skip node red and try a basic automation, if it still fails share the yaml and any error in the logs please. |
Here's the YAML for my test automation:
homeassistant_companion_log_5-16-2022_10-14-8.txt |
Do you see the state updating as expected in HA for the sensor? If you do then this would be a HA core issue and not an issue with the mobile app. |
Yes, when I change the alarm on my phone, I can see the correct time displayed Developer Tools. |
any HA core errors at that time? |
It doesn't look like it. This is the extent of the logs for that time period:
|
I rolled back to HA Core 2022.6.5 and the issue persisted. The state changes for the _next_alarm sensor are definitely being picked up - an automation trigger based on any state change for sensor.pixel_6_next_alarm triggers when the alarm is set or goes off, as expected:
|
I did some more testing on this today - if I set an offset to the alarm time, e.g. trigger 1 minute before the alarm, the YAML automation works as expected. If I then change the automation by removing the time offset (so that it triggers ON the alarm time), no actions are triggered. Node Red behaves the same, offsets before the alarm work but exact alarm times do not. |
I would check the date/time on your server and device maybe something is out of sync? |
I just checked, and my Raspberry Pi 4 server and my Pixel 6 phone are within 5 seconds of each other. My server matches the time shown on a Windows PC exactly. If I use |
The end result of my investigation was that my phone was a few seconds ahead of my server clock, which was apparently enough for the phone alarm to trigger on the phone and then the node red next alarm node to update to the next alarm or unavailable before sending any payloads. The same behavior occurred with the HA built-in automations. There was one comment on the community forums that said a race condition could occur on the phone and result in this behavior, but I have no way to determine whether that is happening on my phone in particular. My solution for now has been to have the node red next alarm node trigger 1 minute before my alarm and then add a 1 minute delay node immediately downstream of the next alarm. It's clearly a workaround, but it works for now. |
Closing as this is not an issue the app can handle |
Home Assistant Android version:
2022.6.0-full
Android version:
12, security update June 5, 2022
Phone model:
Pixel 6
Home Assistant version:
2022.6.6
Last working Home Assistant release (if known):
2022.6.x (it was working earlier in June)
Last working Android app version: any stable version prior to 2022.6.0-full, I updated on June 9, 2022
Description of problem:
The Next Alarm sensor is not triggering automations or sending any output from a Node Red time node. I have nothing selected in the Android app Next Alarm sensor Allow List. When setting a new alarm, I can see the correct local time value reflected in both the Developer Tools and on the Node Red time node. However, at the set time, neither the HA native automation nor the Node Red time node trigger any subsequent actions.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem:
Developer Tools:
Node Red time node configured for sensor.pixel_6_next_alarm (flow directly from Node Red cookbook example)
Additional information:
In the event it may be time zone related, I'm using times for US Central Time (CST) and Daylight Savings Time (DST) is currently active in my location.
The text was updated successfully, but these errors were encountered: