You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use the custom component with a newly bought Sonoff Micro I was having an issue where None was being returned by decrypt(), and thus JSON decode was failing. I removed the exception handler from decrypt and got to the root of the issue:
2020-12-21 23:35:34 ERROR (Sonoff_LAN) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 1750, in run
self._service_state_changed.fire(
File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 1508, in fire
h(**kwargs)
File "/config/custom_components/sonoff/sonoff_local.py", line 183, in _zeroconf_handler
data = decrypt(properties, devicekey)
File "/config/custom_components/sonoff/sonoff_local.py", line 71, in decrypt
ciphertext = b64decode(encoded)
File "/usr/local/lib/python3.8/base64.py", line 87, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Invalid base64-encoded string: number of data characters (741) cannot be 1 more than a multiple of 4
The text was updated successfully, but these errors were encountered:
Hi,
Trying to use the custom component with a newly bought Sonoff Micro I was having an issue where
None
was being returned bydecrypt()
, and thus JSON decode was failing. I removed the exception handler fromdecrypt
and got to the root of the issue:The text was updated successfully, but these errors were encountered: