Skip to content
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

Automations triggered by Zigbee device are now hanging or failing all together #98428

Closed
Axsgranted opened this issue Aug 15, 2023 · 7 comments
Closed

Comments

@Axsgranted
Copy link

The problem

Racking my brain on this one. Had the below automation working for literally a year with NO problems.

The sensor triggers, automation sees the trigger
Condition passes
Lights not triggered.
I check traces it shows “stopped because only a single execution”. Immediately after I can trigger the lights with my dashboard or with my ZHA wireless button with no problem. No long running execution.

If I reboot HA it works once and then almost never again. I have a much more complex automation that also started to hang sometimes that won't recover until I reboot HA.

To temporarily work around the problem I ended up doing ZHA event captures and that works without issue. See Workaround automation.

What version of Home Assistant Core has the issue?

core-2023.8.2

What was the last working version of Home Assistant Core?

3 or 4 versions back

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

No response

Example YAML snippet

**Original Automation:**
alias: Action - Patio lights Slide Door Open
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.lumi_lumi_sensor_magnet_aq2_opening
    from: null
    to: "on"
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - type: turn_on
    device_id: c3da17062f27d5ecac4bb21bd0b36869
    entity_id: 4965649777d6ac3bc35b07831a7a8979
    domain: light
mode: single

**Workaround Automation:**
alias: Action - Patio lights Slide Door Open
description: ""
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: 878581a8bc5b6a8f0178941bc7b88280
      command: attribute_updated
      args:
        attribute_id: 0
        attribute_name: on_off
        value: 1
condition:
  - condition: sun
    before: sunrise
    after: sunset
action:
  - type: turn_on
    device_id: c3da17062f27d5ecac4bb21bd0b36869
    entity_id: 4965649777d6ac3bc35b07831a7a8979
    domain: light
  - type: turn_on
    device_id: 93a65d115c106906ea5bb3825328dd84
    entity_id: be48f8ff16aff25fdd2ae7b8dcc069d1
    domain: light
    brightness_pct: 100
mode: single

Anything in the logs that might be useful for us?

stopped because only a single execution

Additional information

No response

@allenporter
Copy link
Contributor

Duplicate of #98073

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@allenporter
Copy link
Contributor

For zha maintainers, some context in #98073 (comment) and PR #98501 -- service calls used to have a default timeout and now we'd like to fix the root cause of the issue and ensure that integration services calls don't hang forever or resolve the underlying root cause.

@puddly
Copy link
Contributor

puddly commented Aug 18, 2023

Thank you! I don't believe there are any operations in ZHA that should run indefinitely: all commands should have a timeout of one sort or another via the upstream library.

With the removal of Core's timeouts, is there some other hard limit? Or is this behavior 100% caused by an integration service call running indefinitely?

@allenporter
Copy link
Contributor

Not currently a hard limit. (My original suggestion was to add back the limit but we decided it should be specific to the integration based on the context).

Just to clarify, timeouts are one solution but there could be others (e.g. immediate fail if the device isn't available etc)

@Axsgranted
Copy link
Author

For what it's worth, running the latest version and I have not had any more issues.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants