zim514 / script.service.hue Goto Github PK
View Code? Open in Web Editor NEWKodi add-on for Philips Hue
License: MIT License
Kodi add-on for Philips Hue
License: MIT License
Describe the bug
sort of annoying to be told that a command to the bridge timed out and having to hit ok several times. I know some requests may be dropped / ignored - so if you find the time to add a setting to ignore timeout error reporting with a dialog (to log file is fine) would appreciate it.
thanks
View details in Rollbar: https://rollbar.com/krisyoung/script.service.hue/items/422/
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/lightgroup.py", line 247, in check_keep_lights_off_rule
scene_data = self.bridge.scenes[scene]()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.qhue/lib/qhue.py", line 72, in __call__
raise QhueException(
QhueException: QhueException: 3 -> resource, /scenes/-1, not available
View details in Rollbar: https://rollbar.com/krisyoung/script.service.hue/items/506/
Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.hue/service.py", line 9, in <module>
core.core() #Run Hue service
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 30, in core
commands(monitor, command)
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 38, in commands
bridge_discovered = kodiHue.bridgeDiscover(monitor)
File "/storage/.kodi/addons/script.service.hue/resources/lib/kodiHue.py", line 122, in bridgeDiscover
bridgeIP = _discoverNupnp()
File "/storage/.kodi/addons/script.service.hue/resources/lib/kodiHue.py", line 79, in _discoverNupnp
res = req.json()
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
JSONDecodeError: [Errno Expecting value] : 0Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
File "/usr/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
File "/usr/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
File "/usr/lib/python3.8/site-packages/simplejson/scanner.py", line 79, in scan_once
File "/usr/lib/python3.8/site-packages/simplejson/scanner.py", line 39, in _scan_once
JSONDecodeError: Expecting value: line 1 column 1 (char 0)Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/simplejson/scanner.py", line 37, in _scan_once
IndexError: string index out of range
Describe the bug
2023-05-19 20:00:09.554 T:150213 info <CWebserver[8080]>: Skipped 1 duplicate messages..
2023-05-19 20:00:09.554 T:150213 debug <CWebserver[8080]>: request received for /jsonrpc
2023-05-19 20:00:09.571 T:2742 warning <general>: RunScript called for a non-script addon 'script.service.hue'. This behaviour is deprecated.
2023-05-19 20:00:09.571 T:150232 debug <general>: Thread LanguageInvoker start, auto delete: false
2023-05-19 20:00:09.571 T:150232 debug <general>: initializing python engine.
2023-05-19 20:00:09.571 T:150232 debug <general>: CPythonInvoker(27, /storage/.kodi/addons/script.service.hue/service.py): start processing
2023-05-19 20:00:09.582 T:150232 debug <general>: -->Python Interpreter Initialized<--
2023-05-19 20:00:09.582 T:150232 debug <general>:
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27, /storage/.kodi/addons/script.service.hue/service.py): the source file to load is "/storage/.kodi/addons/script.service.hue/service.py"
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): full python path:
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): custom python path:
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.certifi/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.chardet/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.idna/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.pyrollbar/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.qhue/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.requests/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.six/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.module.urllib3/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /storage/.kodi/addons/script.service.hue
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /usr/share/kodi/addons/script.module.pil/lib
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): default python path:
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /usr/lib/python311.zip
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /usr/lib/python3.11
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /usr/lib/python3.11/lib-dynload
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): /usr/lib/python3.11/site-packages
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): adding args:
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): service.py
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27): discover
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27, /storage/.kodi/addons/script.service.hue/service.py): entering source directory /storage/.kodi/addons/script.service.hue
2023-05-19 20:00:09.582 T:150232 debug <general>: CPythonInvoker(27, /storage/.kodi/addons/script.service.hue/service.py): instantiating addon using automatically obtained id of "script.service.hue" dependent on version 3.0.0 of the xbmc.python api
2023-05-19 20:00:09.659 T:150232 debug <general>: [script.service.hue] Validate schedule. Schedule Enabled: False
2023-05-19 20:00:09.659 T:150232 debug <general>: [script.service.hue] Validate ambilight config. Enabled: False
2023-05-19 20:00:09.659 T:150232 debug <general>: [script.service.hue] Started with discover
2023-05-19 20:00:09.659 T:150232 debug <general>: [script.service.hue] Start discover
2023-05-19 20:00:09.661 T:150232 debug <general>: DialogProgress::Open called
2023-05-19 20:00:09.669 T:2742 debug <general>: ------ Window Init (DialogConfirm.xml) ------
2023-05-19 20:00:09.670 T:150232 debug <general>: [script.service.hue] In kodiHue discover_nupnp()
2023-05-19 20:00:09.812 T:2742 debug <general>: ------ Window Deinit (DialogAddonSettings.xml) ------
2023-05-19 20:00:12.947 T:150232 debug <general>: [script.service.hue][EXCEPTION] Service exception: Expecting value: line 1 column 1 (char 0)
2023-05-19 20:00:12.949 T:150232 debug <general>: [script.service.hue] Exception: <class 'simplejson.errors.JSONDecodeError'>, Expecting value: line 1 column 1 (char 0), , Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.hue/service.py", line 11, in <module>
core.core()
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 25, in core
_commands(monitor, command)
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 34, in _commands
hue_connection = hueconnection.HueConnection(monitor, silent=True, discover=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/script.service.hue/resources/lib/hueconnection.py", line 31, in __init__
self.discover()
File "/storage/.kodi/addons/script.service.hue/resources/lib/hueconnection.py", line 118, in discover
bridge_ip_found = self._discover_nupnp()
^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/script.service.hue/resources/lib/hueconnection.py", line 196, in _discover_nupnp
result = req.json()
^^^^^^^^^^
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/simplejson/__init__.py", line 514, in loads
File "/usr/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode
File "/usr/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-05-19 20:00:12.950 T:2742 debug <general>: ------ Window Init (DialogConfirm.xml) ------
2023-05-19 20:00:18.063 T:150213 debug <CWebserver[8080]>: request received for /jsonrpc
2023-05-19 20:00:20.213 T:2742 info <general>: Skipped 2 duplicate messages..
2023-05-19 20:00:20.213 T:2742 debug <general>: ------ Window Deinit (DialogConfirm.xml) ------
2023-05-19 20:00:20.250 T:150232 debug <general>: CPythonInvoker(27, /storage/.kodi/addons/script.service.hue/service.py): script successfully run
2023-05-19 20:00:20.250 T:150232 info <general>: CPythonInvoker(27, /storage/.kodi/addons/script.service.hue/service.py): waiting on thread 139739554367168
2023-05-19 20:00:20.493 T:2742 debug <general>: ------ Window Deinit (DialogConfirm.xml) ------
2023-05-19 20:00:23.654 T:150232 debug <general>: onExecutionDone(27, /storage/.kodi/addons/script.service.hue/service.py)
2023-05-19 20:00:23.663 T:150232 debug <general>: .
2023-05-19 20:00:23.680 T:150232 info <general>: Skipped 1 duplicate messages..
2023-05-19 20:00:23.680 T:150232 debug <general>: Python interpreter stopped
2023-05-19 20:00:23.680 T:150232 debug <general>: Thread LanguageInvoker 139738505803456 terminating
To Reproduce
Steps to reproduce the behavior:
N-UPnP discovery…
dialog comes upExpected behavior
Successful discovery
Screenshots
Na
System (please complete the following information):
Additional context
NA
View details in Rollbar: https://rollbar.com/krisyoung/script.service.hue/items/528/
Traceback (most recent call last):
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\service.py", line 11, in <module>
core.core()
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\resources\lib\core.py", line 25, in core
_commands(monitor, command)
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\resources\lib\core.py", line 38, in _commands
_service(monitor)
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\resources\lib\core.py", line 147, in _service
activate(light_groups)
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\resources\lib\core.py", line 205, in activate
g.activate()
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\resources\lib\lightgroup.py", line 140, in activate
self.onAVStarted()
File "D:\Kodi Media Center\portable_data\addons\script.service.hue\resources\lib\ambigroup.py", line 91, in onAVStarted
self.video_info_tag = self.getVideoInfoTag()
RuntimeError: Kodi is not playing any videofile
View details in Rollbar: https://app.rollbar.com/a/krisyoung/fix/item/script.service.hue/675
Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.hue/resources/lib/hue.py", line 62, in make_api_request
response = self.session.request(method, url, timeout=TIMEOUT, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/storage/.kodi/addons/script.module.requests/lib/requests/models.py", line 445, in prepare_url
raise InvalidURL(f"Invalid URL {url!r}: No host supplied")
InvalidURL: Invalid URL 'http:///api/': No host supplied
Not all 4K content, could be HDR or H265 only. Needs to be investigated
View details in Rollbar: https://rollbar.com/krisyoung/script.service.hue/items/411/
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/service.py", line 11, in <module>
core.core()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/core.py", line 23, in core
_commands(monitor, command)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/core.py", line 31, in _commands
bridge_discovered = hue.discover_bridge(monitor)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/hue.py", line 121, in discover_bridge
bridge_ip = _discover_nupnp()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/hue.py", line 93, in _discover_nupnp
result = req.json()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.requests/lib/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.8/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
JSONDecodeError: Expecting value: line 1 column 1 (char 0)Traceback (most recent call last):
File "/data/user/0/org.xbmc.kodi/cache/apk/assets/python3.8/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
StopIteration: 0
This is not a bug but a feature request. It would be nice to be able to choose wether or not lights should be set to the chosen scene if they were off before.
My use case is when I use my projector, my harmony remote will shut off the lights and then, when I play a file, the addon will switch them on using the "play" scene whereas I would prefer them to stay off. On the contrary, when using my tv, the lights are on before lanching my media and I would like the scene to be applied.
Hope it makes sense; Thanks for your work!
Describe the bug
This is not a bug with the addon itself, but with the ikea trådfri bulbs.
The issue is also present when using the default hue app when you change scene.
For some reason the bulbs does not like when you change the brightness, color and transition in the same call.
So if you set it to lets say turn color to green, brightness to 1% and transition to 1 second.
The lights will turn green after 1 second, but they will not change brightness.
This is what a guy on the home assistant forum has come up with
https://community.home-assistant.io/t/ikea-light-on-hue-hub-scene-doesnt-change-brightness/32755/3
Would be really awesome to somehow add this workaround to the addon, maybe a checkbox if using ikea trådfri bulbs?
Kind regards
I added the bridge ip in the config and it shows up in kodi. Now when I try to select a scene it says that no bridge is configured. Discover Hue Bridge results in bridge not found. Ip is correct though...
After installing the add-on It is not able to find the hue bridge. The bridge is connected to a second local LAN (different eth interface) with no internet connection. Suspecting that the add-on would only try to find the bridge over one interface I have disabled all interfaces except the one connected directly to the hue bridge, but the add-on is still unable to find it. The setup is like this: Kodi eth1 10.0.0.1 <----> hue bridge 10.0.0.2 I'm not able to enter the bridge IP (10.0.0.2) manually either.
Thanks!
Describe the bug
Selecting a scene yields in an exception:
DEBUG <general>: [script.service.hue] Started with sceneSelect
DEBUG <general>: [script.service.hue] in connect_bridge() with settings: bridgeIP: XXX.XXX.XXX.XXX, bridgeUse>
DEBUG <general>: [script.service.hue] Bridge Found! Hue API version: 1.52.0
DEBUG <general>: [script.service.hue] in Connect(): Checking User
DEBUG <general>: [script.service.hue] in user_test() Attempt initial connection
DEBUG <general>: [script.service.hue] Hue User Authorized. Bridge Zigbee Channel: X
DEBUG <general>: [script.service.hue] Successfully connected to Hue Bridge: XXX.XXX.XXX.XXX
DEBUG <general>: [script.service.hue] In selectHueScene{}
DEBUG <general>: [script.service.hue][EXCEPTION] Service exception: 'version'
The source of this exception seems to be the check h_scene['version'] == 2
here:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Show available scenes.
System (please complete the following information):
Additional context
Out of interest, why are LightScene
s required? They do not appear in neither the Hue Essentials
nor the official Phillips Hue
app (or I am unable to find them), making it inconvenient to adjust the settings. I needed to save the diyHue configuration and adjust the scenes.yaml
file manually.
Describe the bug
When the service is started, an error message appears with text "local variable 'error' referenced before assignment"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the add-on to start without error messages and be working.
Screenshots
System (please complete the following information):
Additional context
I also tried 0.14.0.dev1. Tried uninstalling the addon including its settings and reinstalling. Same error. Error also appears directly after rebooting the Vero4K. I can get into the configure screen, it will detect my bridge and I'm able to choose scenes. But when I try to save the settings, the error message appears again and the settings are not saved.
Hi,
thanks for your effort but I can't get any of the available hue plugins to work with a rpi 4,
it worked fine on a rpi3 with ambilight
2019-12-23 19:02:28.069 T:2273862512 NOTICE: Creating Demuxer
2019-12-23 19:02:28.070 T:2273862512 NOTICE: Opening stream: 1 source: 256
2019-12-23 19:02:28.306 T:2273862512 NOTICE: Creating video codec with codec id: 27
2019-12-23 19:02:28.306 T:2273862512 NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
2019-12-23 19:02:28.309 T:2273862512 NOTICE: Creating video thread
2019-12-23 19:02:28.309 T:2304762736 NOTICE: running thread: video_thread
2019-12-23 19:02:28.309 T:2273862512 NOTICE: Opening stream: 2 source: 256
2019-12-23 19:02:28.509 T:2273862512 NOTICE: Finding audio codec for: 86018
2019-12-23 19:02:28.510 T:2273862512 NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2019-12-23 19:02:28.510 T:2273862512 NOTICE: Creating audio thread
2019-12-23 19:02:28.511 T:2332545904 NOTICE: running thread: CVideoPlayerAudio::Process()
2019-12-23 19:02:28.614 T:2775130992 NOTICE: Librespot: playback started
2019-12-23 19:02:28.614 T:2775130992 NOTICE: Librespot: stop librespot
2019-12-23 19:02:28.794 T:2304762736 NOTICE: CDecoder::Open - fmt:0
2019-12-23 19:02:28.803 T:2332545904 NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2019-12-23 19:02:28.803 T:2332545904 NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through)
2019-12-23 19:02:28.874 T:2775130992 NOTICE: Librespot: playback started
2019-12-23 19:02:28.895 T:2707989360 ERROR: INFO:script.service.hue:Ambilight AV Started. Group enabled: 1 , isPlayingVideo: 1, isPlayingAudio: 0, self.mediaType: 1,self.playbackType(): 1
2019-12-23 19:02:28.896 T:2707989360 ERROR: INFO:script.service.hue:Ambilight Settings: Interval: 0.002, transitionTime: 2
2019-12-23 19:02:28.959 T:2707989360 ERROR: DEBUG:script.service.hue:Schedule: 0, daylightDiable: 0, daylight: False, startTime: 18:00, endTime: 22:00
2019-12-23 19:02:28.959 T:2707989360 ERROR: DEBUG:script.service.hue:Schedule not enabled
2019-12-23 19:02:28.960 T:2707989360 ERROR: DEBUG:script.service.hue:InfoTag contents: duration: 3, mediaType: video, file:
2019-12-23 19:02:28.961 T:2707989360 ERROR: DEBUG:script.service.hue:Video Activation settings(3): minDuration: 0, Movie: 1, Episode: 1, MusicVideo: 1, Other: 1
2019-12-23 19:02:28.961 T:2707989360 ERROR: DEBUG:script.service.hue:Video Activation (3): Duration: 3, mediaType: video
2019-12-23 19:02:28.961 T:2707989360 ERROR: DEBUG:script.service.hue:Video activation: True
2019-12-23 19:02:28.962 T:2248139632 ERROR: DEBUG:script.service.hue:_ambiLoop started
2019-12-23 19:02:28.963 T:2707989360 ERROR: INFO:script.service.hue:In KodiGroup[0], onPlaybackStarted. Group enabled: 1,startBehavior: 0 , isPlayingVideo: 1, isPlayingAudio: 0, self.mediaType: 1,self.playbackType(): 1
2019-12-23 19:02:28.963 T:2707989360 ERROR: DEBUG:script.service.hue:InfoTag: <xbmc.InfoTagVideo object at 0x936ef710>
2019-12-23 19:02:28.963 T:2707989360 ERROR: DEBUG:script.service.hue:InfoTag contents: duration: 3, mediaType: video, file:
2019-12-23 19:02:28.963 T:2707989360 ERROR: DEBUG:script.service.hue:Video Activation settings(0): minDuration: 0, Movie: 1, Episode: 1, MusicVideo: 1, Other: 1
2019-12-23 19:02:28.964 T:2707989360 ERROR: DEBUG:script.service.hue:Video Activation (0): Duration: 3, mediaType: video
2019-12-23 19:02:28.964 T:2707989360 ERROR: DEBUG:script.service.hue:Video activation: True
2019-12-23 19:02:28.965 T:2248139632 ERROR: DEBUG:script.service.hue:aspect_ratio: 1.77777779102, Capture Size: (400,224), expected_capture_size: 358400
2019-12-23 19:02:28.972 T:2707989360 ERROR: DEBUG:script.service.hue:Schedule: 0, daylightDiable: 0, daylight: False, startTime: 18:00, endTime: 22:00
2019-12-23 19:02:28.973 T:2707989360 ERROR: DEBUG:script.service.hue:Schedule not enabled
2019-12-23 19:02:28.975 T:2775130992 NOTICE: Librespot: playback started
2019-12-23 19:02:29.197 T:2304762736 NOTICE: Previous line repeats 2 times. ```
View details in Rollbar: https://rollbar.com/krisyoung/script.service.hue/items/557/
Traceback (most recent call last):
File "/storage/.kodi/addons/script.service.hue/service.py", line 11, in <module>
core.core()
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 27, in core
_service(monitor)
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 134, in _service
new_daylight = hue_connection.get_daylight()
File "/storage/.kodi/addons/script.service.hue/resources/lib/hueconnection.py", line 483, in get_daylight
daylight = self.bridge.sensors['1']()['state']['daylight']
File "/storage/.kodi/addons/script.module.qhue/lib/qhue.py", line 60, in __call__
r = self.session.get(url, timeout=self.timeout)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/adapters.py", line 507, in send
raise ConnectTimeout(e, request=request)
ConnectTimeout: HTTPConnectionPool(host='192.168.0.98', port=80): Max retries exceeded with url: /api/CswPYW69VuXFcc8P1mTmLVQtyiOhaIS7VC9THgLx/sensors/1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x37124c8>, 'Connection to 192.168.0.98 timed out. (connect timeout=1)'))Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.requests/lib/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
MaxRetryError: HTTPConnectionPool(host='192.168.0.98', port=80): Max retries exceeded with url: /api/CswPYW69VuXFcc8P1mTmLVQtyiOhaIS7VC9THgLx/sensors/1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x37124c8>, 'Connection to 192.168.0.98 timed out. (connect timeout=1)'))Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.11/http/client.py", line 1282, in request
File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request
File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders
File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output
File "/usr/lib/python3.11/http/client.py", line 975, in send
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 179, in _new_conn
raise ConnectTimeoutError(
ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x37124c8>, 'Connection to 192.168.0.98 timed out. (connect timeout=1)')Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: timed outTraceback (most recent call last):
File "/storage/.kodi/addons/script.service.hue/resources/lib/core.py", line 131, in _service
new_daylight = hue_connection.get_daylight()
File "/storage/.kodi/addons/script.service.hue/resources/lib/hueconnection.py", line 483, in get_daylight
daylight = self.bridge.sensors['1']()['state']['daylight']
File "/storage/.kodi/addons/script.module.qhue/lib/qhue.py", line 60, in __call__
r = self.session.get(url, timeout=self.timeout)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/storage/.kodi/addons/script.module.requests/lib/requests/adapters.py", line 507, in send
raise ConnectTimeout(e, request=request)
ConnectTimeout: HTTPConnectionPool(host='192.168.0.98', port=80): Max retries exceeded with url: /api/CswPYW69VuXFcc8P1mTmLVQtyiOhaIS7VC9THgLx/sensors/1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x331e988>, 'Connection to 192.168.0.98 timed out. (connect timeout=1)'))Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.requests/lib/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
MaxRetryError: HTTPConnectionPool(host='192.168.0.98', port=80): Max retries exceeded with url: /api/CswPYW69VuXFcc8P1mTmLVQtyiOhaIS7VC9THgLx/sensors/1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x331e988>, 'Connection to 192.168.0.98 timed out. (connect timeout=1)'))Traceback (most recent call last):
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/storage/.kodi/addons/script.module.urllib3/lib/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/lib/python3.11/http/client.py", line 1282, in request
File "/usr/lib/python3.11/http/client.py", line 1328,
Got this snippet from the Kodi Logs:
Cant figure out why it cant find PIL.
ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'ModuleNotFoundError'>
Error Contents: No module named 'PIL'
Traceback (most recent call last):
File "/opt/Kodi19L/.kodi/addons/script.service.hue/service.py", line 8, in
from resources.lib import core, reporting
File "/opt/Kodi19L/.kodi/addons/script.service.hue/resources/lib/core.py", line 12, in
from resources.lib import ambigroup, lightgroup
File "/opt/Kodi19L/.kodi/addons/script.service.hue/resources/lib/ambigroup.py", line 12, in
from PIL import Image
ModuleNotFoundError: No module named 'PIL'
-->End of Python script error report<--
DEBUG : onExecutionDone(13, /opt/Kodi19L/.kodi/addons/script.service.hue/service.py)
I have Kodi (LibreELEC) on a Raspberry PI 3 and Kodi 19 (with Python 3) is not around the corner anytime soon.
Is it possible to have the old version of this addon back? Please.
View details in Rollbar: https://rollbar.com/krisyoung/script.service.hue/items/480/
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/service.py", line 11, in <module>
core.core()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/core.py", line 25, in core
_service(monitor)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.service.hue/resources/lib/core.py", line 85, in _service
service_enabled = CACHE.get(f"{ADDONID}.service_enabled")
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.simplecache/lib/simplecache.py", line 67, in get
result = self._get_db_cache(endpoint, checksum, cur_time, json_data)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.simplecache/lib/simplecache.py", line 136, in _get_db_cache
cache_data = self._execute_sql(query, (endpoint,))
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.simplecache/lib/simplecache.py", line 231, in _execute_sql
with self._get_database() as _database:
AttributeError: __enter__
Sorry if I'm a bit dim, but can the add-on do these basics with white lights?:
I'm sure that many people will greatly appreciate the fancy options and ambilight features, but I only need 1-3. And I'll need to both invest in a hub upgrade (from v1 to v2) and upgrade my LibreElec from Krypton to Leia before installing your add-on. It'd be nice to know that it'll be worth the time and expense.
While I'm here, at present I'm using Martin Polednik's Kodi Philips Hue add-on with my LE box. While it works just fine it unfortunately can't differentiate between video types. Dimming to 0% is fine for Movies and TV Shows, but not so great for Live TV: I'd really rather not have to sit in the dark every time I want to catch up on the news. Which is why I was wondering if you could provide an option to define separate actions for each video type. Or just for Live TV.
Thanks for the help.
Instead of one generic ambi-light color for all assigned lights, it would be nice to have the left and right screen edges used for the color calculation and the ability to assign a color to that light based on the screen edge average color, creating a more immersive feel when using two lights at either side of the tv.
This would more closely resemble the implementation used in the Philips TV's or the need for the HDMI Sync Box.
Since a few weeks, it seems that the daylight setting has the inverted effect. When the setting is enabled, the lights perform their assigned actions during daylight but don't do anything after sunset.
I am on one of the latest Omega nightlies (for Dolby Vision support) on an NVIDIA Shield Pro.
Describe the bug
During startup a message: "Unknown colour gamut for light -1" is shown.
To Reproduce
Steps to reproduce the behaviour:
The same message appears if I try to set a scene name for Play/Pause/Stop. After the message appears I' thrown out of the settings menu
Expected behaviour
No message!
(As it was before updated to 1.1.13) unfortunately I can't remember which version was ok.
Screenshots
If applicable, add screenshots to help explain your problem.
System (please complete the following information):
Is your feature request related to a problem? Please describe.
It doesn't find the diyHue bridge, which is found by the official Hue app.
I also can't type an IP. It would be great to be able to connect to this application. It would provide the ability to use cheaper lights than Philips Hues.
I have the latest version of kodi 19 matrix running on a Pi4. I get this error. I am not sure what to try to get this to install. Any suggestions thank you.
I usually have Colorloop from Hue Labs enabled on my living room lights, and noticed some "bleed through" when the Ambilight color in Kodi stays the same/similar for a while, and Colorloop will fade to different colors in the background.
After some googling I learned that Hue Labs effects set up a dummy sensor on the bridge, and this can be used to enable and disable the effect.
I hacked this into the addon with the following patch to resources/lib/AmbiGroup.py
:
@@ -48,6 +48,9 @@
if self.isPlayingVideo():
if self.enabled and self.checkActiveTime() and self.checkVideoActivation(self.videoInfoTag):
+ # disable colorloop
+ self.bridge.sensors[70].state(status=0)
+
if self.forceOn:
self._force_on(self.ambiLights, self.bridge, self.savedLightStates)
@@ -95,6 +98,9 @@
logger.error("onPlaybackStopped: Hue call fail: {}".format(exc))
reporting.process_error(exc)
+ # enable colorloop
+ self.bridge.sensors[70].state(status=1)
+
def loadSettings(self):
logger.debug("AmbiGroup Load settings")
Would you accept a PR to add this? The 70
here is the ID of the sensor for the Colorloop "instance" of my living room, so this would need to be configurable. I'm new to Kodi addon development but would be happy to give this a go.
I could also easily script this when launching/quitting Kodi, but I'd rather only toggle the effect during actual video playback. I also looked for generic "callback" addons which let you execute custom commands on events, but couldn't find anything supported on Kodi 19.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.