core: ZHA Devices becoming unavailable

The problem

I have recently installed a Sonoff Zigbee bridge, a Sonoff PIR and a Sonoff temperature and humidity sensor.

The devices run under the ZHA integration and are functioning as expected with the exception of the Sonoff PIR. After roughly 5 1/2 hours without reporting any events, the device becomes ‘unavailable’. The instant the device is triggered (in other words the PIR works just fine), HA is reporting the device as operating again. There seems to be a time-out happening after a certain period of inactivity that causes this issue but I have not been able to make any headway trying to figure out how to either fix this or increase the time-out period. The temperature/humidity sensor talks frequently so it doesn’t time out.

Environment

  • Home Assistant Core release with the issue: ??
  • Last working Home Assistant Core release (if known): not known
  • Operating environment (OS/Container/Supervised/Core): See above
  • Integration causing this issue: ZHA
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/zha

Problem-relevant configuration.yaml

Configure a default setup of Home Assistant (frontend, api, etc)

default_config:

Text to speech

tts:

  • platform: google_translate

group: !include groups.yaml automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml

logger: default: critical logs: homeassistant.core: debug homeassistant.components.zha: debug bellows.zigbee.application: debug bellows.ezsp: debug zigpy: debug zigpy_cc: debug zigpy_deconz.zigbee.application: debug zigpy_deconz.api: debug zigpy_xbee.zigbee.application: debug zigpy_xbee.api: debug zigpy_zigate: debug zhaquirks: debug

remote:

  • platform: broadlink host: 192.168.50.209 mac: ‘xxxxxxxxxxxxx’ type: rm4c_mini name: rm4c_mini

weather:

  • platform: environment_canada

sensor:

  • platform: environment_canada

#mqtt: #discovery: true

binary_sensor:

  • platform: remote_rpi_gpio

host: 192.168.1.33

host: 192.168.50.67
ports:
  17: Motion
  12: PIR Bedroom

Example configuration.yaml entry

device_tracker:

  • platform: bluetooth_tracker track_new_devices: true

  • platform: bluetooth_le_tracker track_new_devices: false

  • platform: unifi_direct host: 192.168.1.1 username: Hass password: xxxxxxxxxxxxxxxxx interval_seconds: 10 consider_home: 10 new_device_defaults: track_new_devices: true


Traceback/Error logs

I have (I think) enabled all the error logs I need to but am unable to see them under supervisor - system - log

I see the following logs: Supervisor, core, host, dns, audio, multicast Please indicate which logs you would like me to post


Additional information

Configuration - integrations - ZHA - configuration - visualization seems to be broken. All three devices are there but the hub is showing offline and there is no link between the hub and the PIR even though Lovelace currently reports everything working.

I realize this issue was reported before in mid 2020 but was closed. I was not able to resolve my issues with the information given in the previous issue

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 57 (23 by maintainers)

Most upvoted comments

Indeed - ive just ordered some more - hopefully they will arrive for when I get home

I think you is needing some more router devices that can acting as parent for you end device for getting it working god.

It’s early days yet (and I may regret saying this) but it appears that moving a repeater nearer the window/door sensor had th3 desired effect and unlike previous nights the sensor didn’t go into “unavailable” state. So fingers crossed !

It found all the devices but lost all the configured names and what not so manual setup is required … but it is working. I suspect that had I used the correct module, it would have carried over all names of the devices. Oh well, it’s progress anyhow 😃 Thanks again !

Ah … found the entry for Sonoff ZHA Bridge (0) … tried it and it took …

MattWestb, thanks for your assistance. I was able to upgrade from 6.7.6 to 6.7.8. Looks like I will need to re-join all devices as they are now ‘unavailable’. I was also able to revert to the latest stable version of HA and all the issues I had with Lovelace went away. Good news almost all around (other than having to re-join the zigbee devices)

Care to share where that beta is? I’m having my whole network fall offline in zha because the ikea repeaters fall off, and then every end device does.

Do you have Ikea repeaters? I’m seeing an issue with the Ikea Repeaters going offline with the Sonoff Bridge…and then everything else falls offline.