• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 67
Broken YeeMee - (Control Yeelight Smart Bulb + Ambi from Kodi)
v3.4
- Open URL on play/pause/stop
- Small bug fix for OSMC

moved from the TEST repo, since nobody complained Smile
Reply
Is there a way to get a static IP for Yeelight without setting the static IP on the router ?
My crappy router don´t support it
Reply
No, as far as I know Sad.
Reply
Hey DaLink

Amazing Addon absolutely loving it.

1] On Windows10 Kodi 17.4 (addon v3.3) works great, until I have to exit Kodi, where Kodi hangs (I have to kill it in Task Manager) COuld it be keeping some threads open? I notice that if the addon is disbaled then Kodi exits as expected.
2] On my firestick, with 2 different versions of Kodi, with Ambi it seems to start and switches the light on, but the bulb freezes at this initial state ON. videos play as expected

Any suggestions?
Reply
Thanx Smile

1) It is possible it takes time to exit, but IMHO that is general problem with a lot of addons. I am not doing anything out of the ordinary here. There is a thread, but it is stopped as soon as the Ambi is stopped (playback stop). I can have a look.

2) I'd need debug log.
Reply
Here is my log on Windows, it is exiting OK, as you can see there is "EXIT" as last line in log, that means the loop is ended and YeeMee is terminated:

Code:
09:37:35 T:12232  NOTICE: YEEMEE >> STARTED VERSION 3.32 on Kodi 16.1
09:37:36 T:12232  NOTICE: YEEMEE >> GOT CURRENT LAT-LON
09:37:36 T:12232  NOTICE: YEEMEE >> GOT TIMEZONE OFFSET: 2:00:00
09:37:37 T:12232  NOTICE: YEEMEE >> GOT CURRENT SUNRISE: 06:20
09:37:37 T:12232  NOTICE: YEEMEE >> GOT CURRENT SUNSET: 19:41
09:37:37 T:12232  NOTICE: YEEMEE >> GOT CIVIL TW: 20:14
09:37:37 T:12232  NOTICE: YEEMEE >> GOT NAUTIC TW: 20:55
09:37:37 T:12232  NOTICE: YEEMEE >> YEMME - AMBI PRIORITY >> 1
09:37:37 T:12232  NOTICE: YEEMEE >> LOWER BRIGHTNESS ON AMBI PAUSE >> 0
09:37:37 T:12232  NOTICE: YEEMEE >> AMBI SMOOTHEN (MS) >> 0
09:37:37 T:12232  NOTICE: YEEMEE >> REPORT ERRORS >> False
09:37:37 T:12232  NOTICE: YEEMEE >> NUMBER OF BULBS >> 3
09:37:37 T:12232  NOTICE: YEEMEE >> ON AT START >> 0
09:37:37 T:12232  NOTICE: YEEMEE >> DISABLE FOR SHORT FILMS >>FALSE<<
09:37:37 T:12232  NOTICE: YEEMEE >> ACTIVATION TIME >>OFF<<
09:37:37 T:12232  NOTICE: YEEMEE >> MAX BRIGHT DAY >> 100
09:37:37 T:12232  NOTICE: YEEMEE >> MAX BRIGHT CIVIL TW >> 100
09:37:37 T:12232  NOTICE: YEEMEE >> MAX BRIGHT NAUTIC TW >> 100
09:37:37 T:12232  NOTICE: YEEMEE >> MAX BRIGTH NIGHT >> 100
09:37:37 T:12232  NOTICE: YEEMEE >> INIT BULB NUM: 1, IP ADDR: 192.168.1.230, MODEL: mono
09:37:37 T:12232  NOTICE: YEEMEE >> INIT BULB NUM: 2, IP ADDR: 192.168.1.220, MODEL: color
09:37:37 T:12232  NOTICE: YEEMEE >> INIT BULB NUM: 3, IP ADDR: 192.168.1.210, MODEL: stripe
09:37:37 T:12232  NOTICE: YEEMEE >> NUMBER OF ACTIVE BULBS >> 3
09:37:37 T:12232  NOTICE: YEEMEE >> Number           Act Int Color   Eff Duration
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 0 PLAY : >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 0 STOP : >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 0 PAUSE: >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 0 AMBI: >> 0 BIAS: 0
09:37:37 T:12232  NOTICE: YEEMEE >> Number           Act Int Color   Eff Duration
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 1 PLAY : >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 1 STOP : >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 1 PAUSE: >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 1 AMBI: >> 7 BIAS: 0
09:37:37 T:12232  NOTICE: YEEMEE >> Number           Act Int Color   Eff Duration
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 2 PLAY : >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 2 STOP : >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 2 PAUSE: >>   0  20 #BA2B2B   0  500
09:37:37 T:12232  NOTICE: YEEMEE >> BULB 2 AMBI: >> 5 BIAS: 0
09:37:37 T:12232  NOTICE: YEEMEE >> NUMBER OF AMBI BULBS >> 2
09:37:37 T:12232  NOTICE: YEEMEE >> NUMBER OF CONTROLLERS >> 0
09:38:15 T:12232  NOTICE: YEEMEE >> PLAYBACK >>PLAYING<<
09:38:15 T:12232  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.220: {u'params': [u'power', u'music_on'], u'id': 1, u'method': u'get_prop'}
09:38:15 T:8680  NOTICE: YEEMEE >> SERVER >> 192.168.1.100 WAITING FOR CONNECTION...
09:38:16 T:12232  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.220: off, 0
09:38:16 T:12232  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.220: {u'params': [u'on', u'smooth', 200], u'id': 1, u'method': u'set_power'}
09:38:16 T:12232  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.220: ok,
09:38:16 T:6860  NOTICE: YEEMEE >> LUMIFACTOR IS 100
09:38:16 T:12232  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.220: {u'params': [1, u'192.168.1.100', 55440], u'id': 1, u'method': u'set_music'}
09:38:16 T:8680  NOTICE: YEEMEE >> SERVER >> CONNECTION FROM: ('192.168.1.220', 49154) ACCEPTED
09:38:16 T:12232  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.220: ok,
09:38:16 T:10932  NOTICE: YEEMEE >> SERVER >> CONNECTION OPEN FOR ('192.168.1.220', 49154)
09:38:16 T:10932  NOTICE: YEEMEE >> SERVER >> LUMIFACTOR IS 100
09:38:16 T:12232  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.210: {u'params': [u'power', u'music_on'], u'id': 1, u'method': u'get_prop'}
09:38:16 T:12232  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.210: off, 0
09:38:16 T:12232  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.210: {u'params': [u'on', u'smooth', 200], u'id': 1, u'method': u'set_power'}
09:38:16 T:12232  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.210: ok,
09:38:16 T:12232  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.210: {u'params': [1, u'192.168.1.100', 55440], u'id': 1, u'method': u'set_music'}
09:38:16 T:8680  NOTICE: YEEMEE >> SERVER >> CONNECTION FROM: ('192.168.1.210', 49183) ACCEPTED
09:38:16 T:11288  NOTICE: YEEMEE >> SERVER >> CONNECTION OPEN FOR ('192.168.1.210', 49183)
09:38:16 T:11288  NOTICE: YEEMEE >> SERVER >> LUMIFACTOR IS 100
09:38:16 T:12232  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.210: ok,
09:38:26 T:12232  NOTICE: YEEMEE >> PLAYBACK >>STOPPED<<
09:38:26 T:8680  NOTICE: YEEMEE >> SERVER >> CONNECTION FROM: ('192.168.1.100', 2756) ACCEPTED
09:38:26 T:8680  NOTICE: YEEMEE >> SERVER >> END
09:38:26 T:12232  NOTICE: YEEMEE >> SERVER >> STOP SERVER EXCEPTION (THIS IS EXPECTED AND OK): [Errno 9] Bad file descriptor
09:38:26 T:10932  NOTICE: YEEMEE >> SERVER >> CONNECTION CLOSED FOR 192.168.1.220
09:38:26 T:11288  NOTICE: YEEMEE >> SERVER >> CONNECTION CLOSED FOR 192.168.1.210
09:38:26 T:14684  NOTICE: YEEMEE >> SERVER >> NO BULB, CONNECTION FROM ('192.168.1.100', 2756), TERMINATING HANDLER
09:38:26 T:10932  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.220: {u'params': [u'power', u'music_on'], u'id': 1, u'method': u'get_prop'}
09:38:26 T:11288  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.210: {u'params': [u'power', u'music_on'], u'id': 1, u'method': u'get_prop'}
09:38:27 T:10932  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.220: on, 0
09:38:27 T:11288  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.210: on, 0
09:38:27 T:11288  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.210: {u'params': [u'off', u'smooth', 500], u'id': 1, u'method': u'set_power'}
09:38:27 T:10932  NOTICE: YEEMEE >> MESSAGE TO 192.168.1.220: {u'params': [u'off', u'smooth', 500], u'id': 1, u'method': u'set_power'}
09:38:27 T:11288  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.210: ok,
09:38:27 T:10932  NOTICE: YEEMEE >> RESPONSE FROM 192.168.1.220: ok,
09:38:34 T:12232  NOTICE: YEEMEE >> EXIT
Reply
At first: Thanks for the superb plugin!

I have 2 questions to your plugin:

1. "Use as YeeMee Ambi"-Setting: Right 1/2, 1/3, 1/4)

Can you explain please what are the differences in the settings regarding right (left) 1/2, 1/3 and 1/4.
Does this split the color recognition into 2, 3 and 4 areas from the screen, like:

Image

Image

Image

2. Musicvideos - Partymode function

When i watch musicvideos and use the partymode (for autoplay), then the YeeMee-function stop
working after the first video. When i stop the musicvideo and start it again, then everthing is working.

Is it possible that the script remains active?

(RPi 3 / Libreelec / 17.3 / Yeelight RGB Bulb)
Reply
1) Exactly Smile

2) Hmmm, interesting.... Yes, it stops the server after video end, but it should start it again. I don't know, never used partymode Smile Can you post log?
Reply
Hi,
Ambi starts the stip and then it freezes. I found this in the log:

Code:
16:00:57.948 T:18446744072897431856   ERROR:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.yeemee/service.py", line 1557, in grabloop
16:00:57.961 T:18446744072897431856   ERROR: screen.getColors(screen)
16:00:57.962 T:18446744072897431856   ERROR:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.yeemee/service.py", line 1227, in getColors
16:00:57.968 T:18446744072897431856   ERROR: x.applyColorsH, x.applyColorsL, x.applyColorsS = screen.calcRegColor(screen.pixels, *x.ambicoord)
16:00:57.969 T:18446744072897431856   ERROR:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.yeemee/service.py", line 1182, in calcRegColor
16:00:57.974 T:18446744072897431856   ERROR: b += pixels[ypos]
16:00:57.975 T:18446744072897431856   ERROR: IndexError
16:00:57.975 T:18446744072897431856   ERROR: :
16:00:57.975 T:18446744072897431856   ERROR: bytearray index out of range
Reply
(2017-09-15, 16:25)dkyazimov Wrote: Hi,
Ambi starts the stip and then it freezes. I found this in the log:

Code:
16:00:57.948 T:18446744072897431856   ERROR:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.yeemee/service.py", line 1557, in grabloop
16:00:57.961 T:18446744072897431856   ERROR: screen.getColors(screen)
16:00:57.962 T:18446744072897431856   ERROR:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.yeemee/service.py", line 1227, in getColors
16:00:57.968 T:18446744072897431856   ERROR: x.applyColorsH, x.applyColorsL, x.applyColorsS = screen.calcRegColor(screen.pixels, *x.ambicoord)
16:00:57.969 T:18446744072897431856   ERROR:   File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.yeemee/service.py", line 1182, in calcRegColor
16:00:57.974 T:18446744072897431856   ERROR: b += pixels[ypos]
16:00:57.975 T:18446744072897431856   ERROR: IndexError
16:00:57.975 T:18446744072897431856   ERROR: :
16:00:57.975 T:18446744072897431856   ERROR: bytearray index out of range
I'd need a bit more of the log...

Sent from my S8+
Reply
(2017-08-04, 15:10)mavvy Wrote: I understand that "On Play / On Pause / On Stop" is only for YeeMee service but not for Ambi Service. This is working fine.
But when I use Ambi Service, the Yeelight goes off when I stop the playback, it does not revert to the last state or something. It goes on again when I start the playback but off again when I stop it.
It is a little hurting for the eyes at night Smile

When I enable YeeMee service, then "pause" acts correctly according to the setting in "On Pause" but the "On Stop" setting also does not have any effect here, instead of going to the color I have set in "On Stop"

We are also enjoying the basic Yeelight service. But I am having the same experience as above. Yeemee service on it's own functions ok turning light on/off/pause. But when I enable the ambilight service the light shuts off on "Stop". Is there a workaround to get the light to stay on with the configured "On Stop" setting in Yeemee service if the ambilight service has also been enabled? Thanks for any and all info.

LibreELEC v8.0.2 on NUC5CPYH
Reply
Hi Landik, fantastic work!

I have a problem though. I am using spmc in my android TV box, as it is better implemented than kodi for Android. However, it does not work. Is it due to some hardware acceleration that it has and can not be deactivated? If I use kodi krypton 17.4 it works like a charm.

Any ideas? Would a log file help you?

Thanks!
Reply
(2017-09-17, 11:41)xtract47 Wrote: Hi Landik, fantastic work!

I have a problem though. I am using spmc in my android TV box, as it is better implemented than kodi for Android. However, it does not work. Is it due to some hardware acceleration that it has and can not be deactivated? If I use kodi krypton 17.4 it works like a charm.

Any ideas? Would a log file help you?

Thanks!

I found that on my box it was the hardware acceleration that prevented the built in function that grabs screen to work. You can try playing with it.

Yes, send the log so we can see what is happening.
Reply
(2017-09-17, 02:18)booker88 Wrote: We are also enjoying the basic Yeelight service. But I am having the same experience as above. Yeemee service on it's own functions ok turning light on/off/pause. But when I enable the ambilight service the light shuts off on "Stop". Is there a workaround to get the light to stay on with the configured "On Stop" setting in Yeemee service if the ambilight service has also been enabled? Thanks for any and all info.

LibreELEC v8.0.2 on NUC5CPYH

As I stated before, it is oversight on my end. I will have to revise the part of the code that decides when to use basic on/off on play/stop service.
Reply
(2017-09-17, 19:23)DaLanik Wrote: I found that on my box it was the hardware acceleration that prevented the built in function that grabs screen to work. You can try playing with it.

Yes, send the log so we can see what is happening.

When I use official kodi it works. So maybe it's some hardware decoding that can't be turned off in spmc. I will try to upload a log later today.

However, what I've seen is that transitions are too fast, and in some scenes the color changes completely even with a light movement of camera (not changing scene). I haven't checked the code yet, but it looks like in whole screen mode the predominant color is choosen and sent to the yeelight. Is it possible to include some algorithm that prevents that? Meaning that if the change in that color is small then make the transition slowly.

Thanks for the impressive add-on!
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 67

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