• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 24
Release Philips Hue Service & Ambilight
#46
(2019-08-03, 06:20)Snapcase Wrote:
(2019-08-03, 05:47)Doobie Wrote:
(2019-08-03, 04:32)Snapcase Wrote: Good catch about the continue/break/return thing, I had fixed it wrong! Smile

Can you try this one: https://github.com/zim514/script.service...v0.7.5dev1

ffmpeg is used by Kodi but I'm not using it directly so I'm not sure what those lines are about. It could be related to the screen capture I'm doing but it could also just be the video player. If the capture doesn't work it's supposed to just skip and try again (the bug you caught). The capture is async and seems to sometimes fail while its starting or stopping the video.

The default color thing is only to replace very dark frames. If you set the black filter setting to 1, it should never do it. I put it in because I noticed with older SD content in very dark scenes it would go full bright red or green because of artefacts, but with newer HD content its never a problem and leaving it to the lowest/off seems to be fine.

As for the colours, what kind of bulbs or lamps do you have and what are you watching? I have the Hue Play bars and with colorful stuff they're surprisingly accurate, especially with animation or movies with distinctive colours like John Wick. For live action or talk shows or sitcoms it usually ends up being a background colour or skin tones that usually just turn out to be neutral white tone colours.   
python:
if colors[0].rgb.r < self.blackFilter and colors[0].rgb.g < self.blackFilter and colors[0].rgb.b <self.blackFilter:
#logger.debug("rgb filter: r,g,b: {},{},{}".format(colors[0].rgb.r,colors[0].rgb.g,colors[0].rgb.b))
if self.defaultRecipe: #defaultRecipe=0: Do nothing
xy=HUE_RECIPES[self.defaultRecipe]["xy"]#Apply XY value from default recipe setting
for L in self.ambiLights:
x = Thread(target=self._updateHueXY,name="updateHue", args=(xy,L,self.transitionTime))
x.daemon = True
x.start()

I am talking about the above code. The continue will work and then it gets down to the if statement. If there is no recipe I think the colors will not change.
I am using play bars too.

I will test again.  

Hi Doobie,

That's actually the intention, but there's a condition based on the colours and the black filter setting just above it. Sometimes when the frame is really dark the RGB colour is 1,1,2 or 1,2,1 or something like that which is basically black. Since Hue doesn't produce blacks it turns into 100% white, which just looks bad with really dark stuff like that final season game of thrones episode. If you choose "do nothing", it will just keep the previous colour until the next frame. It should only do that based on the setting called "black filter", which you can just set as low as possible.

But this is really just a tweak I thought made it look better. I've been tweaking it a lot which is why I have so many settings in there but once I figure out what looks best I'll probably remove some of those. 
Quote:019-08-03 08:15:27.472 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                                            
2019-08-03 08:15:27.534 T:4087339840   ERROR: Previous line repeats 154 times.                                                                                    
2019-08-03 08:15:27.534 T:4087339840   DEBUG: AMLUtils::aml_handle_display_stereo_mode old mode 3doff new mode 3doff                                                         
2019-08-03 08:15:27.534 T:4087339840   DEBUG: AMLUtils::aml_handle_display_stereo_mode - no change needed                                                                             
2019-08-03 08:15:27.534 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                     
2019-08-03 08:15:27.553 T:4087339840   ERROR: Previous line repeats 43 times.                                                                           
2019-08-03 08:15:27.553 T:4087339840    INFO: GLES: Maximum texture width: 8192                                                                         
2019-08-03 08:15:27.553 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                              
2019-08-03 08:15:27.560 T:4087339840   ERROR: Previous line repeats 14 times.                                                                                                         
2019-08-03 08:15:27.560 T:4087339840   DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new                                                                  
2019-08-03 08:15:27.560 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,     
Reply
#47
(2019-08-03, 14:19)Doobie Wrote:
(2019-08-03, 06:20)Snapcase Wrote:
(2019-08-03, 05:47)Doobie Wrote:
python:
if colors[0].rgb.r < self.blackFilter and colors[0].rgb.g < self.blackFilter and colors[0].rgb.b <self.blackFilter:
#logger.debug("rgb filter: r,g,b: {},{},{}".format(colors[0].rgb.r,colors[0].rgb.g,colors[0].rgb.b))
if self.defaultRecipe: #defaultRecipe=0: Do nothing
xy=HUE_RECIPES[self.defaultRecipe]["xy"]#Apply XY value from default recipe setting
for L in self.ambiLights:
x = Thread(target=self._updateHueXY,name="updateHue", args=(xy,L,self.transitionTime))
x.daemon = True
x.start()

I am talking about the above code. The continue will work and then it gets down to the if statement. If there is no recipe I think the colors will not change.
I am using play bars too.

I will test again.  

Hi Doobie,

That's actually the intention, but there's a condition based on the colours and the black filter setting just above it. Sometimes when the frame is really dark the RGB colour is 1,1,2 or 1,2,1 or something like that which is basically black. Since Hue doesn't produce blacks it turns into 100% white, which just looks bad with really dark stuff like that final season game of thrones episode. If you choose "do nothing", it will just keep the previous colour until the next frame. It should only do that based on the setting called "black filter", which you can just set as low as possible.

But this is really just a tweak I thought made it look better. I've been tweaking it a lot which is why I have so many settings in there but once I figure out what looks best I'll probably remove some of those.  
Quote:019-08-03 08:15:27.472 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                                            
2019-08-03 08:15:27.534 T:4087339840   ERROR: Previous line repeats 154 times.                                                                                    
2019-08-03 08:15:27.534 T:4087339840   DEBUG: AMLUtils::aml_handle_display_stereo_mode old mode 3doff new mode 3doff                                                         
2019-08-03 08:15:27.534 T:4087339840   DEBUG: AMLUtils::aml_handle_display_stereo_mode - no change needed                                                                             
2019-08-03 08:15:27.534 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                     
2019-08-03 08:15:27.553 T:4087339840   ERROR: Previous line repeats 43 times.                                                                           
2019-08-03 08:15:27.553 T:4087339840    INFO: GLES: Maximum texture width: 8192                                                                         
2019-08-03 08:15:27.553 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                              
2019-08-03 08:15:27.560 T:4087339840   ERROR: Previous line repeats 14 times.                                                                                                         
2019-08-03 08:15:27.560 T:4087339840   DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new                                                                  
2019-08-03 08:15:27.560 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,     
@Snapcase 
Oops, hit post by accident. As you can see it nevers gets a good capture. I could have sworn it was working at one point.
I will be out most of the weekend but will try debugging later and thanks for the explanation about the filtering.
Reply
#48
(2019-08-03, 14:21)Doobie Wrote:
(2019-08-03, 14:19)Doobie Wrote:
(2019-08-03, 06:20)Snapcase Wrote: Hi Doobie,

That's actually the intention, but there's a condition based on the colours and the black filter setting just above it. Sometimes when the frame is really dark the RGB colour is 1,1,2 or 1,2,1 or something like that which is basically black. Since Hue doesn't produce blacks it turns into 100% white, which just looks bad with really dark stuff like that final season game of thrones episode. If you choose "do nothing", it will just keep the previous colour until the next frame. It should only do that based on the setting called "black filter", which you can just set as low as possible.

But this is really just a tweak I thought made it look better. I've been tweaking it a lot which is why I have so many settings in there but once I figure out what looks best I'll probably remove some of those.  
Quote:019-08-03 08:15:27.472 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                                            
2019-08-03 08:15:27.534 T:4087339840   ERROR: Previous line repeats 154 times.                                                                                    
2019-08-03 08:15:27.534 T:4087339840   DEBUG: AMLUtils::aml_handle_display_stereo_mode old mode 3doff new mode 3doff                                                         
2019-08-03 08:15:27.534 T:4087339840   DEBUG: AMLUtils::aml_handle_display_stereo_mode - no change needed                                                                             
2019-08-03 08:15:27.534 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                     
2019-08-03 08:15:27.553 T:4087339840   ERROR: Previous line repeats 43 times.                                                                           
2019-08-03 08:15:27.553 T:4087339840    INFO: GLES: Maximum texture width: 8192                                                                         
2019-08-03 08:15:27.553 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                              
2019-08-03 08:15:27.560 T:4087339840   ERROR: Previous line repeats 14 times.                                                                                                         
2019-08-03 08:15:27.560 T:4087339840   DEBUG: CGUIWindowManager:TonguereviousWindow: Activate new                                                                  
2019-08-03 08:15:27.560 T:3803575088   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,     
@Snapcase 
Oops, hit post by accident. As you can see it nevers gets a good capture. I could have sworn it was working at one point.
I will be out most of the weekend but will try debugging later and thanks for the explanation about the filtering.     
Thanks! If you use https://paste.kodi.tv/ for your logs I think it will make them much easier to read

You're right. With the other fix now it looks like the capture just never works. I have a couple ideas:

You mentioned 4k video, does this happen only with 4k? Can you try with other formats? I won't know if it's the resolution or HDR or file format but it could help narrow it down. 
It might be because it's an android device. I have no idea really but it's something I can't test and one of the major differences.

If it's either of those issues I don't think I can do anything on my end and we probably need to open an issue on github for the kodi team.

It could be performance or timing out. By default the capture will wait a maximum of 1 second to get an image and resize using frameSize setting.

The timeout value is on this second line (default is 1000ms) :
python:
cap.capture(self.captureSize, self.captureSize) #async capture request to underlying OS
capImage = cap.getImage(1000) #timeout to wait for OS in ms, default 1000

You could increase that to 5 or something to see what happens, but even a 1 second delay is probably too high. It looks really bad and distracting when it's delayed.

You could try reducing the frameSize setting to the lowest value. The smaller the frame it captures the faster it will run
Reply
#49
(2019-08-03, 06:20)Snapcase Wrote:
(2019-08-03, 05:47)Doobie Wrote:
(2019-08-03, 04:32)Snapcase Wrote: Good catch about the continue/break/return thing, I had fixed it wrong! Smile

Can you try this one: https://github.com/zim514/script.service...v0.7.5dev1

ffmpeg is used by Kodi but I'm not using it directly so I'm not sure what those lines are about. It could be related to the screen capture I'm doing but it could also just be the video player. If the capture doesn't work it's supposed to just skip and try again (the bug you caught). The capture is async and seems to sometimes fail while its starting or stopping the video.

The default color thing is only to replace very dark frames. If you set the black filter setting to 1, it should never do it. I put it in because I noticed with older SD content in very dark scenes it would go full bright red or green because of artefacts, but with newer HD content its never a problem and leaving it to the lowest/off seems to be fine.

As for the colours, what kind of bulbs or lamps do you have and what are you watching? I have the Hue Play bars and with colorful stuff they're surprisingly accurate, especially with animation or movies with distinctive colours like John Wick. For live action or talk shows or sitcoms it usually ends up being a background colour or skin tones that usually just turn out to be neutral white tone colours.   
python:
if colors[0].rgb.r < self.blackFilter and colors[0].rgb.g < self.blackFilter and colors[0].rgb.b <self.blackFilter:
#logger.debug("rgb filter: r,g,b: {},{},{}".format(colors[0].rgb.r,colors[0].rgb.g,colors[0].rgb.b))
if self.defaultRecipe: #defaultRecipe=0: Do nothing
xy=HUE_RECIPES[self.defaultRecipe]["xy"]#Apply XY value from default recipe setting
for L in self.ambiLights:
x = Thread(target=self._updateHueXY,name="updateHue", args=(xy,L,self.transitionTime))
x.daemon = True
x.start()

I am talking about the above code. The continue will work and then it gets down to the if statement. If there is no recipe I think the colors will not change.
I am using play bars too.

I will test again.  

Hi Doobie,

That's actually the intention, but there's a condition based on the colours and the black filter setting just above it. Sometimes when the frame is really dark the RGB colour is 1,1,2 or 1,2,1 or something like that which is basically black. Since Hue doesn't produce blacks it turns into 100% white, which just looks bad with really dark stuff like that final season game of thrones episode. If you choose "do nothing", it will just keep the previous colour until the next frame. It should only do that based on the setting called "black filter", which you can just set as low as possible.

But this is really just a tweak I thought made it look better. I've been tweaking it a lot which is why I have so many settings in there but once I figure out what looks best I'll probably remove some of those. 
Hi @Snapcase 

Ok so I have been trying different videos and settings. I cannot pinpoint for sure the exact issue but it seems videos that are H265 and HDR are ones that do not work. What is weird that it is only some.
Anyhow this was an interesting project and overall I am happy. Thanks for your code and help!

Cheers
Reply
#50
Hi Doobie,

That's interesting info. It sounds like it might be something that needs to be fixed on the Kodi side. If I ever get a 4K setup I'll check that out.
Reply
#51
Wink 
Hi @Snapcase

Very happy to see some new add-ons are being developed for Philips Hue, especially as I've just ordered two new colour Hue bulbs for my room. 

I was using the old mpolednik Hue add-on for many years and use the Amibilight feature only. 

I've just installed your new add-on and I seem to have a problem in the Ambilight settings selecting my "TV Backlight"

This RGBW LED strip is actually connected to a Dresden FLS-PP lp ballast / LED driver. Its Zigbee LightLink compatible and supports integration in to the Philips Hue Bridge / System.

However when I select this light in your add-on in the Ambilight settings, it says "Only Coloured Lights are supported" and it does not let me add this light.

I also have an actual Philip Hue LED strip behind my AV cabinet below my wall mounted TV and the plugin does allow me to select that light. 

In the old mpolednik add-on I could select my "TV Backlight" no problems. 

If there is a section in the Kodi log file you would like me to look at? Please let me know.

And many thanks for your time and effort in developing a new Philips Hue add-on.
Reply
#52
Here is a snippet from my Kodi log file. For whatever reason? The add-on is not detected my Dresden fls-pp LED driver and the connected RGBW LED strip as being a Colour Light. 
 
Code:
2019-08-10 16:31:08.261 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: loading setting definitions
2019-08-10 16:31:08.261 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: trying to load setting definitions from old format...
2019-08-10 16:31:08.261 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: loading setting values
2019-08-10 16:31:08.262 T:140228870272768    INFO: [script.service.hue][menu][<module>](20): Starting default.py, version 0.7.8, Kodi: 18.3 Git:18.3-Leia
2019-08-10 16:31:08.262 T:140228870272768    INFO: [script.service.hue][core][menu](24): menu started, version: 0.7.8, Arguments: ambiLightSelect
2019-08-10 16:31:08.262 T:140228870272768   DEBUG: [script.service.hue][core][menu](70): Started with ambiLightSelect, kgroupID: 3
2019-08-10 16:31:08.262 T:140228870272768   DEBUG: [script.service.hue][kodiHue][connectBridge](401): in Connect() with settings: bridgeIP: 192.168.0.13, bridgeUser: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2019-08-10 16:31:08.262 T:140228870272768   DEBUG: [script.service.hue][kodiHue][connectionTest](190): Connection Test IP: 192.168.0.13
2019-08-10 16:31:08.272 T:140228870272768    INFO: [script.service.hue][kodiHue][connectionTest](200): Bridge Found! Hue API version: 1.33.0
2019-08-10 16:31:08.272 T:140228870272768   DEBUG: [script.service.hue][kodiHue][connectBridge](405): in Connect(): Bridge responding to connection test.
2019-08-10 16:31:08.272 T:140228870272768   DEBUG: [script.service.hue][kodiHue][connectBridge](414): in Connect(): Checking User
2019-08-10 16:31:08.272 T:140228870272768   DEBUG: [script.service.hue][kodiHue][userTest](208): in ConnectionTest() Attempt initial connection
2019-08-10 16:31:08.301 T:140228870272768    INFO: [script.service.hue][kodiHue][userTest](216): Hue User Authorized. Bridge Zigbee Channel: 15
2019-08-10 16:31:08.301 T:140228870272768    INFO: [script.service.hue][kodiHue][connectBridge](418): Successfully connected to Hue Bridge: 192.168.0.13
2019-08-10 16:31:08.301 T:140228870272768   DEBUG: [script.service.hue][kodiHue][selectHueLights](319): In selectHueLights{}
2019-08-10 16:31:08.347 T:140230923262080   DEBUG: Activating window ID: 10160
2019-08-10 16:31:08.347 T:140230923262080   DEBUG: ------ Window Init (DialogBusy.xml) ------
2019-08-10 16:31:08.347 T:140230923262080   DEBUG: ------ Window Init (DialogSelect.xml) ------
2019-08-10 16:31:08.347 T:140230923262080    INFO: Loading skin file: DialogSelect.xml, load type: KEEP_IN_MEMORY
2019-08-10 16:31:08.381 T:140230923262080   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
2019-08-10 16:31:09.006 T:140229507790592   DEBUG: [script.service.hue][kodiHue][loadSettings](23): Loading settings
2019-08-10 16:31:09.006 T:140229507790592   DEBUG: [script.service.hue][kodiHue][validateSchedule](436): Validate schedule. Schedule Enabled: 0
2019-08-10 16:31:09.006 T:140229507790592   DEBUG: [script.service.hue][kodiHue][setupGroups](44): in setupGroups()
2019-08-10 16:31:09.007 T:140229507790592   DEBUG: [script.service.hue][KodiGroup][loadSettings](29): KodiGroup Load settings
2019-08-10 16:31:09.007 T:140229507790592   DEBUG: [script.service.hue][AmbiGroup][loadSettings](66): AmbiGroup Load settings
2019-08-10 16:31:09.026 T:140229507790592   DEBUG: [script.service.hue][kodiHue][getLightGamut](452): Light: 1, gamut: A
2019-08-10 16:31:09.989 T:140230914864896   DEBUG: LIRC: - NEW 6c 0 KEY_DOWN devinput (KEY_DOWN)
2019-08-10 16:31:10.005 T:140230923262080   DEBUG: HandleKey: 167 (0xa7, obc88) pressed, action is Down
2019-08-10 16:31:10.934 T:140230923262080    INFO: CheckIdle - Closing session to https://raw.github.com (easy=0x7f89df1d1720, multi=0x7f89dd78ddb0)
2019-08-10 16:31:11.277 T:140230914864896   DEBUG: LIRC: - NEW 1c 0 KEY_ENTER devinput (KEY_ENTER)
2019-08-10 16:31:11.297 T:140230923262080   DEBUG: HandleKey: 11 (0x0b, obc244) pressed, action is Select
2019-08-10 16:31:11.994 T:140230923262080    INFO: CheckIdle - Closing session to http://mirrors.kodi.tv (easy=0xf86b520, multi=0x107f41b0)
2019-08-10 16:31:12.421 T:140230914864896   DEBUG: LIRC: - NEW 6a 0 KEY_RIGHT devinput (KEY_RIGHT)
2019-08-10 16:31:12.425 T:140230923262080   DEBUG: HandleKey: 168 (0xa8, obc87) pressed, action is Right
2019-08-10 16:31:13.054 T:140230923262080    INFO: CheckIdle - Closing session to https://addons.libreelec.tv (easy=0x7f898b996220, multi=0x7f898b712ef0)
2019-08-10 16:31:13.565 T:140230914864896   DEBUG: LIRC: - NEW 1c 0 KEY_ENTER devinput (KEY_ENTER)
2019-08-10 16:31:13.585 T:140230923262080    INFO: CheckIdle - Closing session to http://repo.cazwall.com (easy=0x7f898b98b550, multi=0x7f898b683020)
2019-08-10 16:31:13.587 T:140230923262080    INFO: CheckIdle - Closing session to http://mediarepos.net (easy=0x7f89ec19e600, multi=0x7f89eca22cd0)
2019-08-10 16:31:13.588 T:140230923262080   DEBUG: HandleKey: 11 (0x0b, obc244) pressed, action is Select
2019-08-10 16:31:13.883 T:140230923262080   DEBUG: ------ Window Deinit (DialogSelect.xml) ------
2019-08-10 16:31:13.884 T:140228870272768   DEBUG: [script.service.hue][kodiHue][selectHueLights](343): lightIDs: [u'2']
2019-08-10 16:31:13.902 T:140228870272768   DEBUG: [script.service.hue][kodiHue][getLightGamut](452): Light: 2, gamut: other
2019-08-10 16:31:13.904 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: loading setting definitions
2019-08-10 16:31:13.904 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: trying to load setting definitions from old format...
2019-08-10 16:31:13.905 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: loading setting values
2019-08-10 16:31:13.907 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: loading setting definitions
2019-08-10 16:31:13.907 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: trying to load setting definitions from old format...
2019-08-10 16:31:13.909 T:140228870272768   DEBUG: CAddonSettings[script.service.hue]: loading setting values
2019-08-10 16:31:13.916 T:140230923262080   DEBUG: ------ Window Init (DialogAddonSettings.xml) ------
2019-08-10 16:31:13.917 T:140230923262080   DEBUG: ------ Window Init (DialogNotification.xml) ------
2019-08-10 16:31:13.929 T:140229507790592   DEBUG: [script.service.hue][kodiHue][onSettingsChanged](490): Settings changed
2019-08-10 16:31:14.116 T:140230923262080   DEBUG: Previous line repeats 1 times.
2019-08-10 16:31:14.116 T:140230923262080    INFO: CheckIdle - Closing session to https://github.com (easy=0x7f89df0b9bd0, multi=0x7f89de739770)
2019-08-10 16:31:14.120 T:140230923262080    INFO: CheckIdle - Closing session to http://www.arnuboxota.com (easy=0x1042bd10, multi=0x114ceb00)
2019-08-10 16:31:14.646 T:140230923262080    INFO: CheckIdle - Closing session to https://raw.githubusercontent.com (easy=0x4a37510, multi=0x1775640)
2019-08-10 16:31:14.648 T:140230923262080    INFO: CheckIdle - Closing session to https://raw.githubusercontent.com (easy=0x4c22f50, multi=0x4bfd0f0)
2019-08-10 16:31:14.650 T:140230923262080    INFO: CheckIdle - Closing session to https://github.com (easy=0x7f89ec0e6f30, multi=0x7f89ec0e8ce0)
2019-08-10 16:31:14.655 T:140230923262080    INFO: CheckIdle - Closing session to http://kodi.lanik.org (easy=0x476bca0, multi=0x4b99eb0)
2019-08-10 16:31:15.030 T:140229507790592   DEBUG: [script.service.hue][kodiHue][loadSettings](23): Loading settings
2019-08-10 16:31:15.030 T:140229507790592   DEBUG: [script.service.hue][kodiHue][validateSchedule](436): Validate schedule. Schedule Enabled: 0
2019-08-10 16:31:15.030 T:140229507790592   DEBUG: [script.service.hue][kodiHue][loadSettings](23): Loading settings
2019-08-10 16:31:15.030 T:140229507790592   DEBUG: [script.service.hue][kodiHue][validateSchedule](436): Validate schedule. Schedule Enabled: 0
2019-08-10 16:31:15.031 T:140229507790592   DEBUG: [script.service.hue][kodiHue][setupGroups](44): in setupGroups()
2019-08-10 16:31:15.031 T:140229507790592   DEBUG: [script.service.hue][KodiGroup][loadSettings](29): KodiGroup Load settings
2019-08-10 16:31:15.031 T:140229507790592   DEBUG: [script.service.hue][AmbiGroup][loadSettings](66): AmbiGroup Load settings
2019-08-10 16:31:15.048 T:140229507790592   ERROR: [script.service.hue][kodiHue][getLightGamut](454): getLightGamut Exception
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/script.service.hue/resources/lib/kodiHue.py", line 451, in getLightGamut
                                                gamut = bridge.lights()[L]['capabilities']['control']['colorgamuttype']
                                            KeyError: ''
2019-08-10 16:31:15.176 T:140230923262080    INFO: CheckIdle - Closing session to https://zim514.github.io (easy=0x7f898b9b0220, multi=0x7f898b4bbd50)
2019-08-10 16:31:15.707 T:140230923262080    INFO: CheckIdle - Closing session to http://raw.github.com (easy=0x4bfe110, multi=0x46faf00)
2019-08-10 16:31:19.750 T:140230923262080   DEBUG: ------ Window Deinit (DialogNotification.xml) ------
2019-08-10 16:31:27.080 T:140229138708224   DEBUG: Thread JobWorker 140229138708224 terminating (autodelete)
Reply
#53
Also I've just created a "Scene" in the Hue Service add-on settings to set the Gen1 Philips Hue light behind my AV cabinet named "Light Strip" to go Green colour. 

I saved the scene in the add-on and called it "Green" 

I then assigned this scene to the Video Actions -> Stop Scene Enabled -> Scene Name = Green 

However when I press stop on the remote and stop playback of the movie the light does not change to Green. 

I then tried assigning the scene to the "Pause Scene Enabled" option, but that doesn't seem to work either, when I press pause the light does not go Green. 

Under "Video Activation" they are all enabled, Movies, TV Episodes, music videos and other videos. I also set the minimum duration to 10 minutes. 


Thanks
Reply
#54
Perhaps I am doing something wrong? I see there is also an "Audio Actions" section in the settings. I enabled it and for the "Start Scene Enabled" I selected my scene "Green"

I then started to play some music from the Kodi music library but the light did not turn green as per the Created scene. 


I am running LibreElec version 9.1.002, Linux Kernel 5.1.16, Kodi 18.3 Leia on an Intel based HTPC. 

I have a gen 2 (Square) Hue Bridge updated to the latest firmware. And I have a gen 1 genuine Philips Hue 2M LED strip. 


Also there was a music visualisation called WavforHue. This stopped working in Kodi Leia, it worked well on Krypton. 

When playing music and when you had the WavforHue visualisation turned on the lights would kinda change to the beats of the music. 

Not sure if you know anything about Kodi visualisations and how to fix the WavforHue one? as the original developer hasn't responded to requests. 

Thanks

EDIT: The scene(s) on Start / Pause / Stop have started working now not sure why.

Interestingly my "TV Backlight" the Dresden LED driver that cannot be even selected for the Ambilight group. 

Works perfectly fine in the Scenes. I can select both the "TV Backlight" and "Light Strip" when creating a scene and it works. 

So it ought to work for the Ambilight group as well.

Thanks
Reply
#55
Hi @cw-kid

What's happening is that different Hue lights support different colour ranges (aka gamuts), and some bulbs support only white. For ambilight, the colour gamut is used to convert the RGB colour of the onscreen content to a format the hue lights understand, and the colour gamut is needed to calculate the colour. When you add a light for ambilight, it checks the gamut and if it can't figure it out it won't work. It looks like although this device is zigbee compatible, the bridge has no idea what colour gamuts it supports. You can see an example of the different hue colour gamuts here: https://philipshue.com/thread/philips-hu...fferences/

It's failing here, where it tries to figure out what colours your device supports:

Code:
2019-08-10 16:31:15.048 T:140229507790592   ERROR: [script.service.hue][kodiHue][getLightGamut](454): getLightGamut Exception

For scenes it doesn't care since it does no colour calculations, it just tells the hue bridge to trigger a scene and hue does all the work. 

I don't know if I can get non-Hue devices working but if you are willing to help me investigate I can look into it. I would need some debug info on how your device reports its model number, capabilities, etc. There's a helpful Hue debug tool that you can install. Once its linked to your bridge there's a "lights" tab and you can see detailed info for each of your lights. If you can paste that to https://paste.kodi.tv/ and post the link it here I can have a look. Here's an example for my Hue Play lights.
Reply
#56
(2019-08-10, 21:59)Snapcase Wrote: Hi @cw-kid

What's happening is that different Hue lights support different colour ranges (aka gamuts), and some bulbs support only white. For ambilight, the colour gamut is used to convert the RGB colour of the onscreen content to a format the hue lights understand, and the colour gamut is needed to calculate the colour. When you add a light for ambilight, it checks the gamut and if it can't figure it out it won't work. It looks like although this device is zigbee compatible, the bridge has no idea what colour gamuts it supports. You can see an example of the different hue colour gamuts here: https://philipshue.com/thread/philips-hu...fferences/

It's failing here, where it tries to figure out what colours your device supports:

Code:
2019-08-10 16:31:15.048 T:140229507790592   ERROR: [script.service.hue][kodiHue][getLightGamut](454): getLightGamut Exception

For scenes it doesn't care since it does no colour calculations, it just tells the hue bridge to trigger a scene and hue does all the work. 

I don't know if I can get non-Hue devices working but if you are willing to help me investigate I can look into it. I would need some debug info on how your device reports its model number, capabilities, etc. There's a helpful Hue debug tool that you can install. Once its linked to your bridge there's a "lights" tab and you can see detailed info for each of your lights. If you can paste that to https://paste.kodi.tv/ and post the link it here I can have a look. Here's an example for my Hue Play lights.

Hello 

Thank you for your response and explanation. 

I have installed the Hue Debugger UI on to my Windows laptop however it says Developer name not accepted when I try and connect. 

I used the native clip debugger web GUI instead

https://paste.kodi.tv/hakidebuqi

So your new add-on handles the Ambilight and "compatible" Lights differently to the original Philips Hue add-on for Kodi. As I said this 3rd party Dresden ballast worked OK with that original add-on. 

Hopefully you can add support for 3rd party lights and bulbs that can be connected in to the Philips Hue eco system. 

Cheers
Reply
#57
Hi,

Ahh well if you know how to work with the API then the web thing works just as well as that app Smile

It looks like it returns capabilities similar to a hue white bulb, with only a colour temperature. If I remember right the the mpolednik version always used gamut A instead of checking but I wanted to be able to use the larger colour range of the newer lights.

I can probably make a debug version that just defaults to colour gamut C if it can't figure out what the light supports for you to try out. No idea how it will work out in practice though. I'll try and make you a version to experiment with when I get a chance later this week
Reply
#58
(2019-08-11, 01:01)Snapcase Wrote: Hi,

Ahh well if you know how to work with the API then the web thing works just as well as that app Smile

It looks like it returns capabilities similar to a hue white bulb, with only a colour temperature. If I remember right the the mpolednik version always used gamut A instead of checking but I wanted to be able to use the larger colour range of the newer lights.

I can probably make a debug version that just defaults to colour gamut C if it can't figure out what the light supports for you to try out. No idea how it will work out in practice though. I'll try and make you a version to experiment with when I get a chance later this week

OK thanks sounds like.a plan.

Got to be better than buying a new Philips Hue 2m strip thats too short.

I already had my existing SMD 5050 RGBW Led strip loom round the back of the wall mounted TV and just got the Dresden ballast to connect them up to the Hue Bridge for the Kodi Ambilight add-on.

I've ordered two new Hue colour bulbs today for my side lamps, should be here tomorrow so will test them out with your add-on as well.

Thanks.
Reply
#59
Hi

I did a quick hack in this version: https://github.com/zim514/script.service...v0.7.9dev1

If it can't find the gamut it just defaults to C. I didn't test this at all... If it works I'll make a cleaner fix and maybe put it as an advanced option or something
Reply
#60
(2019-08-11, 23:03)Snapcase Wrote: Hi

I did a quick hack in this version: https://github.com/zim514/script.service...v0.7.9dev1

If it can't find the gamut it just defaults to C. I didn't test this at all... If it works I'll make a cleaner fix and maybe put it as an advanced option or something

Great I will try it out tonight.

Thanks
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 24

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