script.kodi.hue.ambilight
script.kodi.hue.ambilight copied to clipboard
Unable to discover bridge with upnp, nupnp fallback works
Hi, I don't know why, but the bridge discovery with upnp does not work for me. But even worse the fallback method in bridge.py is never actually called.
I had to edit the code to call the _discover_nupnp() method first and now my bridge gets discovered.
_discover_upnp() does not work:
14:09:49.395 T:1941459520 WARNING: RunScript called for a non-script addon 'script.kodi.hue.ambilight'. This behaviour is deprecated.
14:09:49.396 T:1533174656 DEBUG: Thread LanguageInvoker start, auto delete: false
14:09:49.396 T:1533174656 INFO: initializing python engine.
14:09:49.397 T:1533174656 DEBUG: CPythonInvoker(28, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): start processing
14:09:49.495 T:1533174656 DEBUG: -->Python Interpreter Initialized<--
14:09:49.496 T:1533174656 DEBUG: CPythonInvoker(28, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): the source file to load is "/storage/.kodi/addons/script.kodi.hue.ambilight/default.py"
14:09:49.498 T:1533174656 DEBUG: CPythonInvoker(28, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): setting the Python path to /storage/.kodi/addons/script.kodi.hue.ambilight:/storage/.kodi/addons/script.module.certifi/lib:/storage/.kodi/addons/script.module.chardet/lib:/storage/.kodi/addons/script.module.idna/lib:/storage/.kodi/addons/script.module.requests/lib:/storage/.kodi/addons/script.module.urllib3/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
14:09:49.498 T:1533174656 DEBUG: CPythonInvoker(28, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): entering source directory /storage/.kodi/addons/script.kodi.hue.ambilight
14:09:49.499 T:1533174656 DEBUG: CPythonInvoker(28, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): instantiating addon using automatically obtained id of "script.kodi.hue.ambilight" dependent on version 2.1.0 of the xbmc.python api
14:09:50.942 T:1533174656 DEBUG: Kodi Hue: In .(argv=['default.py', 'action=discover']) service started, version: 1.0
14:09:50.950 T:1533174656 DEBUG: CAddonSettings[script.kodi.hue.ambilight]: loading setting definitions
14:09:50.950 T:1533174656 DEBUG: CAddonSettings[script.kodi.hue.ambilight]: trying to load setting definitions from old format...
14:09:50.984 T:1941459520 DEBUG: ------ Window Init (DialogNotification.xml) ------
14:09:51.027 T:1941459520 DEBUG: GLES: Extension Support Test - GL_EXT_texture_format_BGRA8888 YES
14:09:53.255 T:1941459520 DEBUG: ------ Window Deinit (DialogNotification.xml) `------`
_discover_nupnp() does work:
14:38:05.367 T:1941459520 WARNING: RunScript called for a non-script addon 'script.kodi.hue.ambilight'. This behaviour is deprecated.
14:38:05.368 T:1354335104 DEBUG: Thread LanguageInvoker start, auto delete: false
14:38:05.370 T:1354335104 INFO: initializing python engine.
14:38:05.371 T:1354335104 DEBUG: CPythonInvoker(30, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): start processing
14:38:05.445 T:1354335104 DEBUG: -->Python Interpreter Initialized<--
14:38:05.445 T:1354335104 DEBUG: CPythonInvoker(30, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): the source file to load is "/storage/.kodi/addons/script.kodi.hue.ambilight/default.py"
14:38:05.447 T:1354335104 DEBUG: CPythonInvoker(30, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): setting the Python path to /storage/.kodi/addons/script.kodi.hue.ambilight:/storage/.kodi/addons/script.module.certifi/lib:/storage/.kodi/addons/script.module.chardet/lib:/storage/.kodi/addons/script.module.idna/lib:/storage/.kodi/addons/script.module.requests/lib:/storage/.kodi/addons/script.module.urllib3/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
14:38:05.447 T:1354335104 DEBUG: CPythonInvoker(30, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): entering source directory /storage/.kodi/addons/script.kodi.hue.ambilight
14:38:05.448 T:1354335104 DEBUG: CPythonInvoker(30, /storage/.kodi/addons/script.kodi.hue.ambilight/default.py): instantiating addon using automatically obtained id of "script.kodi.hue.ambilight" dependent on version 2.1.0 of the xbmc.python api
14:38:05.992 T:1928328064 NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:1102)
14:38:06.893 T:1354335104 NOTICE: Previous line repeats 1 times.
14:38:06.893 T:1354335104 DEBUG: Kodi Hue: In .(argv=['default.py', 'action=discover']) service started, version: 1.0
14:38:06.900 T:1354335104 DEBUG: CAddonSettings[script.kodi.hue.ambilight]: loading setting definitions
14:38:06.900 T:1354335104 DEBUG: CAddonSettings[script.kodi.hue.ambilight]: trying to load setting definitions from old format...
14:38:06.948 T:1941459520 DEBUG: ------ Window Init (DialogNotification.xml) ------
14:38:06.986 T:1941459520 DEBUG: GLES: Extension Support Test - GL_EXT_texture_format_BGRA8888 YES
14:38:07.183 T:1354335104 ERROR: /storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
14:38:12.299 T:1941459520 DEBUG: ------ Window Deinit (DialogNotification.xml) ------
14:38:13.398 T:1941459520 DEBUG: ------ Window Init (DialogNotification.xml) ------
14:38:15.650 T:1941459520 DEBUG: ------ Window Deinit (DialogNotification.xml) ------
14:38:16.437 T:1941459520 DEBUG: ------ Window Init (DialogNotification.xml) ------
14:38:18.682 T:1941459520 DEBUG: ------ Window Deinit (DialogNotification.xml) ------
14:38:19.516 T:1941459520 DEBUG: ------ Window Init (DialogNotification.xml) ------
14:38:21.782 T:1941459520 DEBUG: ------ Window Deinit (DialogNotification.xml) ------
14:38:22.631 T:1941459520 DEBUG: ------ Window Init (DialogNotification.xml) ------
14:38:23.058 T:1354335104 DEBUG: Kodi Hue: In Hue.update_controllers() instantiated following controllers <TheaterController {}> <AmbilightController {}> <StaticController {}>
14:38:23.058 T:1354335104 DEBUG: Kodi Hue: In MyPlayer.__init__()
14:38:24.898 T:1941459520 DEBUG: ------ Window Deinit (DialogNotification.xml) ------
I see this a bit late, but could you actually just delete the non-working method and just let the _nupnp one do the work, then make a Pull Request here ? That'll be merged soon I guess ;)