•   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 22
  •   
Release Philips Hue Service & Ambilight
#31
(2019-07-17, 00:10)Theelichtje Wrote: Would it be possible to add a minium length requirement on playback start? For example, when i start a sitcom, i dont necessarily want the lights to turn off, but when i start a movie (or a long tv episode) then i do want them to turn off.

Anyway, been toying around with it for a while, works great! great job Smile


That feature would benefit when watching music videos or using video screensavers too.
Reply
#32
I looked into this a bit and I think it wouldn't be too hard to do it by video type instead of by time. I can check if the video that's currently playing is flagged in the library as being a TV episode, movie, music video or other. It wouldn't distinguish between watching the office and legion though, the timer would still be useful for that.

What do you mean by video screensaver exactly? It doesn't look like I can support screensavers.
Hue Service  Git • Repo
Reply
#33
(2019-07-18, 18:14)Snapcase Wrote: I looked into this a bit and I think it wouldn't be too hard to do it by video type instead of by time. I can check if the video that's currently playing is flagged in the library as being a TV episode, movie, music video or other. It wouldn't distinguish between watching the office and legion though, the timer would still be useful for that.

What do you mean by video screensaver exactly? It doesn't look like I can support screensavers.

There are some video screensaver addons for KODI that play videos. I remember one of the other hue light addons that had the time option would dim the lights when the screensaver came on, unless you had the time option set to something like 5 minutes to keep the lights from dimming. These types of videos are not classified by the KODI library.
Reply
#34
Hi,

I just updated the addon to version 0.7.0 which adds options to have a minimum video length and to only activate for movies, tv episodes or music videos based on the kodi library. Let me know how it works with those video screensavers, I haven't tested those.

There's also a bunch of fixes and improvements to make the addon more reliable, especially the ambilight code.
Hue Service  Git • Repo
Reply
#35
Hey @Snapcase, I joined specifically to comment on your app and thank you.

Summary:

Mecool M8S Pro L box (S912)
Coreelec (leia)
I had Kryption and Libreelec before and had library issues. You might want to mention that in your read me.

The feature I am most interested in is the ambilight. I know it is experimental and I am happy with the progress. It is working with 1080p content

I was wondering why the ambilight will not happen with 4k content? I am guessing that when grabbing the video there is something different?
When I start a video the colors will shift at the beginning, like first 5 seconds and then remain at that color.

Anyhow I will be following closely and happy you made this, thank you.
Reply
#36
(2019-08-02, 15:27)Doobie Wrote: Hey @Snapcase, I joined specifically to comment on your app and thank you.

Summary:

Mecool M8S Pro L box (S912)
Coreelec (leia)
I had Kryption and Libreelec before and had library issues. You might want to mention that in your read me.

The feature I am most interested in is the ambilight. I know it is experimental and I am happy with the progress. It is working with 1080p content

I was wondering why the ambilight will not happen with 4k content? I am guessing that when grabbing the video there is something different?
When I start a video the colors will shift at the beginning, like first 5 seconds and then remain at that color.

Anyhow I will be following closely and happy you made this, thank you.
Hi Doobie,

You're right, Krypton isn't supported. Some of the features need Leia to work properly. I thought I had set it up so that it wouldn't even install on Krypton but I'll check into that. Good point about mentioning it in the read me

As far as I know it should work just fine with 4K content, the add-on shouldn't care about the resolution. I don't have a 4k set up so it's not something I can look into. It sounds like maybe it's starting then crashing? I can look into it if you send some logs of the error. There's information here on how to send your logs : https://kodi.wiki/view/Log_file/Easy

Thanks!
Hue Service  Git • Repo
Reply
#37
(2019-08-02, 16:09)Snapcase Wrote:
(2019-08-02, 15:27)Doobie Wrote: Hey @Snapcase, I joined specifically to comment on your app and thank you.

Summary:

Mecool M8S Pro L box (S912)
Coreelec (leia)
I had Kryption and Libreelec before and had library issues. You might want to mention that in your read me.

The feature I am most interested in is the ambilight. I know it is experimental and I am happy with the progress. It is working with 1080p content

I was wondering why the ambilight will not happen with 4k content? I am guessing that when grabbing the video there is something different?
When I start a video the colors will shift at the beginning, like first 5 seconds and then remain at that color.

Anyhow I will be following closely and happy you made this, thank you.
Hi Doobie,

You're right, Krypton isn't supported. Some of the features need Leia to work properly. I thought I had set it up so that it wouldn't even install on Krypton but I'll check into that. Good point about mentioning it in the read me

As far as I know it should work just fine with 4K content, the add-on shouldn't care about the resolution. I don't have a 4k set up so it's not something I can look into. It sounds like maybe it's starting then crashing? I can look into it if you send some logs of the error. There's information here on how to send your logs : https://kodi.wiki/view/Log_file/Easy

Thanks! 
Thanks for the quick response. I will send logs when I get a chance.

Cheers
Reply
#38
(2019-08-02, 19:05)Doobie Wrote:
(2019-08-02, 16:09)Snapcase Wrote:
(2019-08-02, 15:27)Doobie Wrote: Hey @Snapcase, I joined specifically to comment on your app and thank you.

Summary:

Mecool M8S Pro L box (S912)
Coreelec (leia)
I had Kryption and Libreelec before and had library issues. You might want to mention that in your read me.

The feature I am most interested in is the ambilight. I know it is experimental and I am happy with the progress. It is working with 1080p content

I was wondering why the ambilight will not happen with 4k content? I am guessing that when grabbing the video there is something different?
When I start a video the colors will shift at the beginning, like first 5 seconds and then remain at that color.

Anyhow I will be following closely and happy you made this, thank you.
Hi Doobie,

You're right, Krypton isn't supported. Some of the features need Leia to work properly. I thought I had set it up so that it wouldn't even install on Krypton but I'll check into that. Good point about mentioning it in the read me

As far as I know it should work just fine with 4K content, the add-on shouldn't care about the resolution. I don't have a 4k set up so it's not something I can look into. It sounds like maybe it's starting then crashing? I can look into it if you send some logs of the error. There's information here on how to send your logs : https://kodi.wiki/view/Log_file/Easy

Thanks!   
Thanks for the quick response. I will send logs when I get a chance.

Cheers  
Quote:2019-08-02 17:12:56.460 T:3723477808    INFO: [script.service.hue][AmbiGroup][onAVStarted](24): Ambilight AV Started. Group enabled: 3 , isPlayingVideo: 1, isPlayingAudio: 1, self.mediaType: 0,self.playbackType(): 1             
2019-08-02 17:12:56.461 T:3723477808    INFO: [script.service.hue][AmbiGroup][onAVStarted](25): Ambilight Settings. Colours: 2, Interval: 0.002, transitionTime: 1                                                                  
2019-08-02 17:12:56.461 T:3723477808    INFO: [script.service.hue][AmbiGroup][onAVStarted](26): Ambilight Settings. enabled: 1, forceOn: 1, setBrightness: 1, Brightness: 204                                                       
2019-08-02 17:12:56.463 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkVideoActivation](166): Video Activation settings(3): minDuration: 0, Movie: 1, Episode: 1, MusicVideo: 1, Other: 1                               
2019-08-02 17:12:56.463 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkVideoActivation](167): Video Activation (3): Duration: 131, mediaType: movie                                                                     
2019-08-02 17:12:56.464 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkVideoActivation](173): Video activation: True                                                                                                    
2019-08-02 17:12:56.464 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkActiveTime](141): in checkActiveTime. Schedule: 0                                                                                                
2019-08-02 17:12:56.465 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkActiveTime](156): Schedule not enabled                                                                                                           
2019-08-02 17:12:56.466 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkVideoActivation](166): Video Activation settings(3): minDuration: 0, Movie: 1, Episode: 1, MusicVideo: 1, Other: 1                               
2019-08-02 17:12:56.466 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkVideoActivation](167): Video Activation (3): Duration: 131, mediaType: movie                                                                     
2019-08-02 17:12:56.467 T:3723477808   DEBUG: [script.service.hue][KodiGroup][checkVideoActivation](173): Video activation: True    

2019-08-02 17:12:56.669 T:3514823472   DEBUG: [script.service.hue][AmbiGroup][_ambiLoop](110): _ambiLoop started

2019-08-02 17:14:14.816 T:3514823472   ERROR: [script.service.hue][AmbiGroup][_ambiLoop](117): capImage is none or <50: 0,                                                                                                          
2019-08-02 17:14:14.852 T:3723477808    INFO: [script.service.hue][AmbiGroup][onPlayBackStopped](50): In ambiGroup[3], onPlaybackStopped() 
@Snapcase 
There are no crashes though, I assume the loop will continue, but perhaps it stops?
I guess I could add more debugging to your code and see, but maybe you know what is happening already.
Reply
#39
(2019-08-03, 00:01)Doobie Wrote:
(2019-08-02, 19:05)Doobie Wrote:
(2019-08-02, 16:09)Snapcase Wrote: Hi Doobie,

You're right, Krypton isn't supported. Some of the features need Leia to work properly. I thought I had set it up so that it wouldn't even install on Krypton but I'll check into that. Good point about mentioning it in the read me

As far as I know it should work just fine with 4K content, the add-on shouldn't care about the resolution. I don't have a 4k set up so it's not something I can look into. It sounds like maybe it's starting then crashing? I can look into it if you send some logs of the error. There's information here on how to send your logs : https://kodi.wiki/view/Log_file/Easy

Thanks!   
Thanks for the quick response. I will send logs when I get a chance.

Cheers   
Quote: 
@Snapcase 
There are no crashes though, I assume the loop will continue, but perhaps it stops?
I guess I could add more debugging to your code and see, but maybe you know what is happening already. 
I think I found the problem, but since I don't have the exact same issue I'm not sure. Can you try out this version: https://github.com/zim514/script.service.../v0.7.5dev
Hue Service  Git • Repo
Reply
#40
(2019-08-03, 00:47)Snapcase Wrote:
(2019-08-03, 00:01)Doobie Wrote:
(2019-08-02, 19:05)Doobie Wrote: Thanks for the quick response. I will send logs when I get a chance.

Cheers   
Quote: 
@Snapcase 
There are no crashes though, I assume the loop will continue, but perhaps it stops?
I guess I could add more debugging to your code and see, but maybe you know what is happening already.  
I think I found the problem, but since I don't have the exact same issue I'm not sure. Can you try out this version: https://github.com/zim514/script.service.../v0.7.5dev 
Quote:2019-08-02 19:53:02.884 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:03.148 T:3718247216    INFO: [script.service.hue][AmbiGroup][onPlayBackStopped](50): In ambiGroup[3], onPlaybackStopped()
2019-08-02 19:53:04.027 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:05.113 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:05.301 T:3538940720   DEBUG: Previous line repeats 4 times.                                                              
2019-08-02 19:53:08.687 T:3848733488   DEBUG: [script.service.hue][AmbiGroup][_ambiLoop](154): _ambiLoop stopped
Do you think the ffmpeg are related?
I see what you did with the breaks, maybe you are looking for continue?
Reply
#41
(2019-08-03, 01:58)Doobie Wrote:
(2019-08-03, 00:47)Snapcase Wrote:
(2019-08-03, 00:01)Doobie Wrote: @Snapcase 
There are no crashes though, I assume the loop will continue, but perhaps it stops?
I guess I could add more debugging to your code and see, but maybe you know what is happening already.  
I think I found the problem, but since I don't have the exact same issue I'm not sure. Can you try out this version: https://github.com/zim514/script.service.../v0.7.5dev 
Quote:2019-08-02 19:53:02.884 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:03.148 T:3718247216    INFO: [script.service.hue][AmbiGroup][onPlayBackStopped](50): In ambiGroup[3], onPlaybackStopped()
2019-08-02 19:53:04.027 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:05.113 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:05.301 T:3538940720   DEBUG: Previous line repeats 4 times.                                                              
2019-08-02 19:53:08.687 T:3848733488   DEBUG: [script.service.hue][AmbiGroup][_ambiLoop](154): _ambiLoop stopped
Do you think the ffmpeg are related?
I see what you did with the breaks, maybe you are looking for continue? 
Hmm ok not sure how it got to onPlayBackStopped. Hope this is enough information.
Reply
#42
(2019-08-03, 02:13)Doobie Wrote:
(2019-08-03, 01:58)Doobie Wrote:
(2019-08-03, 00:47)Snapcase Wrote: I think I found the problem, but since I don't have the exact same issue I'm not sure. Can you try out this version: https://github.com/zim514/script.service.../v0.7.5dev
Quote:2019-08-02 19:53:02.884 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:03.148 T:3718247216    INFO: [script.service.hue][AmbiGroup][onPlayBackStopped](50): In ambiGroup[3], onPlaybackStopped()
2019-08-02 19:53:04.027 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:05.113 T:3538940720   DEBUG: ffmpeg[D2EFF330]: [swscaler] No accelerated colorspace conversion found from yuv420p to bgra
2019-08-02 19:53:05.301 T:3538940720   DEBUG: Previous line repeats 4 times.                                                              
2019-08-02 19:53:08.687 T:3848733488   DEBUG: [script.service.hue][AmbiGroup][_ambiLoop](154): _ambiLoop stopped
Do you think the ffmpeg are related?
I see what you did with the breaks, maybe you are looking for continue?  
Hmm ok not sure how it got to onPlayBackStopped. Hope this is enough information. 
@Snapcase 
Ok I found the problem. In the settings I have Default Color set to "Do nothing" so when your code gets there no color changes.
I changed the Default Color to "relax" and I started seeing changes and no crashes *cross fingers*

The colors are kind of off but this is a good start.

Cheers
Reply
#43
(2019-08-03, 02:28)Doobie Wrote:
(2019-08-03, 02:13)Doobie Wrote:
(2019-08-03, 01:58)Doobie Wrote: Do you think the ffmpeg are related?
I see what you did with the breaks, maybe you are looking for continue?  
Hmm ok not sure how it got to onPlayBackStopped. Hope this is enough information.  
@Snapcase 
Ok I found the problem. In the settings I have Default Color set to "Do nothing" so when your code gets there no color changes.
I changed the Default Color to "relax" and I started seeing changes and no crashes *cross fingers*

The colors are kind of off but this is a good start.

Cheers 
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.
Hue Service  Git • Repo
Reply
#44
(2019-08-03, 04:32)Snapcase Wrote:
(2019-08-03, 02:28)Doobie Wrote:
(2019-08-03, 02:13)Doobie Wrote: Hmm ok not sure how it got to onPlayBackStopped. Hope this is enough information.  
@Snapcase 
Ok I found the problem. In the settings I have Default Color set to "Do nothing" so when your code gets there no color changes.
I changed the Default Color to "relax" and I started seeing changes and no crashes *cross fingers*

The colors are kind of off but this is a good start.

Cheers   
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.  
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.
Reply
#45
(2019-08-03, 05:47)Doobie Wrote:
(2019-08-03, 04:32)Snapcase Wrote:
(2019-08-03, 02:28)Doobie Wrote: @Snapcase 
Ok I found the problem. In the settings I have Default Color set to "Do nothing" so when your code gets there no color changes.
I changed the Default Color to "relax" and I started seeing changes and no crashes *cross fingers*

The colors are kind of off but this is a good start.

Cheers   
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.   
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.
Hue Service  Git • Repo
Reply
  •   
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 22
  •   



Logout Mark Read Team Forum Stats Members Help
Philips Hue Service & Ambilight0
This forum uses Lukasz Tkacz MyBB addons.