Closed bartvm closed 6 years ago
Self.device is now allocated for device registry information in entity component.
But the Ecovacs code doesn't seem to respect that and currently crashes.
have you tried the latest beta? we have changed device registry to use device_info to clarify what it does
I understand why I missed it originally, the component was merged around the same time as device registry so it didn't get picked up by my grep for components using self.device. So there shouldn't be an issue any more
I am not sure I am following. Yes, as I mentioned the PRs were merged around the same time and hence the Ecovacs code wasn't updated appropriately. Why do you say there shouldn't be an issue anymore? The latest beta still has Ecovacs trying to assign to self.device
: https://github.com/home-assistant/home-assistant/blob/0.77.0b2/homeassistant/components/vacuum/ecovacs.py#L44
Just downloaded the latest beta version (0.77.0b2) but I'm having errors, which I think are the same (1004). I've set mine configuration as BR / WW.
Got the logs copied here: https://pastebin.com/F9zuBAch
@bartvm yes the issue is gone, the previous usage of self.device with device registry has moved to self.device_info.
The issue pasted by @leofuscaldi looks more like an authentication issue than with overridden methods
@leofuscaldi's issue seems to be the one from https://github.com/wpietri/sucks/pull/34
@Kane610 Got it! I didn't understand what you meant at first with device_info
, but I get it now, thanks!
@bartvm I think so.. but how do I fix the line? What is the sucks/init.py location?
It's in your traceback: /srv/homeassistant/lib/python3.5/site-packages/sucks/__init__.py
. Note that if you make changes to it though, they will be overwritten whenever the sucks library gets updated. (The permanent solution is that wpietri/sucks#34 should be merged.)
@bartvm exactly. Thanks for the help, it works now!
Changing the self.uid to the uid that is given by ecovac is working (with debug you can see which userid you are given).
But, then it gives the following errors:
sleekxmpp.basexmpp WARNING fulljid property deprecated. Use boundjid.resource
sleekxmpp.xmlstream.cert WARNING Could not find pyasn1 and pyasn1_modules. SSL certificate COULD NOT BE VERIFIED.
sleekxmpp.features.feature_mechanisms.mechanisms ERROR No appropriate login method.
sleekxmpp.xmlstream.xmlstream ERROR Can not read from closed socket.
Anyone knows how to fix this? EDIT: Fix it like this, by updating those modules:
pip3 install --ignore-installed pyasn1 pyasn1-modules
But then this problem pops up:
sleekxmpp.basexmpp ERROR day is out of range for month
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 1492, in _process
if not self.__read_xml():
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 1564, in __read_xml
self.__spawn_event(xml)
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 1632, in __spawn_event
handler.prerun(stanza_copy)
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/handler/callback.py", line 64, in prerun
self.run(payload, True)
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/handler/callback.py", line 76, in run
self._pointer(payload)
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/features/feature_starttls/starttls.py", line 64, in _handle_starttls_proceed
if self.xmpp.start_tls():
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/xmlstream.py", line 889, in start_tls
cert.verify(self._expected_server_name, self._der_cert)
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/cert.py", line 133, in verify
not_before, not_after = extract_dates(raw_cert)
File "/usr/local/lib/python3.5/dist-packages/sleekxmpp/xmlstream/cert.py", line 111, in extract_dates
not_before = datetime.strptime(not_before, '%Y%m%d%H%M%SZ')
File "/usr/lib/python3.5/_strptime.py", line 510, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "/usr/lib/python3.5/_strptime.py", line 475, in _strptime
datetime_date(year, 1, 1).toordinal() + 1
ValueError: day is out of range for month
Fixed that by editing cert.py according to this post: https://github.com/fritzy/SleekXMPP/issues/478 Resulting in yet another error.
Should i have another version of xmlstream or what is causing all this?
With other versions I am back to this error:
sleekxmpp.basexmpp WARNING fulljid property deprecated. Use boundjid.resource
sleekxmpp.features.feature_mechanisms.mechanisms ERROR No appropriate login method.
sleekxmpp.xmlstream.xmlstream ERROR Can not read from closed socket.
Tony, I think it'd be best to create that one as a new issue so we can keep the issues separate. The previous two issues in this thread are different.
I am closing this issue, as the original problem related to self.device
was fixed. If anyone watching this issue is looking for fixes for any of the other problems that were discussed in this thread, please log a new issue so we can have a clean discussion about that specific issue. Thanks!
Home Assistant release with the issue: 0.77.0b0
Last working Home Assistant release (if known): n/a
Operating environment (Hass.io/Docker/Windows/etc.): Ubuntu 18.04.1 LT
Component/platform: https://rc--home-assistant-docs.netlify.com/components/ecovacs/
Description of problem: I installed the pre-release of 0.77 to test with my Deebot N79S. I ran into the following errors:
I got authentication errors like those reported in https://github.com/wpietri/sucks/pull/34 and had to apply the fix from that unmerged PR to continue.
Secondly, #15980 turned
device
into a read-only property but seems to have failed to update the Ecovacs code (that was added the day before) which tries to write to theself.device
attribute. Replacingself.device
withself._device
everywhere in https://github.com/home-assistant/home-assistant/blob/0.77.0b0/homeassistant/components/vacuum/ecovacs.py seems to fix it.Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information: n/a