tfriedel / python-lightify

Python module for Osram lightify. This is a work in progress.
Apache License 2.0
18 stars 9 forks source link

Unknown devices types 105, 115, 77 #18

Closed rbdubz3 closed 5 years ago

rbdubz3 commented 5 years ago

A large number of errors/warnings in my Indigo Domotics setup which uses python lightify version 1.0.7.1.. Below is the dump of indigo plugin log along with Warnings from the lightify plugin (reference messages 'LightifyDirect Warning'

Error Block 1


Sylvania Lightify Starting concurrent thread LightifyDirect Warning Couldn't unpack light status packet: LightifyDirect Warning struct.error: unpack requires a string argument of length 50 LightifyDirect Warning payload: 060000000000000000 Sylvania Lightify Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last): File "plugin.py", line 297, in runConcurrentThread File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/SylvaniaLightify.indigoPlugin/Contents/Server Plugin/lightify/init.py", line 1309, in update_group_list File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode byte 0xa4 in position 2: invalid start byte

Sylvania Lightify Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds) Sylvania Lightify Starting concurrent thread LightifyDirect Warning Unknown device type id: 105. Please report to https://github.com/tfriedel/python-lightify LightifyDirect Warning Unknown device type id: 115. Please report to https://github.com/tfriedel/python-lightify LightifyDirect Warning Unknown device type id: 77. Please report to https://github.com/tfriedel/python-lightify LightifyDirect Warning Couldn't unpack light status packet: LightifyDirect Warning struct.error: unpack requires a string argument of length 50 LightifyDirect Warning payload: 61204c6967687473000000000a004d656469612054560000000000000000 Sylvania Lightify Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last): File "plugin.py", line 297, in runConcurrentThread File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/SylvaniaLightify.indigoPlugin/Contents/Server Plugin/lightify/init.py", line 1309, in update_group_list File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode byte 0xa4 in position 2: invalid start byte

Sylvania Lightify Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds) ** End Error Block 1

NOTE - no new devices were actually added to my system so I suspect this is something different. There were a large number of recurring errors prior to the above Warnings about missing device types.. The errors were as seen below - potentially some type of memory corruption in my system with python? From what I can tell, the python utf8 errors in 'Error Block 2' persisted throughout the night repeatedly while the ones listed above for the missing device types in 'Error Block 1' occurred just once this morning - triggered via motion sensor as I entered a room.

Error Block 2


Traceback (most recent call last): File "plugin.py", line 297, in runConcurrentThread File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/SylvaniaLightify.indigoPlugin/Contents/Server Plugin/lightify/init.py", line 1309, in update_group_list File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/utf_8.py", line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode byte 0xa4 in position 2: invalid start byte

Sylvania Lightify Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds) Sylvania Lightify Starting concurrent thread Sylvania Lightify Error Error in plugin execution runConcurrentThread: ***** End Error Block 2

Anyhow, thought I'd pass along in case it is of any value

OleksandrBerchenko commented 5 years ago

@rbdubz3 Could you please take this file: https://raw.githubusercontent.com/OleksandrBerchenko/python-lightify/for_rbdubz3/lightify/__init__.py (I have added additional debug messages on warning level) and try to reproduce again?

It looks like we got from Lightify Gateway a response of unexpected length and structure.

Thanks!

rbdubz3 commented 5 years ago

@OleksandrBerchenko - will give it a shot and let you know.. BTW I haven't seen this before so may be difficult to recreate

OleksandrBerchenko commented 5 years ago

@rbdubz3 Did you have a chance to reproduce that issue again?

Thanks!

rbdubz3 commented 5 years ago

@OleksandrBerchenko - I honestly have no idea how to reproduce it and what started it in the first place. As I mentioned above, I suspect something was going on with python on my system as I saw the utf-8 errors prior to the errors from the Lightify library.

Maybe we just close this Issue and I can re-open if I see it in the future

OleksandrBerchenko commented 5 years ago

@rbdubz3 I think you have received a wrong packet from the gateway. Existing log is not enough to understand what exactly happened.

You may close the issue, but please continue to use my customized code - hopefully next time I will get enough data to debug.

Possibly we need slightly better error handling anyway - I will think about that.

Thanks!

rbdubz3 commented 5 years ago

closing this as I cannot reproduce it

OleksandrBerchenko commented 5 years ago

@rbdubz3 You can update the library from the custom to the latest version.

Thanks!

rbdubz3 commented 5 years ago

sounds good - thanks @OleksandrBerchenko .. BTW - are you guys planning a new release anytime soon?

OleksandrBerchenko commented 5 years ago

@rbdubz3 I have no plans yet. So just use the latest 1.0.7.2. Thanks!