Closed ridderr closed 1 year ago
Keep in mind that the automation is in mode: single
so it only run one at a time. If you want to run this multiple times at the same time I think you should switch to parallel
Yes I know, but once this occurs none will run anymore. it looks like it stays in running mode (what I have seen, but is not in the trace). (I will will increase the number of trace instances to keep). Also see the time stamp, there is a lot of time between each invocation.
What kind of devices are they? What integration do you use for them?
It's a Z-Wave devices, but I'm not sure if this is related to a Z-Wave device. I have seen it in another automation which is not driving a Z-Wave device. This automation is run very often because it is triggered when someone is in the 'hallway'
Do you have advice to increase logging?
I have added to the lampen_gang automation:
trace: stored_traces: 25
I currently have below in configuration.yaml but this is only giving limited information
logger: default: warning logs: homeassistant.components.automation.lampen_gang: debug
So apparently some other people on the forum had this as well. The current theory is that the Z-Wave device have a latency issue. I am no expert, but that's what I've heard.
Can you maybe track down this for the other automations without Z-Wave devices? Maybe it could lead to a wider problem or problem in more integrations
I am no expert in the best way to log these things sadly
Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
zwave_js documentation zwave_js source (message by IssueLinks)
The automation posted above is very straightforward and simply turns on/off some Zwave lights. One wouldn't normally expect its execution time to be very long (< 1 second). However it appears to be waiting forever for a response from the controlled device(s) that never arrives. As a result, the automation never finishes and becomes non-responsive to subsequent attempts to trigger it, notably if mode
is single
or restart
.
The examples that users have presented in the forum are automations that communicate with devices using Zwave and Zigbee. However indications are that the problem may not be limited to just those two integrations; potentially it's any integration that doesn't promptly reply to a transmitted command. In other words, it appears like some sort of internal timeout mechanism may be misbehaving.
FWIW, an automation employing mode: restart
should abort execution if it's triggered again. However, users have reported the automations don't abort and the value of their current
attribute increases with each subsequent triggering of the automation. In other words, it's stuck waiting forever and queues subsequent execution requests. That's abnormal; the automation's mode
is restart
but it's behaving like queued
.
Potentially related: https://github.com/home-assistant/core/issues/97768 https://github.com/home-assistant/core/issues/97721 https://github.com/home-assistant/core/issues/97581
Hi, I have to same issue on an automation which is not Z-Wave related.
Now this automation is 'blocked' and all subsequent call to this automation stops. This automation run every minute and checks if current time matches the actual time.
Can you share the automation?
It's using a blueprint but the automation is:
Can you send it as text 😇
The blueprint is here: https://gist.github.com/sbyx/96c43b13b90ae1c35b872313ba1d2d2d
alias: Slaapkamer Wake-up light alarm with sunrise effect
description: ""
use_blueprint:
path: sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
input:
light_entity: light.ledstrip_slaapkamer
sunrise_duration: 15
manual_time: "06:01:00"
timestamp_sensor: sensor.ridderr_next_alarm
post_sunrise_actions:
- service: script.post_wakeup
data: {}
min_mired: 465
check_entity: person.ruud_de_ridder
The linked blueprint is designed to create an automation that triggers every minute and runs in single
mode.
From the screenshot you provided, it appears that it never even finishes a single execution because the last reported message is "Still running".
What is the integration used by light.ledstrip_slaapkamer
?
If possible, download and post the automation's trace file.
I tried to reproduce this and I got the same result as ridderr, but I removed the blueprint from my instance now oops.
The linked blueprint is designed to create an automation that triggers every minute and runs in
single
mode.From the screenshot you provided, it appears that it never even finishes a single execution because the last reported message is "Still running".
What is the integration used by
light.ledstrip_slaapkamer
?If possible, download and post the automation's trace file.
light.ledstrip_slaapkamer
is a Z-Wave device but it is not activated because the time doesn't match my alarm time.
I noticed that when I disable/enable the automation it will hang immediately.
Is a trace file available?
I now have a reproduceable situation and could enable debug logging:
2023-08-06 16:28:00.194 DEBUG (MainThread) [homeassistant.components.automation.wake_up_pre_post_actions] Automation trigger 'None' triggered by time pattern 2023-08-06 16:28:00.432 DEBUG (MainThread) [homeassistant.components.automation.wake_up_light_alarm_with_sunrise_effect] Automation trigger 'None' triggered by time pattern 2023-08-06 16:28:00.441 INFO (MainThread) [homeassistant.components.automation.wake_up_light_alarm_with_sunrise_effect] Slaapkamer Wake-up light alarm with sunrise effect: Running automation actions 2023-08-06 16:28:00.441 INFO (MainThread) [homeassistant.components.automation.wake_up_light_alarm_with_sunrise_effect] Slaapkamer Wake-up light alarm with sunrise effect: Executing step wait template 2023-08-06 16:28:00.442 INFO (MainThread) [homeassistant.components.automation.wake_up_light_alarm_with_sunrise_effect] Slaapkamer Wake-up light alarm with sunrise effect: Executing step wait template
I'll try one last time: Post the automation's trace file (if it's available). Use the "Download trace" command from the menu found in the upper-right corner.
Ok, thanks for the guidance. Was not aware of this :-(
trace automation.wake_up_pre_post_actions 2023-08-06T16_15_00.319693+00_00.zip
Sorry, this works as designed. I thought it was related to the issue there is in the system. Will raise a new issue ones I have found the required information.
The problem
Some automations (randomly) do not end correctly which results in warning messages: 2023-08-05 10:53:24.273 WARNING (MainThread) [homeassistant.components.automation.lampen_gang] Gang lampen: Already running.
It's a bit hard to track but one of my automations is run very frequently and therefor I was able to log the issue.
Ones this occurs I have to restart HA. It's not related to this specific automation. I also have seen it on other.
What version of Home Assistant Core has the issue?
2023.8.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response