Ligio / hacc-ozmo

Home Assistant Custom Component for Ecovacs Deebot Ozmo 900
MIT License
63 stars 31 forks source link

Broken with HA update 2022.7 #40

Open CletusVanDam24 opened 2 years ago

CletusVanDam24 commented 2 years ago

Hello, There was a significant upgrade to Home Assistant recently which broke many integrations - this one included. Will there be an update to this to support 2022.7? This has been the only integration I can get working with my M80 Pro.

Thanks in advance

Salsalove commented 2 years ago

@Ligio can you update this custom component to python 3.10?

Vendo232 commented 2 years ago

I second that, integration is broken

chris8837 commented 2 years ago

Thirdsies.. broken…

sh00t2kill commented 2 years ago

2022-07-09 15:18:11 ERROR (MainThread) [homeassistant.setup] Error during setup of component ozmo Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component result = await task File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/ozmo/init.py", line 90, in setup from ozmo import EcoVacsAPI, VacBot File "/usr/local/lib/python3.10/site-packages/ozmo/init.py", line 15, in from sleekxmppfs import ClientXMPP, Callback, MatchXPath File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/init.py", line 20, in from sleekxmppfs.stanza import Message, Presence, Iq File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/stanza/init.py", line 10, in from sleekxmppfs.stanza.error import Error File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/stanza/error.py", line 9, in from sleekxmppfs.xmlstream import ElementBase, ET File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/xmlstream/init.py", line 9, in from sleekxmppfs.jid import JID File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/jid.py", line 25, in from sleekxmppfs.thirdparty import OrderedDict File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/thirdparty/init.py", line 13, in from sleekxmppfs.thirdparty.orderedset import OrderedSet File "/usr/local/lib/python3.10/site-packages/sleekxmppfs/thirdparty/orderedset.py", line 25, in class OrderedSet(collections.MutableSet): AttributeError: module 'collections' has no attribute 'MutableSet'

sh00t2kill commented 2 years ago

https://docs.python.org/3.9/library/collections.html says: """ Deprecated since version 3.3, will be removed in version 3.10: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.9. """

Salsalove commented 2 years ago

@Ligio @clayauld @joshuaspence @MajorBreakfast can you update the library to allow to work with 2022.7?

joshuaspence commented 2 years ago

I am not using this component anymore but it looks like it will be tricky to fix this. The incompatible code isn't in the component but is in a dependency. https://github.com/OverloadUT/SleekXMPP hasn't been updated in 3.5 years. It is a fork of https://github.com/fritzy/SleekXMPP, which hasn't been updated in 2 years and has been marked as deprecated.

clayauld commented 2 years ago

There is, however, a fork of that dependency that may have a fix.

See https://github.com/aszymanik/SleekXMPP

I haven't looked at this yet, but may try to see if that can be a workable solution. My Deebot is currently inop so I won't be able to test any fixes other than checking to see if the component loads in HA.

sh00t2kill commented 2 years ago

Oh, thats a good find. I started looking at this, https://github.com/poezio/slixmpp, which is the recommended solution, but it didnt look quite so easy to drop in.

keithr59 commented 2 years ago

A similar issue has been raised on the official Ecovacs integration so it may be worthwhile pooling resources to find a solution.

See https://github.com/home-assistant/core/issues/74564

Vendo232 commented 2 years ago

@aszymanik has a fix but it's not necessarily an HA issue. The underlying library (sleekxmppfs) is quite outdated compared to the head branch and apparently is no longer working. I was able to pull fritzy/SleekXMPP, update it to work with python 3.10, and get HA to work nicely again. I put in a PR with sleekxmppfs and if this gets approved, can move on to add the updates.

The actual commit that made this work was fairly simple: https://github.com/aszymanik/SleekXMPP/commit/8fc0359eed5bedaca1a4710a43151c512d44c029

If you cannot wait until these PR requests go through, you can make the following changes:

Pull my updated library. This is up to date with fritzy/SleekXMPP but includes OverloadUT/SleekXMPP's renaming and disabling of cert checks. git pull https://github.com/aszymanik/SleekXMPP Install library. Enter into SleekXMPP/ directory then: python setup.py install You may need to disable your OS's version of sleekxmppfs so that it will use this updated version. In docker, the command is mv /usr/local/lib/python3.10/site-packages/sleekxmppfs/ /usr/local/lib/python3.10/site-packages/sleekxmppfs_old/

chris8837 commented 2 years ago

Any update on this? Just curious as I have no idea what you guys are talking about. Haha

vannetta commented 2 years ago

Do you have any update on it?

Vendo232 commented 2 years ago

seems like this is abandonware

ivanp123 commented 2 years ago

This issue seems to be fixed in HA 2022.8.7, mine is working again now

Salsalove commented 2 years ago

This issue seems to be fixed in HA 2022.8.7, mine is working again now

Same for me 🎊🎊🎊

Vendo232 commented 2 years ago

2022.8.7 all works again! thank you @ivanp123

chris8837 commented 2 years ago

That’s why this community rocks. Can’t thank you enough.

clayauld commented 2 years ago

Yep! All good again! 👌