Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown devices types 105, 115, 77 #18

Closed
rbdubz3 opened this issue Mar 9, 2019 · 9 comments
Closed

Unknown devices types 105, 115, 77 #18

rbdubz3 opened this issue Mar 9, 2019 · 9 comments

Comments

@rbdubz3
Copy link

rbdubz3 commented Mar 9, 2019

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
Copy link

@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
Copy link
Author

rbdubz3 commented Mar 10, 2019

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

@OleksandrBerchenko
Copy link

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

Thanks!

@rbdubz3
Copy link
Author

rbdubz3 commented Mar 16, 2019

@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
Copy link

@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
Copy link
Author

rbdubz3 commented Mar 22, 2019

closing this as I cannot reproduce it

@rbdubz3 rbdubz3 closed this as completed Mar 22, 2019
@OleksandrBerchenko
Copy link

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

Thanks!

@rbdubz3
Copy link
Author

rbdubz3 commented Mar 26, 2019

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

@OleksandrBerchenko
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants