Shellyforhass: 2 different Shelly 2.5 components - one for lights which always works and one for shutter (connected to a WiFi AP) which is unavailable most of the time (but it's available via http)

Created on 26 Aug 2019  路  2Comments  路  Source: StyraHem/ShellyForHASS

I can ping to the device 98% of the time (not sure why not 100%) - as long as I can ping to it, I can open it in the browser and close / open with no issues.
But from HA - using the close / open buttons doesn't work 90% of the time.

image
(Ignore the first hour as it was really disconnected)

Can I find any logs for this component? Can I provide an IP or MAC (or both?) to help stabilize the connectivity to the device (I've set the IP as reserved).

bug fixed

All 2 comments

This will enable full logging in config.yaml

logger:
  logs:
    pyShelly: debug

It's a bit more stable in the latest version for some reason (still unavailable some of the time).
So far, this is the only error I see in the logs (there's a lot of info logging for status fetching but nothing that indicates an issue so far):

2019-08-26 15:09:28 ERROR (Thread-2) [pyShelly] Error receiving UDP: 'NoneType' object has no attribute 'add_job', Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 912, in _main_loop
    block.update(data, ipaddr)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 142, in update
    dev.update(data)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 420, in update
    self._update(new_state, None, new_values)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 370, in _update
    self._raise_updated()
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 379, in _raise_updated
    callback(self)
  File "/config/custom_components/shelly/__init__.py", line 448, in _updated
    self.schedule_update_ha_state(True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 376, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 912, in _main_loop
    block.update(data, ipaddr)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 142, in update
    dev.update(data)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 420, in update
    self._update(new_state, None, new_values)
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 370, in _update
    self._raise_updated()
  File "/usr/local/lib/python3.7/site-packages/pyShelly/__init__.py", line 379, in _raise_updated
    callback(self)
  File "/config/custom_components/shelly/__init__.py", line 448, in _updated
    self.schedule_update_ha_state(True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 376, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

It wrote this error to the log on the server's startup process. Any chance it's related? The shelly entity wasn't available for a while after the server reboot.

Was this page helpful?
0 / 5 - 0 ratings