• 1
  • 21
  • 22
  • 23
  • 24(current)
  • 25
Release Philips Hue Service & Ambilight
@cooltbone I'm not sure; I've never tried that and I'm not too familiar with the keymap xml. Could you include the whole SetProperty call you have configured in your keymap? It expects a particular window ID (10000). In the script it's set when it creates the cache_window object but looking at the docs it looks like you can specify it with a 3rd optional parameter

Something like this should work
python:
SetProperty("script.service.hue.action","[play,1]", 10000)

You can also try uncommenting these log lines (set, get, json error), setting Kodi to debug log level, and having a look at what it's receiving and setting.
Reply
I currently have

python:
SetProperty("script.service.hue.action","[play]")

Which works with the workaround I have above.

Trying 
python:
SetProperty("script.service.hue.action","[play,1]")
or
python:
SetProperty("script.service.hue.action","[play,1]",10000)

Comes up with error "Window Translator: Can't find window 1]" in the logs. It seems the property doesn't consider the quotes when dealing with commas.

I might post in the general support forum.
Reply
Yeah, it does look like a parsing error. 

This shouldwork:

Code:
SetProperty("script.service.hue.action", '["play",1]', 10000)

The single quotes should make python ignore the inner double quotes, and the double quotes are technically correct JSON.
 
If it doesn't, it might be related to how keymap files are parsed at which point it may be worth opening an issue.
Reply
Unfortunately this add-on does not work with Nvidia Shield.
You have to turn off "hardware acceleration (surface)" and then 4K videos become unplayable because of lag/stuttering.

It would be great to have an update supporting the hardware acceleration on Nvidia Shield.
Reply
Hi, I got a new device and am trying to get this working again, like I actually did the past few years.
It seems I can trigger the scenes within the addon with the Video Scenes - Play/Pause/Stop
But when I try to play a movie or tvshow it just does nothing.

I see the following error in kodi.log when starting the movie:
 
Code:
2024-09-25 20:28:51.500 T:2718    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!                                           
                                                   Error Type: <class 'TypeError'>                                                            
                                                   Error Contents: 'bool' object is not callable                                              
                                                   Traceback (most recent call last):                                                         
                                                     File "/storage/.kodi/addons/script.service.hue/resources/lib/lightgroup.py", line 63, in
                                                       if self.activation_check.validate(play_scene):                                         
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          
                                                     File "/storage/.kodi/addons/script.service.hue/resources/lib/lightgroup.py", line 312, in
                                                       if skip_scene_if_all_off and not skip_scene_if_all_off(scene, all_light_states):       
                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        
                                                   TypeError: 'bool' object is not callable                                                   
                                                   -->End of Python script error report<--

I see the following error in kodi.log when stopping the movie:
Code:
2024-09-25 20:29:12.209 T:2718    error <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!                                           
                                                   Error Type: <class 'TypeError'>                                                            
                                                   Error Contents: 'bool' object is not callable                                              
                                                   Traceback (most recent call last):                                                         
                                                     File "/storage/.kodi/addons/script.service.hue/resources/lib/lightgroup.py", line 109, in
                                                       if self.activation_check.validate(stop_scene):                                         
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                          
                                                     File "/storage/.kodi/addons/script.service.hue/resources/lib/lightgroup.py", line 312, in
                                                       if skip_scene_if_all_off and not skip_scene_if_all_off(scene, all_light_states):       
                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        
                                                   TypeError: 'bool' object is not callable                                                   
                                                   -->End of Python script error report<--
LG 77G1 • Onkyo TX-RZ70 • Q Acoustics F:2050i C:2000Ci R:2020i A:QI65C • 2x BK Elec XXLS400-DF
Vero V (OSMC) • Nvidia Shield TV Pro (2019) • Sony UBP-X800M2 • Sony PlayStation 5
Reply
Checking the error I disabled 'Don´t enable scene if any light is off' ... that fixed it, so the fault seems to be in that check.
LG 77G1 • Onkyo TX-RZ70 • Q Acoustics F:2050i C:2000Ci R:2020i A:QI65C • 2x BK Elec XXLS400-DF
Vero V (OSMC) • Nvidia Shield TV Pro (2019) • Sony UBP-X800M2 • Sony PlayStation 5
Reply
Hi @Theetjuh

Thanks for letting me know and sharing your logs, that helped me find the problem quickly. There were a number of bugs with those options that should now be fixed in version 2.0.11 and above, available on github.
Reply
Forgive me if this has already been addressed, but I am having some issues I noticed with the Hue Service Add-on. It had been working great for a long time, until I recently noticed that my Hue lights weren't adjusting when I Pause or Stop playback in Kodi (Basically, my setup is to activate a "Dim" scene when I pause, and a "Bright" scene when I stop. During play, all lights should be off). I don't know exactly when it stopped working, as I've been too busy, but I'm just now getting around to troubleshooting. I reconnected my bridge, and it found it. I swapped scenes, and it saw them in the config menu. But it still wasn't working. I then turned on the logging, and I got a popup message that the scenes couldn't be found. After some playing around, I realized I didn't have the "Play" settings enabled (since I just want all lights to be off for that, and it used to just work). So I enabled it, and my errors went away, and the scenes started working as they should.

The main issue now is that Hue will not let me create a scene where lights are at 0% brightness. Did some settings get changed in the Add-on, to where I can't say "Turn off Scene"? I feel like this all used to work before. Another issue I noticed is that the config settings in the Add-on don't get saved all the time. Even after selecting "OK", my settings are sometimes set back to what I had previously. Are these known issues, and is there a workaround? (Edit: just to note that I have already updated to 2.0.11)
Reply
Hi @MechanicalWhispers

Recently, I had to change the Add-on to a new Hue API version, and unfortunately this didn't allow for the scenes to be carried over. Philips will deprecate the old version so it had to be done sooner or later, and allows for supporting more modern scenes, including the ones with dynamic effects. So it's quite likely that you had to reconfigure some options with the update version. Sadly I missed some bugs with the scene activation as well and certain settings aren't working correctly. When that's gotten more testing I'll request the repo updated as well.

As for scenes with 0 brightness, this seems to be a limitation in the Hue App. However, you can do it in other apps. I recommend All 4 Hue or Hue Esentials.
Reply
Actually I just tried creating a scene with 'off' lights in the official Hue app and it works for me. You just have to make sure the light is part of the scene and when editing the scene, set the toggle for that particular light to 'off' rather than try to set the brightness to 0. I was able to create a new scene and edit existing scenes this way.
Reply
Weird, I've been trying to create a scene again and again, with the lights off, and it keeps giving me an error "Have at least one light on in order to save a scene."

Edit: It's definitely a limitation of the Hue app. I just downloaded All 4 Hue, and it let me turn the lights off in my scene. Thanks for all the work on this great Add-on!
Reply
Ohh I see. I made a scene with some lights off, I guess that's where the limitation is. Since there are so many other apps that allow for adjusting scenes out there with better UI than I could make in Kodi, I didn't try to tackle that. I'll mention it in the documentation though since you're not the first to ask.
Reply
Hi,

I am using 1 lightstrip behind the TV and I am wondering if its also possible to get the lights more detailed while mounted behind the TV?
I think the Sync box is doing this?

Thank you
Reply
Sorry no, I can't replicate what a 250$ USD does in my free time
Reply
Hi Snapcase,

thanks for the great plugin! I have one issue, though:

I've created two different 'play' scenes, one for videos and one for music. when I activate music actions in settings, the music scene is used for videos as well. what am I am missing here?

TIA!

-Erik
Reply
  • 1
  • 21
  • 22
  • 23
  • 24(current)
  • 25

Logout Mark Read Team Forum Stats Members Help
Philips Hue Service & Ambilight0