Kodi Community Forum
Release Philips Hue Service & Ambilight - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release Philips Hue Service & Ambilight (/showthread.php?tid=344886)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


RE: Philips Hue Service & Ambilight - leejk - 2019-12-19

Hi,

Started having a weird problem. The add on no longer recognizes when a tv show is playing. Works fine when playing a movie. The only thing that’s really changed to my knowledge are the paths to the tv shows. Before they were using nfs paths, but was having issues with nfs, so changed them to a standard Windows path. But I wouldn’t think that would make a difference. Is there a way to check what KODI thinks it’s playing?


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-19

Hi

It sounds like a library issue of some kind. Maybe try to refresh or rescan your library? It relies on Kodi knowing what kind of media is playing and if you recently moved files there it must be related. If you turn on the logs you can check for a line called checkVideoActivation and that's where you'll see what it thinks is playing. You could also turn on "other" under the video activation settings and it will work for any video or live TV, even if its not in your library


RE: Philips Hue Service & Ambilight - leejk - 2019-12-19

(2019-12-19, 18:36)Snapcase Wrote: Hi

It sounds like a library issue of some kind. Maybe try to refresh or rescan your library? It relies on Kodi knowing what kind of media is playing and if you recently moved files there it must be related. If you turn on the logs you can check for a line called checkVideoActivation and that's where you'll see what it thinks is playing. You could also turn on "other" under the video activation settings and it will work for any video or live TV, even if its not in your library
Based on the output, it looks like it thinks it is playing a move, episode 1? It was in fact playing a tv show. What do you make of the output?

https://paste.kodi.tv/fayadeloze.kodi

I also use PlexKodiConnect to manage the tv shows but not the movies, but never had this issue before. After some experimentation by removing that add on, everything again works as expected. So that was my issue.


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-20

It's failing on line 5 of your logs, where mediaType is blank, after that it's just confused. It knows video is playing but the Kodi library doesn't know what kind of video it is. 

You could force it to work by turning on 'other' under 'video activation' in the Hue settings, this will make it start for any video.

I've never used plex so I have no idea what could be going wrong, but it's related to how the videos are identified in the Kodi library...


RE: Philips Hue Service & Ambilight - leejk - 2019-12-20

(2019-12-20, 16:30)Snapcase Wrote: It's failing on line 5 of your logs, where mediaType is blank, after that it's just confused. It knows video is playing but the Kodi library doesn't know what kind of video it is. 

You could force it to work by turning on 'other' under 'video activation' in the Hue settings, this will make it start for any video.

I've never used plex so I have no idea what could be going wrong, but it's related to how the videos are identified in the Kodi library...
Yeah I'm just going to not use the PKC addon anymore; it seems to work differently than it has in the past.

Thank you for a great hue lights addon; I think it is by far the best one I've seen thus far for controlling hue lights.


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-21

Great, glad it's useful!


RE: Philips Hue Service & Ambilight - leejk - 2019-12-22

Hi,

I noticed a small problem with the ambient light feature. I use the option to restore the lights to their original color. It works as expected if I press the stop button on the remote to stop video playback, but if the video plays thru completion, the lights are not restored. Is there a way to detect that also?

Also, seeing this error quite often in my logs:

2019-12-21 13:40:09.337 T:9316   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'AmbiGroup' object has no attribute 'savedLightStates'
                                            Traceback (most recent call last):
                                              File "C:\Users\leejk\AppData\Roaming\Kodi\addons\script.service.hue\resources\lib\KodiGroup.py", line 129, in onPlayBackEnded
                                                self.onPlayBackStopped()
                                              File "C:\Users\leejk\AppData\Roaming\Kodi\addons\script.service.hue\resources\lib\AmbiGroup.py", line 59, in onPlayBackStopped
                                                for L in self.savedLightStates:
                                            AttributeError: 'AmbiGroup' object has no attribute 'savedLightStates'
                                            -->End of Python script error report<--

thx


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-22

Looks like it's crashing so it's not restoring the light states. Could you please include the full logs?


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-22

@leejk can you try out this dev version? I found a bug but not sure if it's the same.


RE: Philips Hue Service & Ambilight - leejk - 2019-12-23

(2019-12-22, 17:38)Snapcase Wrote: @leejk can you try out this dev version? I found a bug but not sure if it's the same.
I'm not seeing that particular error anymore after playing one video, but when a video finishes playing the light strip being controlled by ambient light does not get restored. I'll test it some more.

https://paste.kodi.tv/agiyubohuv.kodi


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-23

Hi

Ahh, do you mean that some lights resume but others dont? I can see that it resumes for light #4 but no others, but #4 seems to be the only one configured for ambilight. After running this dev version myself it's pretty buggy so I may need to clean it up before I can find the problem since all the other bugs are just confusing things. The logs are all duplicated too for some reason


RE: Philips Hue Service & Ambilight - leejk - 2019-12-23

(2019-12-23, 16:55)Snapcase Wrote: Hi

Ahh, do you mean that some lights resume but others dont? I can see that it resumes for light #4 but no others, but #4 seems to be the only one configured for ambilight. After running this dev version myself it's pretty buggy so I may need to clean it up before I can find the problem since all the other bugs are just confusing things. The logs are all duplicated too for some reason

Hello,

No there is just the one light strip configured for ambient light. It’s just if the video plays out until the end and focus returns to KODI, the original light color for the light strip is not restored. It is though if I manually stop the video playback.


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-24

Ok I'm pretty sure I found the problem - the resume lights method was only hooked up for some events. Eg, if you manually stopped, but not if you paused. 

I'll include a fix in the next version


RE: Philips Hue Service & Ambilight - Snapcase - 2019-12-25

@leejk It should be fixed now in the latest version I released to the repo


RE: Philips Hue Service & Ambilight - leejk - 2019-12-28

(2019-12-25, 19:17)Snapcase Wrote: @leejk It should be fixed now in the latest version I released to the repo

Confirmed, working well Smile