niemyjski / homeassistant-kohler

Kohler Integration for Home Assistant
Apache License 2.0
14 stars 3 forks source link

Crash under latest version 111.3 #6

Closed jwelter1971 closed 4 years ago

jwelter1971 commented 4 years ago

Getting an exception randomly under 111.3:

2020-06-15 02:29:15 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.kohler_valve_1 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/kohler/binary_sensor.py", line 51, in update
    self._data.updateBinarySensor(self._sensor)
  File "/config/custom_components/kohler/__init__.py", line 258, in updateBinarySensor
    state = self.getSystemInfo(sensor.systemKey)
  File "/config/custom_components/kohler/__init__.py", line 158, in getSystemInfo
    self._updateSystemInfo()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/kohler/__init__.py", line 152, in _updateSystemInfo
    self._sysInfo = self._api.systemInfo()
  File "/usr/local/lib/python3.7/site-packages/kohler/kohler.py", line 173, in systemInfo
    return self.fetch(url)
  File "/usr/local/lib/python3.7/site-packages/kohler/kohler.py", line 210, in fetch
    return json.loads(responseText)
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
niemyjski commented 4 years ago

What is the firmware version of your Kohler controller?

jwelter1971 commented 4 years ago

User Interface 1 (S) Graphics: v0.1.3.72 OS: v0.0.3.0 Language: v255.255.255.255 TouchPanel: v0.0.0.9

Valve 1 v0.12

Controller (S) v0.0.3.80

niemyjski commented 4 years ago

Thanks, I just checked and I'm seeing the same errors now too running 0.111.4. I'll try and get a fix out for this weekend.

niemyjski commented 4 years ago

I just updated to 0.112.1 and I'm not seeing this anymore, was just going to try to debug it. I verified that the issue isn't with the python library. @jwelter1971 Can you please confirm

niemyjski commented 4 years ago

I'm closing this as I haven't seen this issue, if you see it please let me know and we'll reopen it.