Shellyforhass: [BUG]Home Assistant crashes after ShellyForHass enters a loop

Created on 3 Sep 2020  路  7Comments  路  Source: StyraHem/ShellyForHASS

Environment

  • ShellyForHASS release with the issue: 0.2.0.beta.5 and 0.2.0.beta.4
  • Last working ShellyForHASS release (if known): 0.2.0.beta.3
  • Home Assistant Core release with the issue: 0.114.4
  • Operating environment (Home Assistant/Supervised/Docker/venv): Home Assistant on Raspberry Pi 4

Describe the bug

Steps to Reproduce

Expected behavior

Screenshots

Traceback/Error logs


Additional context

bug fixed

All 7 comments

not sure that the logs are visible... so here the loop in a single err msg:

2020-09-03 10:06:30 ERROR (Update loop) [pyShelly] Error update loop, name 'new_value' is not defined, Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 289, in _update_loop
block.loop()
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/block.py", line 113, in loop
self.set_info_value(iv, new_value, None)
NameError: name 'new_value' is not defined
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 289, in _update_loop
block.loop()
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/block.py", line 113, in loop
self.set_info_value(iv, new_value, None)
NameError: name 'new_value' is not defined

Found and will be fixed in next beta today

@hakana
just for the completeness, seems to be an uncaught exception, not sure if thie is the same error:

2020-09-03 14:12:03 ERROR (Poll status) [root] Uncaught exception
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/util/thread.py", line 20, in run
run_old(args, kwargs)
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(
self._args, *self._kwargs)
*
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/block.py", line 129, in update_status_information

if diff < 600 or (diff < 3600 and self.status_update_error_cnt >= 5):
TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'

@hakana unfortunately still the same problem after installing beta6, just another line of block.py causes the issue:

2020-09-04 07:45:50 ERROR (Update loop) [pyShelly] Error update loop, name 'new_val' is not defined, Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 289, in _update_loop
block.loop()
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/block.py", line 107, in loop
if value != new_val:
NameError: name 'new_val' is not defined
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/__init__.py", line 289, in _update_loop
block.loop()
File "/srv/homeassistant/lib/python3.7/site-packages/pyShelly/block.py", line 107, in loop
if value != new_val:
NameError: name 'new_val' is not defined

@hakana After update with the latest beta 7, no crashes or errors in the log file anymore. For me I would say, this is also fixed and can be closed.
@n3tkiller What about you? Can you confirm?

Hi @galex8, yes. The fix worked for me even before the release of the beta 7. I will close the issue. Thanks for reminding :)

Great!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chemelli74 picture chemelli74  路  9Comments

dodg3r picture dodg3r  路  12Comments

filmgarage picture filmgarage  路  7Comments

fabian-born picture fabian-born  路  6Comments

GrtDlks picture GrtDlks  路  11Comments