• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 67
Broken YeeMee - (Control Yeelight Smart Bulb + Ambi from Kodi)
#31
Hi Lanik, first let me say thank you for this addon.
Bought a lamp and read the next day that you were going to start working on the addon Smile

Its working great!

I would only like to use the play/pause/stop light settings from your addon sometimes. Thats why i thought of combining cinemavision addon and yours.
So when i want to dim the lights for a movie, i will start this movie via cinemavisions and create an action file in CV that activates your addons actions.
When i dont want the light to change i just would not use CV.

But that will not work right now because if i enable an play action in your addon, it dims the light for every movie i play.
Is there a way to let CV run the action and disable it for a "regular" play?

Hope i make sense, english is not my first language.
Thanks again
Reply
#32
Yes, turning it on and off wouldn't be a problem - it is a problem to set color and brightness. But if you want I can add pretty easily simple on / off commands.
Reply
#33
So if I set my start/pause/stop settings as I like them in your addon, I could pass the "on" command from CV and leave it off by default?
Reply
#34
No, when powered on, the bulb goes to it's last state. i.e. if it was lighting red, it will turn on red etc
Reply
#35
Okay, so there is no way right now and in the future to selectively turn on or off your addon via CV?!
Reply
#36
(2017-05-11, 11:18)cirkator Wrote: Okay, so there is no way right now and in the future to selectively turn on or off your addon via CV?!
I think it shouldn't be a problem to make on/off external command.

Sent from my N7100
Reply
#37
Thank you, sounds great!
Reply
#38
OK, so I have new version in the test repo, I didn't have the chance to test it very much, I have a lot going on Smile Please, install it from test repo and see if the new on/off commands work.

v1.8
- Action to turn on bulb: "addon://home/addons/service.yeemee/standalone.py,bulb1_on" (replace 1 with bulb nr 1-4)
- Action to turn off bulb: "addon://home/addons/service.yeemee/standalone.py,bulb1_off" (replace 1 with bulb nr 1-4)
- Action to start service: "addon://home/addons/service.yeemee/standalone.py,service_start"
- Action to stop service: "addon://home/addons/service.yeemee/standalone.py,service_stop"
- Do not run when Video Screensaver or ATV screensaver active
Reply
#39
Thank you very much!
I will test as soon as possible.

Do I have to uninstall the addon from your stable repo, or can I just install your beta-repo and update the addon?
Reply
#40
@cirkator
You only have to install the Test Repository and update the addon. But you should probably wait...

@DaLanik
Great job, first of all! There's a problem with v1.8.

Code:
NameError: global name 'CheckEmpty' is not defined

Also, may I suggest that you add an option to exclude PVR/Live streams? Streams from a PVR client should be fairly easy to filter (AFAIK, they all start with pvr://). Live streams from other addons, however, I'm still trying to figure out. I have enabled the option to ignore short movies but it would still trigger the play action for live streams, which is weird since when playback starts duration should be equal to zero (or 1 second? whatever). Maybe you should use "Player.Duration" instead of "VideoPlayer.Duration" or maybe you should change "else: intDuration = 60" to "else: intDuration = 0". That would still trigger the bulb if you stop the live stream after the number of minutes you set for short movies or even if the stream gets buffering (=pauses), as I have noticed, but that's another story...

I'll try to play with code a little bit later today. Thanks!
Reply
#41
v1.9
- Small bug fix for controller signalling
Reply
#42
v2.0
- Small bug fix
Reply
#43
v2.1
- Option to disable for PVR
Reply
#44
Hey DaLanik

Thanks for the option to disable for PVR. I had already implemented that in a quite similar way that you did in v2.1. Looking at the Kodi documentation, I found two conditions that could probably be useful:
  • Player.HasDuration boolean Returns true if Media isn't a true stream
  • Player.Caching boolean Returns true if the player is current re-caching data (internet based video playback).

The first one should allow to disable for live streams. The other one could be used with onPlayBackPaused to check if the stream is buffering and not actually paused (haven't tried it though). If that doesn't work, maybe you could use Player.PauseEnabled or Player.ProgressCache.

Lastly, what is the reason for "else: intDuration = 60"? I've noticed that, watching live streams, it will trigger the bulbs even if I have the option to disable for short videos enabled. VideoPlayer.Duration returns no value but 60 is still larger than what I have set for short videos (15 minutes in my case).
Reply
#45
No particular reason... just thought I'd put something Smile

It is good idea about HasDuration, I'll have a look at it. The only real problem is testing since you can't simulate buffering Smile

If I understand correctly, the problem with live streams is that, when it is buffering, my addon thinks it is a pause and triggers the bulbs?
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 67

Logout Mark Read Team Forum Stats Members Help
YeeMee - (Control Yeelight Smart Bulb + Ambi from Kodi)2