StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
619 stars 111 forks source link

Error after update to 2022.12 #621

Closed zeputt closed 2 years ago

zeputt commented 2 years ago

Got this message after update:

Logger: homeassistant.setup Source: setup.py:153 First occurred: 1:57:32 PM (1 occurrences) Last logged: 1:57:32 PM

Setup failed for shelly: Unable to import component: cannot import name 'get_local_ip' from 'homeassistant.util' (/usr/src/homeassistant/homeassistant/util/init.py)

Steffe2 commented 2 years ago

There seems to be a new update available now. It's almost completely unusable with a dark theme though :D Light grey text on white background, in a dark interface.

Seems like the entities doesn't work either, but at least the error message is gone from the notifications.

hakana commented 2 years ago

I was planning to fix theme but as HA 2021-12 break the plugin I did a quick release now and will continue to fix the GUI for next release.

enricozocca commented 2 years ago

After upgrade there is also this new issue:

2021-12-12 17:41:28 ERROR (Update loop) [pyShelly] Error update loop, 'NoneType' object has no attribute 'addresses', Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses' Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses'

DejavuDmitry commented 2 years ago

Also the same error: Setup failed for shelly: Unable to import component: cannot import name 'get_local_ip' from 'homeassistant.util' (/usr/src/homeassistant/homeassistant/util/init.py)

hakana commented 2 years ago

Also the same error: Setup failed for shelly: Unable to import component: cannot import name 'get_local_ip' from 'homeassistant.util' (/usr/src/homeassistant/homeassistant/util/init.py)

Fixed in latest release of ShellyForHass

Steffe2 commented 2 years ago

Also the same error: Setup failed for shelly: Unable to import component: cannot import name 'get_local_ip' from 'homeassistant.util' (/usr/src/homeassistant/homeassistant/util/init.py)

That particular error should be fixed in the 0.3.1 update that came out yesterday, or the day before. It still doesn't work for me though, but I have to check the logs to see what the current issue is.

mbrihed commented 2 years ago

I am having issues as well. Tried 0.3.1 and 0.3.2. It all worked before but now I get the following:\

Traceback (most recent call last): File "/config/custom_components/shelly/init.py", line 330, in start_up pys.start() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 185, in start self._mqtt_server.start() File "/usr/local/lib/python3.9/site-packages/pyShelly/mqtt_server.py", line 123, in start self._init_socket() File "/usr/local/lib/python3.9/site-packages/pyShelly/mqtt_server.py", line 129, in _init_socket sock.bind((self._root.bind_ip, self._root.mqtt_port)) OSError: [Errno 98] Address in use

mbrihed commented 2 years ago

Update: removed the mqtt from the config and now it works.

Cippo2019 commented 2 years ago

After upgrade there is also this new issue:

2021-12-12 17:41:28 ERROR (Update loop) [pyShelly] Error update loop, 'NoneType' object has no attribute 'addresses', Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses' Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses'

Hi Enrico , did you solve this error ? I have the same but only after update to 0.3.2 but not HA , I am still on 11.5

thanks in advance Tiziano

enricozocca commented 2 years ago

After upgrade there is also this new issue: 2021-12-12 17:41:28 ERROR (Update loop) [pyShelly] Error update loop, 'NoneType' object has no attribute 'addresses', Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses' Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses'

Hi Enrico , did you solve this error ? I have the same but only after update to 0.3.2 but not HA , I am still on 11.5

thanks in advance Tiziano

Nope!

Cippo2019 commented 2 years ago

After upgrade there is also this new issue: 2021-12-12 17:41:28 ERROR (Update loop) [pyShelly] Error update loop, 'NoneType' object has no attribute 'addresses', Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses' Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 374, in _update_loop self.check_by_ip() File "/usr/local/lib/python3.9/site-packages/pyShelly/init.py", line 241, in check_by_ip ip_addr = self._mdns.get_ip(data['id'].split('|')) File "/usr/local/lib/python3.9/site-packages/pyShelly/mdns.py", line 20, in get_ip for addr in info.addresses: AttributeError: 'NoneType' object has no attribute 'addresses'

Hi Enrico , did you solve this error ? I have the same but only after update to 0.3.2 but not HA , I am still on 11.5 thanks in advance Tiziano

Nope!

ok also for you it happens after some time ? and it is solved temporary by HA restart ?

enricozocca commented 2 years ago

in my case it always happens. no workaround. I hope it's will be fixed

Cippo2019 commented 2 years ago

ok thk a lot note : i dont see the label BUG fot that .. so.. cross my finger also