sanghviharshit / script.kodi.lifx.ambilight

💡📺🌈Kodi add-on for Lifx lights with ambilight support.
https://bit.ly/kodilifx
GNU General Public License v2.0
33 stars 13 forks source link

Bulbs detected, but not working #3

Closed edent closed 6 years ago

edent commented 7 years ago

Running OpenElec 6.0.3.

It discovered all 5 of my bulbs, but then told me to check the error logs.

I restarted, and it appears to work properly. Just thought this might be useful for anyone else having the same issue.

15:17:44 T:140323007223552  NOTICE: Kodi Lifx service started, version: 0.1.1
15:17:44 T:140323007223552  NOTICE: Discovering lights...
15:17:50 T:140323007223552   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IOError'>
                                            Error Contents: WorkflowException: Did not receive <class 'lifxlan.msgtypes.LightStatePower'> in response to <class 'lifxlan.msgtypes.LightGetPower'>
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/default.py", line 506, in <module>
                                                hue = Hue(settings, args)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 51, in __init__
                                                self.update_settings()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 155, in update_settings
                                                self.light[index] = Light(bulb, self.settings)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 219, in __init__
                                                self.get_current_setting()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 226, in get_current_setting
                                                power_on = True if self.light.get_power() > 0 else False
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/lifxlan/light.py", line 35, in get_power
                                                response = self.req_with_resp(LightGetPower, LightStatePower)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/lifxlan/device.py", line 427, in req_with_resp
                                                raise IOError("WorkflowException: Did not receive {0} in response to {1}".format(str(response_type), str(msg_type)))
                                            IOError: WorkflowException: Did not receive <class 'lifxlan.msgtypes.LightStatePower'> in response to <class 'lifxlan.msgtypes.LightGetPower'>
                                            -->End of Python script error report<--
15:18:00 T:140324190004992   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IOError'>
                                            Error Contents: WorkflowException: Did not receive <class 'lifxlan.msgtypes.LightStatePower'> in response to <class 'lifxlan.msgtypes.LightGetPower'>
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/default.py", line 67, in onSettingsChanged
                                                hue.update_settings()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 155, in update_settings
                                                self.light[index] = Light(bulb, self.settings)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 219, in __init__
                                                self.get_current_setting()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 226, in get_current_setting
                                                power_on = True if self.light.get_power() > 0 else False
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/lifxlan/light.py", line 35, in get_power
                                                response = self.req_with_resp(LightGetPower, LightStatePower)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/lifxlan/device.py", line 427, in req_with_resp
                                                raise IOError("WorkflowException: Did not receive {0} in response to {1}".format(str(response_type), str(msg_type)))
                                            IOError: WorkflowException: Did not receive <class 'lifxlan.msgtypes.LightStatePower'> in response to <class 'lifxlan.msgtypes.LightGetPower'>
                                            -->End of Python script error report<--
15:18:03 T:140324198397696   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IOError'>
                                            Error Contents: WorkflowException: Did not receive <class 'lifxlan.msgtypes.LightState'> in response to <class 'lifxlan.msgtypes.LightGet'>
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/default.py", line 67, in onSettingsChanged
                                                hue.update_settings()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 155, in update_settings
                                                self.light[index] = Light(bulb, self.settings)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 219, in __init__
                                                self.get_current_setting()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/hue.py", line 229, in get_current_setting
                                                color = self.light.get_color()
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/lifxlan/light.py", line 72, in get_color
                                                response = self.req_with_resp(LightGet, LightState)
                                              File "/storage/.kodi/addons/sanghviharshit-script.kodi.lifx.ambilight-475be94/resources/lib/lifxlan/device.py", line 427, in req_with_resp
                                                raise IOError("WorkflowException: Did not receive {0} in response to {1}".format(str(response_type), str(msg_type)))
                                            IOError: WorkflowException: Did not receive <class 'lifxlan.msgtypes.LightState'> in response to <class 'lifxlan.msgtypes.LightGet'>
                                            -->End of Python script error report<--
sanghviharshit commented 7 years ago

Thanks for the logs. Looks like it threw an error because some of the bulbs were offline. I need better exception handling. [Reference - https://github.com/mclarkk/lifxlan/issues/15]

sanghviharshit commented 6 years ago

This should be fixed now with v1.0.3. Also, new version v1.0.0 releasing soon which does a great job at exception handling.