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

Aqara contact-sensors keeps going unavailable ZHA/Skyconnect #87494

Closed
denny-exalto opened this issue Feb 5, 2023 · 23 comments
Closed

Aqara contact-sensors keeps going unavailable ZHA/Skyconnect #87494

denny-exalto opened this issue Feb 5, 2023 · 23 comments
Assignees

Comments

@denny-exalto
Copy link

The problem

Hello,

Running new HA setup with Skyconnect and ZHA. Previuosly it had conbee2 with zigbee2mqtt without problems with the same sensor. But after this transistion it keeps going unavailable after a few hours and then i have to repair again.
Please let me know what info to provide more

What version of Home Assistant Core has the issue?

2023.2.2

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

ZHA

Link to integration documentation on our website

No response

Diagnostics information

config_entry-zha-c1370734242100e753bfb4fd0c5f9c7b.json (2).txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

The problem is only happing with the Aqara magnet sensors at the moment

Additional information

image

@denny-exalto denny-exalto changed the title Aqara magnet sensors keeps going unavailable ZHA/Skyconnect Aqara contact-sensors keeps going unavailable ZHA/Skyconnect Feb 5, 2023
@furymountain
Copy link

I have the same problem with both aqara magnet, motion, temperature and philips motion sensors. Sky connect stick seems to be the problem. Did not have this issue with conbee and deconz.

@maguiresf
Copy link

Same problem here, just migrated from Deconz / Conbee II to ZHA / SkyConnect. Hue motion sensors get "stuck" in some state, occupancy may be either true or false but they never change. Require a re-pair to get them working again. Aqara magnet sensors seem to either stop sending updates or just become unavailable. This can happen twice a day on some of these devices. Latest HA version, latest SkyConnect firmware.

@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 Change the title of 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)

@puddly
Copy link
Contributor

puddly commented Feb 13, 2023

Are you using the supplied USB 2.0 extension cable and positioning the SkyConnect away from interference sources such as USB 3.0 devices, SSDs, external hard drives, 2.4GHz routers, etc.?

ZHA uses a different default radio channel from Z2M or deCONZ so if ZHA's default channel (15) is congested but Z2M's default (11) isn't, things will definitely behave differently. Can you all confirm the exact channel your previous sticks were using?

  • For Zigbee2MQTT, if you did not change the channel in your config file, it will be channel 11.
  • For deCONZ, check the network settings page (15, as shown with the channel mask checkboxes):
    image

@denny-exalto
Copy link
Author

Hello Puddly,
Thank you for responding. I am using the extensions cable with the skyconnect and Connected to the backplate in stead frontio (Using unraid pc) and mounted to the wall using pla mount. Also tried change WiFi Channels but no difference and the ap is 2 rooms away from the Skyconnect.
I am unable to acces my old installation, but i did ran zigbee2mqtt with conbee stick. This should Work fine right? Even it might use another Chanel?

@maguiresf
Copy link

I am using the supplied extension cable and the SkyConnect is away from sources of interference. I'm fairly confident about this because I've had the Conbee II plugged directly into the USB port before and it makes pairing almost impossible and the network seems sluggish. The current network seems snappy and pairing is easy and reliable.

My deconz install was using channel 25. ZHA is using the default channel 15.

I think this issue is also probably a duplicate of #86231, I added my comment to that one as well.

@Hedda
Copy link
Contributor

Hedda commented Feb 18, 2023

Note! Best practice setup really must be followed as a proactive measure before anyone can look at these type of issues to help rule out EMF/EMI/RMI interference first as a noise on the same freqency can make it much harder when troubleshooting other issues. Actions needs to be taken by every user in advance of further troubleshooting.

So, before even starting to troubleshoot any problems with those kinds of symptoms, highly recommend read and follow this in-depth best practice guide regarding reception optimization and interference avoidance -> https://community.home-assistant.io/t/guide-for-zigbee-interference-avoidance-and-network-range-coverage-optimization/515752/

Also, follow these other related best practices to at least add a few more Zigbee Router devices and re-pair your devices again in their final location after trying to take on all the suggested actions -> https://www.home-assistant.io/integrations/zha#best-practices-to-avoid-pairingconnection-difficulties

Then as well as in addition consider changing to using a less noisy Zigbee channel (which is part of the above guide) -> https://www.home-assistant.io/integrations/zha#defining-zigbee-channel-to-use

Those are all actions that you really need to take regardless of which Zigbee Coordinator radio adapter and Zigbee gateway solution you use.

If still have issues then you will need to enable debug logging and replicate the issue so that you can provide debug logs that show the exact time when the issues occur.

Again, please understand and remember that all and any problems will not only be much easier to narrow down and troubleshoot if you have already taken actions to reduce any sources of interference and changed to a Zigbee channel with less noise, due to the huge amount of different devices and environmental variables it may in fact be impossible troubleshoot otherwise.

@puddly
Copy link
Contributor

puddly commented Feb 23, 2023

Previuosly it had conbee2 with zigbee2mqtt

My deconz install was using channel 25. ZHA is using the default channel 15.

These channel differences are extremely important: Z2M defaults to 11, your deCONZ install was using 25, but ZHA is now using 15. In some environments, some channels are unusable due to noise. I suggest migrating your network back to the channel that worked:

Download a ZHA backup image, edit the channel in the JSON from 15 to the known-working channel, and then restore it by performing a ZHA radio migration (select the "re-configure the current radio" option and restore the JSON backup). You can try power cycling a few devices, they may re-join on their own.

@timiman
Copy link

timiman commented Feb 24, 2023

Previuosly it had conbee2 with zigbee2mqtt

My deconz install was using channel 25. ZHA is using the default channel 15.

These channel differences are extremely important: Z2M defaults to 11, your deCONZ install was using 25, but ZHA is now using 15. In some environments, some channels are unusable due to noise. I suggest migrating your network back to the channel that worked:

Download a ZHA backup image, edit the channel in the JSON from 15 to the known-working channel, and then restore it by performing a ZHA radio migration (select the "re-configure the current radio" option and restore the JSON backup). You can try power cycling a few devices, they may re-join on their own.

@puddly , after changing the channel using this method, the devices should eventually reconnect to coordinator or they should be reconfigured -from HA- or re-pair from scratch?

@Hedda
Copy link
Contributor

Hedda commented Mar 1, 2023

Again, Zigbee devices and especially the Zigbee Coordinator adapter can be extremely sensitive to EMF/EMI/RMI interference and you therefore really always do need to take some basic actions to at least relocate the Zigbee Coordinator adapter a little bit to keep it away from any possible sources of EMF/EMI/RMI interference.

It is highly recommended that you read and try to follow all the tips and advice here in this guide -> https://community.home-assistant.io/t/guide-for-zigbee-interference-avoidance-and-network-range-coverage-optimization/515752

EMF/EMI/RMI interference can cause weird and intermittent symptoms that can make it much harder to troubleshoot other issues (looking at the logs you can have problems in seeing the forest for the trees). Avoiding EMF/EMI/RMI interference to rule it out.

after changing the channel using this method, the devices should eventually reconnect to coordinator or they should be reconfigured -from HA- or re-pair from scratch?

All modern Zigbee devices with properly written firmware should reconnect on their own if you change the change Zigbee network channel, (though be aware that not all Zigbee devices have properly written firmware). Most Zigbee devices will reconnect within a few hours, some might however need to be manually power-cycled if they do not reconnect, but yet others might be to be re-joined/re-paired (though it should be no need to remove the device from the ZHA integration, i.e. there should not be a need to remove and re-pair devices from scratch just because you changed the Zigbee network channel). Recommend making sure that all your main-powered devices reconnect before starting to chase down battery-powered devices. See -> https://www.home-assistant.io/integrations/zha#defining-zigbee-channel-to-use

@Nirodam
Copy link

Nirodam commented Mar 16, 2023

I just switched over from Conbee2 to SkyConnect, and my battery devices (aqara and ikea) are experiencing similar issues. Let me know if I can provide any information to help with the resoultion of this issue.

What I have noticed is that they usually drop daily, however if I restart ZHA or Home Assistant, they all show back up again (usually).

@TomAlexanderIO
Copy link

I’m experiencing the same issues. @denny-exalto did you find a solution for the issue?

@KSchmeeds
Copy link

I am also experiencing these issues with the Aqara Door Sensors and the SkyConnect. Some sensors will become unavailable after a few days and require being re-paired. At first I only had one sensor do this several times, but recently a different one did it.

I have about 14 of these sensors in use. There are three hardwired zigbee devices acting as repeaters too.

@timiman
Copy link

timiman commented May 30, 2023

I would like to note that a possible time-out/keep-alive issue for some Aqara sensors exists. Due to the fact that sometimes, one or two sensors that I have -door or motion sensors, will be shown as "Unavailable" on the UI, but will wake-up as soon as I trigger them -open door or move in front of the motion sensor. It is still a random event and at a very low percentage (<10%) the sensor will need a re-pair. This is bad in case of being away from home, in which case you see the "Unavailable" on it and you do not know if the sensor is just sleeping or needs a re-pair.

@puddly
Copy link
Contributor

puddly commented May 30, 2023

Older generation Aqara sensors send a proprietary heartbeat message about once every 50 minutes without any configuration (it cannot be enabled or disabled, it just happens). The default ZHA unavailable timeout for sensors is four hours. For an idle Aqara door sensor to be considered unavailable, five consecutive heartbeat messages would have been missed, which very likely indicates significant network problems outside the control of the coordinator.

Make sure you do not have parent routers incompatible with Aqara devices on your network, your Aqara devices have picked an appropriate parent router (they often do not and the connection is weak), and that their batteries are fresh (reporting is unreliable and the percentage will not change by much, if at all).

@jkbkster
Copy link

I have same issue with my Aqara / Lumi doir contacts and push buttons .

plenty of routers / repeaters in the house

@DennisIsanders
Copy link

Yup Same problem here. Lumi door sensor. Lost its connection after 4-5 hours. Moved the rpi away from the Sonoff zigbee 3.0. still the same problem.

@cwm77
Copy link

cwm77 commented Nov 14, 2023

I am also experiencing these issues with the Aqara Door Sensors and the SkyConnect. Some sensors will become unavailable after a few days and require being re-paired. At first I only had one sensor do this several times, but recently a different one did it.

I have about 14 of these sensors in use. There are three hardwired zigbee devices acting as repeaters too.

I have exactly the same problem. The interesting thing is that a small group of the Aqara door sensors fail after a few days.

I didn't have this problem with conbee and deconz either.

@TasukiNekoi
Copy link

I had only one aqara sensor with this issue. I replaced it with a new one and now it works perfectly fine.

@DennisIsanders
Copy link

I am using the sonoff zigbee first with ZHA. Had same issues. Now i use the zigbee2mqtt. But is updated the sonoff firmware. Looks stable now.

@puddly
Copy link
Contributor

puddly commented Nov 14, 2023

Closing this issue because the author has not posted an update in many months.

@puddly puddly closed this as completed Nov 14, 2023
@jkbkster
Copy link

jkbkster commented Nov 14, 2023 via email

@Dreaming-Codes
Copy link

I'm having the same problem with only 4 of my aqara magnet sensors.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 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