2018-10-09 04:48:46 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform mi_water_purifier
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/miio/device.py", line 258, in send
m = Message.parse(data, token=self.token)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 288, in parse
return self.parse_stream(io.BytesIO(data), **contextkw)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 298, in parse_stream
return self._parsereport(stream, context, "(parsing)")
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 310, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 2064, in _parse
subobj = sc._parsereport(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 310, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 2554, in _parse
return self.subcon._parsereport(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 310, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 3682, in _parse
return sc._parsereport(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 310, in _parsereport
obj = self._parse(stream, context, path)
File "/usr/local/lib/python3.6/site-packages/construct/core.py", line 4998, in _parse
hash2 if not isinstance(hash2,bytestringtype) else binascii.hexlify(hash2), ))
construct.core.ChecksumError: wrong checksum, read b'ffffffffffffffffffffffffffffffff', computed b'3aa44fce79f7ff5d2ee7fb2efc45c626'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/sensor/mi_water_purifier.py", line 159, in parse_data
status = self._device.send('get_prop', [])
File "/usr/local/lib/python3.6/site-packages/miio/device.py", line 279, in send
"Please check your token!") from ex
miio.exceptions.DeviceException: Got checksum error which indicates use of an invalid token. Please check your token!
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sensor/mi_water_purifier.py", line 34, in setup_platform
waterPurifier = XiaomiWaterPurifier(device, name)
File "/config/custom_components/sensor/mi_water_purifier.py", line 116, in __init__
self.parse_data()
File "/config/custom_components/sensor/mi_water_purifier.py", line 177, in parse_data
except DeviceException:
NameError: name 'DeviceException' is not defined