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
Unavailable Xiaomi Gateway devices are not detected correctly #16274
Comments
I have also seen this before. Just an FYI if your devices go to unavailable that means you should consider moving your gateway to a more central location or get some powered nodes to increase the range and stability of the mesh. For me I moved my gateway and I no longer had any device go to the |
The unavailable state of the Mihome App and Home Assistant should be compared with each other. They are independent. The API of the Xiaomi Gateway doesn't expose the unavailable state. The Home Assistant component (
If you reboot Home Assistant all paired zigbee devices are available by default. This line could be changed to swap the default to |
In #16270 you mentioned that "The gateway receives(?) and publishes a heartbeat every 5 or 10 minutes per sub-device". Why is TIME_TILL_UNAVAILABLE = 150 minutes and not something like 15 minutes? By the way, Mi Home is also not able to detect an unavailable device immediately, but in ~15 minutes or so (never measured exact time period). Thanks! |
Take a look at: #11631
|
Ah, ok... Then it makes sense. Well, how do you get states of all devices after HA reboot? Do you just wait for the next heartbeat for each of them separately? Thanks! |
No. At first a device list is retrieved. Afterwards each devices is polled once. https://github.com/Danielhiversen/PyXiaomiGateway/blob/master/xiaomi_gateway/__init__.py#L212-L290 |
Thanks! Yes, you are right: Gateway reports unavailable devices exactly like available ones. Well... If heartbeat time periods are so different for different device types (from 7 minutes to 1 hour), can we use different TIME_TILL_UNAVAILABLE values for different device types? It looks like MiHome reports a device us unavailable after about 4 missing heartbeat (~26 minutes for a plug), but 2 missing heartbeats are probably enough. What do you think? Thanks! |
Regarding restart... Is it possible to use the last known state as the default value? In other words, if a device was unavailable and HA restarted, it continues to be unavailable (until a new heartbeat arrives). That should cover 99% of cases. What do you think? Those fixes would be very helpful. At the moment I'm actively developing my smart house, disconnecting and reconnecting devices all the time and restarting my HA 10+ times a day. Thanks! |
I understand your pain and your idea is possible. I will think about it but the faeture has a low priority on my list. |
Ok, thanks in advance! |
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 bug is still actual. Thanks! |
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. |
Yes, it's still actual. Thanks! |
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. |
Yes, it's still actual. Thanks! |
Anything new with this problem? |
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. |
Yes, it's still actual. Thanks! |
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. |
This comment was marked as spam.
This comment was marked as spam.
@SergeyPomelov Please don't spam at so much issues. This doesn't help to improve the situation. |
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. |
Yes, it's still actual. |
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. |
Yes, it's still actual. |
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. |
Yes, it's still actual. |
I'm having the same issue. |
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. |
Yes, it's still actual. |
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. |
Yes, it's still actual. |
Hey on my side I just reload the plugging once any xiaomi device is
unavailable and it works pretty well as a workaround.
*Pierre-Richard, **Précival*
Le mar. 12 déc. 2023 à 19:11, Oleksandr Berchenko ***@***.***>
a écrit :
… Yes, it's still actual.
—
Reply to this email directly, view it on GitHub
<#16274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMVDXIES44Q46R5SIPZVF3YJA3VXAVCNFSM4FSH3INKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBVGE4DEOBZGMZA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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. |
Yes, the issue is still present.
*Pierre-Richard, **Précival*
Le lun. 11 mars 2024 à 21:06, issue-triage-workflows[bot] <
***@***.***> a écrit :
… 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.
—
Reply to this email directly, view it on GitHub
<#16274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMVDXNS4RYZCI7WJST5MSLYXWT6PAVCNFSM4FSH3INKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJYHAZTSOJZGIYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, it's still actual. |
Home Assistant release with the issue:
0.77.0
Last working Home Assistant release (if known):
n/a
Operating environment (Hass.io/Docker/Windows/etc.):
Virtualenv on Raspberry Pi
Component/platform:
https://www.home-assistant.io/components/xiaomi_aqara/
Description of problem:
If a device connected to Xiaomi Gateway becomes unavailable (for example, I remove a plug from the socket), it takes a few minutes for my MiHome application to recognize that and a few hours for HA. Even worse, if I restart HA, it starts to think that device is available again and it takes another several hours to realize it doesn't.
Thanks!
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
n/a
Additional information:
n/a
The text was updated successfully, but these errors were encountered: