Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Error configuring homee integration with HA version 8 #12

Closed
mesistostefre opened this issue Jul 8, 2022 · 13 comments
Closed

Error configuring homee integration with HA version 8 #12

mesistostefre opened this issue Jul 8, 2022 · 13 comments
Labels
bug Something isn't working help wanted Extra attention is needed released

Comments

@mesistostefre
Copy link

In core version 2022.7.1, Home Assistant OS 8.2 the latest version of this homee integration (1.4.1) does not load because the configuration fails:
"TypeError: As of 3.10, the loop parameter was removed from Queue() since it is no longer necessary"
As a result, the config flow can't be loaded

This is a new issue likely introduced with HA 8 since the Homme integration worked just fine in versions 6 and 7

@FreshlyBrewedCode
Copy link
Owner

Thanks for reporting this issue. Unfortunately, I don't have time to look into the problem. But it sounds like it may be a relatively easy fix, so any help would be appreciated.

@FreshlyBrewedCode FreshlyBrewedCode added bug Something isn't working help wanted Extra attention is needed labels Jul 12, 2022
@Stklingner
Copy link
Contributor

I've fixed up pymee in my fork and tested it standalone; all good (asyncio version change removed the loop as a param).

But: I can't seem to install it as a req from the repository in HA so haven't tested it with the component itself.

@FreshlyBrewedCode
Copy link
Owner

@Stklingner If you submit a PR for pymee I can merge it and release the new version on PyPi so it might be easier to test with HA. However, I have not looked into any of this for a long time so I won't be able to help with testing.

@mesistostefre
Copy link
Author

I did find a reference to "loop" in lines 44 and 54 of file init.py and relate them to the error message "TypeError: As of 3.10, the loop parameter was removed " ... though ... I could not even find folder "/usr/local/lib/python3.10". All I see is /usr/local/lib/python3.9. :-/

I'm not familiar enough with homeassistant coding to be able to help, but am more than happy to help with testing ... if that is of value.

@FreshlyBrewedCode
Copy link
Owner

Both pymee and the integration need their dependencies bumped and tested against Python 3.10. I have not looked into HA development for a long time so there might be other things that need to be changed.
I still won't work on this issue but happy to accept any PRs...

@Stklingner
Copy link
Contributor

There still seems to be some sort of hang in the integration set-up; will have a look this weekend.

@Stklingner
Copy link
Contributor

Stklingner commented Oct 3, 2022

Spent about half a day on this - although pymee's working just fine the set-up flow call to homee.run() in validate_and_connect() never gets the homee.wait_until_connected() event and just hangs until HA closes the socket...

There's probably something obvious I'm missing - I've tried a direct hass.loop.create_task(homee.run()) and that never gets the await either (works just fine in Pymee) - any clues?

@FreshlyBrewedCode
Copy link
Owner

If pymee does work standalone them maybe something changed with the way HA handles async tasks. Although it looks like hass.async_create_task is still around. Also since the loop parameter was removed from the asyncio.Event class maybe some adjustments need to be made to homee._connected_event/homee.wait_until_connected().

Did you try to debug the websocket connection when running in HA? E.g. by using a debugger or logging the events in Homee?

@Stklingner
Copy link
Contributor

Stklingner commented Oct 3, 2022

Strange - added debug to config and restarted to have a closer look and all of a sudden it works?

Will dig around and figure it out, tidy up and send a PR

@Stklingner
Copy link
Contributor

Have narrowed it down to something to do with HACs cleanup and restarting again and again...

New problem: the token expires and won't renew until restart so will look at that

Plus: I've implemented covers, thinking about doing sensors too for power consumption

@github-actions
Copy link

github-actions bot commented Oct 5, 2022

🎉 This issue has been resolved in version 1.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@mesistostefre
Copy link
Author

Very cool. I just upgraded to 1.5.0 The upgrade itself went just fine and the integration initializes completely.
Just FYI: I do find an error log
"unable to prepare setup for homee.sensor: Platform not found (no module named 'custom_components.homee.sensor')"
In a next step, I'll remove the homee integration completely and reinstall.

@Stklingner
Copy link
Contributor

Stklingner commented Oct 6, 2022

Ah, sorry - I forgot to remove that during the tidy-up; I'm taking a crack at getting the sensors in from the node attributes

The message is harmless and the error shouldn't affect the rest of the platforms

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed released
Projects
None yet
Development

No branches or pull requests

3 participants