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

HA stopped communicating with my Yolink devices "switches & motion sensors" after 2024.4 update. #108492

Closed
Bigsteps66 opened this issue Jan 20, 2024 · 21 comments

Comments

@Bigsteps66
Copy link

The problem

After updating to the 2024.4 Home Assistant Core most of my automations using Yolink devices "ie.. motion sensors and switches" stopped functioning. It took me a bit to track down the issue, but thanks to HA's device log's I was able to pinpoint the problem within a few minutes. I restored my system to the most current backup (2 days ago) and everything is working again normally.

What version of Home Assistant Core has the issue?

core-2024.1.4

What was the last working version of Home Assistant Core?

core-2024.1.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automations with Yolink motion devices & switches

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@tasinclair4
Copy link

I am having the exact same issue after moving to 2024.1.4 this am.

Logger: yolink.mqtt_client
Source: runner.py:188
First occurred: 7:22:35 AM (210 occurrences)
Last logged: 8:14:01 AM

yolink mqtt client disconnected!
token expired or invalid, acquire new one.

@GregRocket
Copy link

Same Issue for me too after updating to 204.1.4 from core-2024.1.3

Core 2024.1.4
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0
Raspberry Pi 4
https://www.home-assistant.io/integrations/yolink/

HA Log File:
yolink mqtt client disconnected!
7:03:44 AM – (ERROR) runner.py - message first occurred at 6:49:56 AM and shows up 56 times
unexcept exception:
7:00:04 AM – (ERROR) /usr/local/lib/python3.11/site-packages/yolink/mqtt_client.py - message first occurred at 6:49:47 AM and shows up 30 times

@StephenShamakian
Copy link

StephenShamakian commented Jan 20, 2024

Core: 2024.1.3
Supervisor: N/A
Operating System: Container
Frontend: 20240104.0
Unraid Container
https://www.home-assistant.io/integrations/yolink/

Glad, I found this as I couldn't figure out what was going on. As my Yolink devices are communicating fine to the Yolink app but home assistant is not reporting their statuses. I was about to dig into the logs to see why but this post confirms my issues as well.

The only difference for me is I'm on v2024.1.3 of HA Core and they aren't working.

HA Log File:
2024-01-20 11:38:34.316 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!

2024-01-20 11:38:39.473 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:39.632 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:39.790 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:39.948 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:40.105 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:40.263 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:40.421 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:40.578 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:40.739 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable
2024-01-20 11:38:40.757 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 10.10.9.5 data: Unable to connect to the device: 10.10.9.5:9999:
2024-01-20 11:38:40.896 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
File "/lsiopy/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
async with client.messages() as messages:
^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable

@home-assistant
Copy link

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

Code owner commands

Code owners of yolink 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 yolink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


yolink documentation
yolink source
(message by IssueLinks)

@Ylianst
Copy link

Ylianst commented Jan 20, 2024

I can also confirm, same error here.

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/yolink/mqtt_client.py", line 59, in _listen
    async with client.messages() as messages:
               ^^^^^^^^^^^^^^^^^
TypeError: 'async_generator' object is not callable

@fzambroni
Copy link

Same here!

@escobarin3
Copy link

I was having the same issue. Rolling back to 2024.1.2 solved the issue. 2024.1.5 does not solve the issue.

@Bigsteps66
Copy link
Author

Bigsteps66 commented Jan 21, 2024 via email

@captshadab
Copy link

Hello

Will be fixed in next update of home assistant
Uploading IMG_7192.png…

@Bigsteps66
Copy link
Author

Bigsteps66 commented Jan 23, 2024 via email

@matrixd2
Copy link
Contributor

Please upgrade to version 2024.1.6

@sharpe7852
Copy link

sharpe7852 commented Jan 31, 2024

Yes, it is working again with version 2024.1.6.

@shim895
Copy link

shim895 commented Jan 31, 2024

I have updated to 2024.1.6, restarted HA multiple times, but I am still seeing this in the logs:

2024-01-31 09:15:19.025 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:15:24.231 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/yolink/mqtt_client.py", line 60, in _listen
    async for message in client.messages:
TypeError: 'async for' requires an object with __aiter__ method, got method
2024-01-31 09:15:24.431 ERROR (MainThread) [yolink.mqtt_client] unexcept exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/yolink/mqtt_client.py", line 60, in _listen
    async for message in client.messages:
TypeError: 'async for' requires an object with __aiter__ method, got method
2024-01-31 09:15:34.505 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:15:49.579 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:16:01.010 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:16:16.085 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:16:31.159 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:16:46.235 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!
2024-01-31 09:17:01.309 ERROR (MainThread) [yolink.mqtt_client] yolink mqtt client disconnected!

@matrixd2
Copy link
Contributor

Do you might run command pip freeze on your HomeAssistant container? I need to check your homeAssistant dependencies

@GregRocket
Copy link

Core 2024.1.4
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0
Raspberry Pi 4

After installing HA update to 2024.1.6 I had that error " yolink mqtt client disconnected!" 2 times in my HA log. I restarted Home Assistant, checked the log and the error does not show now.

@shim895
Copy link

shim895 commented Jan 31, 2024

Do you might run command pip freeze on your HomeAssistant container? I need to check your homeAssistant dependencies

I've attached my output.
pip_freeze.txt

@matrixd2
Copy link
Contributor

txt

Your aiomqtt client still using the older version 1.2.1, I'm not sure why this dependency is not updated, Your can run command pip uninstall aiomqtt and then run command pip install aiomqtt==2.0.0 to reinstall this library

@shim895
Copy link

shim895 commented Jan 31, 2024

txt

Your aiomqtt client still using the older version 1.2.1, I'm not sure why this dependency is not updated, Your can run command pip uninstall aiomqtt and then run command pip install aiomqtt==2.0.0 to reinstall this library

That worked @matrixd2. I also had to reboot my system, as an HA bounce didn't pick it up. Thank you!

@Don-Swanson
Copy link

@matrixd2
I'm running HA in a container. Just upgraded the container, and it's at 2024.1.6 now, but still having these errors. I've validated that aiomqtt is version 2.0.0 inside the container. Any other ideas what to check?

@Bigsteps66
Copy link
Author

The 2024.1.6 release is working great on my system, I do not use MQTT that others are saying their still having issues. Thank you to all involved in Getting things working.

@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 May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

14 participants