• 1
  • 28
  • 29
  • 30(current)
  • 31
  • 32
  • 67
Broken YeeMee - (Control Yeelight Smart Bulb + Ambi from Kodi)
Hello,
I run with the v4.2 on RPi 3 (Recalbox) and I am no longer able to run or test the yeemee addon.
On the kodi.log file, I found toses lines.
Can you help me please?
Thanks for your help and great thanks for the work on the addon.
Quote:22:41:39 T:1713370080    INFO: initializing python engine.
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): start processing
22:41:39 T:1713370080   DEBUG: -->Python Interpreter Initialized<--
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): the source file to load is "special://home/addons/service.yeemee/standalone.py" ("/recalbox/share/system/.kodi/addons/service.yeemee/standalone.py")
22:41:39 T:1713370080 WARNING: CPythonInvoker(23): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): setting the Python path to /recalbox/share/system/.kodi/addons/service.yeemee:/usr/share/kodi/addons/script.module.t0mm0.common/lib:/recalbox/share/system/.kodi/addons/script.module.bigpictures/lib:/recalbox/share/system/.kodi/addons/script.module.simplejson/lib:/recalbox/share/system/.kodi/addons/script.module.beautifulsoup/lib:/usr/share/kodi/addons/script.module.pil/lib:/recalbox/share/system/.kodi/addons/plugin.video.youtube/resources/lib/:/recalbox/share/system/.kodi/addons/script.module.requests/lib:/recalbox/share/system/.kodi/addons/script.module.buggalo/lib:/recalbox/share/system/.kodi/addons/script.module.parsedom/lib:/recalbox/share/system/.kodi/addons/script.module.xbmcswift2/lib:/recalbox/share/system/.kodi/addons/script.module.elementtree/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): entering source directory /recalbox/share/system/.kodi/addons/service.yeemee
22:41:40 T:1926991872   DEBUG: ------ Window Deinit (DialogAddonSettings.xml) ------
22:41:40 T:1731908576   DEBUG: webserver: request received for /jsonrpc
22:41:40 T:1713370080   DEBUG: Previous line repeats 1 times.
22:41:40 T:1713370080   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named PIL
                                            Traceback (most recent call last):
                                              File "/recalbox/share/system/.kodi/addons/service.yeemee/standalone.py", line 22, in <module>
                                                from service import Yeelight
                                              File "/recalbox/share/system/.kodi/addons/service.yeemee/service.py", line 27, in <module>
                                                from PIL import Image
                                            ImportError: No module named PIL
                                            -->End of Python script error report<--
22:41:40 T:1713370080    INFO: Python script stopped
Reply
(2017-12-31, 01:14)alacran Wrote: Hello,
I run with the v4.2 on RPi 3 (Recalbox) and I am no longer able to run or test the yeemee addon.
On the kodi.log file, I found toses lines.
Can you help me please?
Thanks for your help and great thanks for the work on the addon.
Quote:22:41:39 T:1713370080    INFO: initializing python engine.
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): start processing
22:41:39 T:1713370080   DEBUG: -->Python Interpreter Initialized<--
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): the source file to load is "special://home/addons/service.yeemee/standalone.py" ("/recalbox/share/system/.kodi/addons/service.yeemee/standalone.py")
22:41:39 T:1713370080 WARNING: CPythonInvoker(23): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): setting the Python path to /recalbox/share/system/.kodi/addons/service.yeemee:/usr/share/kodi/addons/script.module.t0mm0.common/lib:/recalbox/share/system/.kodi/addons/script.module.bigpictures/lib:/recalbox/share/system/.kodi/addons/script.module.simplejson/lib:/recalbox/share/system/.kodi/addons/script.module.beautifulsoup/lib:/usr/share/kodi/addons/script.module.pil/lib:/recalbox/share/system/.kodi/addons/plugin.video.youtube/resources/lib/:/recalbox/share/system/.kodi/addons/script.module.requests/lib:/recalbox/share/system/.kodi/addons/script.module.buggalo/lib:/recalbox/share/system/.kodi/addons/script.module.parsedom/lib:/recalbox/share/system/.kodi/addons/script.module.xbmcswift2/lib:/recalbox/share/system/.kodi/addons/script.module.elementtree/lib:/usr/lib/python27.zip:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/lib/python2.7/site-packages:/usr/lib/python2.7/site-packages/gtk-2.0
22:41:39 T:1713370080   DEBUG: CPythonInvoker(23, special://home/addons/service.yeemee/standalone.py): entering source directory /recalbox/share/system/.kodi/addons/service.yeemee
22:41:40 T:1926991872   DEBUG: ------ Window Deinit (DialogAddonSettings.xml) ------
22:41:40 T:1731908576   DEBUG: webserver: request received for /jsonrpc
22:41:40 T:1713370080   DEBUG: Previous line repeats 1 times.
22:41:40 T:1713370080   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ImportError'>
                                            Error Contents: No module named PIL
                                            Traceback (most recent call last):
                                              File "/recalbox/share/system/.kodi/addons/service.yeemee/standalone.py", line 22, in <module>
                                                from service import Yeelight
                                              File "/recalbox/share/system/.kodi/addons/service.yeemee/service.py", line 27, in <module>
                                                from PIL import Image
                                            ImportError: No module named PIL
                                            -->End of Python script error report<--
22:41:40 T:1713370080    INFO: Python script stopped
 Hmm, strange. If it can't find PIL, that it means that the dependency was not installed. Can you try completely uninstalling and reinstalling again?
Reply
(2017-12-30, 18:12)DaLanik Wrote:
(2017-12-30, 14:30)primitivereason Wrote: I have just turned off the debug render capture option and my Yeelights are now both with the right color.  Huh  There is still a bit of a lag in comparison with my Hyperion+Raspberry Pi based ambilight system. I use the Pi to control a LED strip around the TV through Hyperion. Image is captured through a program running in windows (independent from Kodi). 

Also, would it be possible to turn the YeeMee ambilight always on, to always capture the screen instead of having it only work when videos are playing?
 That is strange. The capture is Kodi function, not much I can do about it Smile

I don't understand what you want - to capture even Kodi interface? That is not possible, because render capture works only when video is played.... At least I thijnk so. But maybe someone from Kodi Team can correct me? 
I'll explain what I meant, even if there's no possibility to do it. I have an homemade Ambilight system powered by a Raspberry Pi 3 with LibreELEC and Hyperion server installed in it. Hyperion captures the whole screen and reflects it to the LEDs. I was wondering if it could be done also with your addon.

I also feed my Kodi and Windows image from my HTPC to my Raspberry with the Hyperion Addon through the network, and have a image in system with a rca capture usb stick connected to the Pi, a HDMI splitter, HDMI-RCA converter and a HDMI switch. With that I am able to have ambilight also with games and external image sources.

About the capture, maybe by reducing the captured image's resolution we could decrease the lag between image and LED. It should work, in theory, by reducing the size of the image processed. For example, my ambi system captures only 64x64 pixels for the external sources. 

If it would work, it would be an amazing way to combine both systems, the LEDs behind the TV and the Yeelights producing an 360 ambilight system. That is my goal. There has been some movement towards that in the Hyperion headquarters, but almost no one knows or has an Yeelight yet, and my Python knowledge is yet not good enough to fiddle with that. 

Also, it would be amazing to have an option on your addon to turn off the lights when the system is turned off. Whenever I shutdown my HTPC, the lights stay on and I have to turn them off with the switch. Not a problem, but it would be cool to have. 

If you want to check out the hyperion forum, go here: https://hyperion-project.org/threads/xia...ution.529/

I am cmvac over there! Wink
Reply
(2018-01-01, 19:57)primitivereason Wrote:
(2017-12-30, 18:12)DaLanik Wrote:
(2017-12-30, 14:30)primitivereason Wrote: I have just turned off the debug render capture option and my Yeelights are now both with the right color.  Huh  There is still a bit of a lag in comparison with my Hyperion+Raspberry Pi based ambilight system. I use the Pi to control a LED strip around the TV through Hyperion. Image is captured through a program running in windows (independent from Kodi). 

Also, would it be possible to turn the YeeMee ambilight always on, to always capture the screen instead of having it only work when videos are playing?
 That is strange. The capture is Kodi function, not much I can do about it Smile

I don't understand what you want - to capture even Kodi interface? That is not possible, because render capture works only when video is played.... At least I thijnk so. But maybe someone from Kodi Team can correct me?  
I'll explain what I meant, even if there's no possibility to do it. I have an homemade Ambilight system powered by a Raspberry Pi 3 with LibreELEC and Hyperion server installed in it. Hyperion captures the whole screen and reflects it to the LEDs. I was wondering if it could be done also with your addon.

I also feed my Kodi and Windows image from my HTPC to my Raspberry with the Hyperion Addon through the network, and have a image in system with a rca capture usb stick connected to the Pi, a HDMI splitter, HDMI-RCA converter and a HDMI switch. With that I am able to have ambilight also with games and external image sources.

About the capture, maybe by reducing the captured image's resolution we could decrease the lag between image and LED. It should work, in theory, by reducing the size of the image processed. For example, my ambi system captures only 64x64 pixels for the external sources. 

If it would work, it would be an amazing way to combine both systems, the LEDs behind the TV and the Yeelights producing an 360 ambilight system. That is my goal. There has been some movement towards that in the Hyperion headquarters, but almost no one knows or has an Yeelight yet, and my Python knowledge is yet not good enough to fiddle with that. 

Also, it would be amazing to have an option on your addon to turn off the lights when the system is turned off. Whenever I shutdown my HTPC, the lights stay on and I have to turn them off with the switch. Not a problem, but it would be cool to have. 

If you want to check out the hyperion forum, go here: https://hyperion-project.org/threads/xia...ution.529/

I am cmvac over there! Wink 
No, reducing the image wouldn't help. It works fine just the way it is. And it is lower than 64x64, I think it goest from 16x16. Processing isn't the problem, it is your network. There will always be small delay. If you set the quality to lowest, it is 16x16, so you see it makes no difference. Even of you set it to highest, it will work just fine because processing is not a problem.

If it doesn't turn off the lights than it probably can't because the system is shutting down and it didn't manage to send the command to the bulbs. But there is an option to do just that - "turn off at Kodi exit". but there is no guarantee it will work because as I said the system is shutting down and it might kill my addon.

I still don't understand what you are trying to acomplish with hyperion? This addon also takes video capture and is able to send color parts of screen to certain bulbs, ofcourse not as much as hyperion, first of all because there's no need - you won't be using 250 Yeelight bulbs Smile but just a few. Come to think of it maybe you have bigger lag because both YeeMee and Hyperion are doing the same thing?
Reply
Running Hyperion and YeeMee at the same time could be the reason, but I am running Hyperion on a separate device, my Raspberry Pi. Of course, the culprit could be my network. What could I do about my network, if that is the case?
Reply
When I activate the option to restore the last state after playback ended I always end up with a red light on my RGB yeelight. But the color was white before I started playback. I just want it to turn off when playing and back on to the same afterwards.
Reply
Well, the best and easiest test would be to just disconnect hyperion and see how YeeMee works alone Smile
Reply
Can you post the log?
Reply
I tested with the Hyperion capture off and I still have the same lag. Also when I change lamp colors on "Play", one is turned off and the other in dark blue, it turns on the standard "Kodi Start" color. But when I test the start function, it turns blue as it should. I am going crazy here Confused.  I have tested the LED response with this video: https://www.youtube.com/watch?v=sr_vL2anfXA&t=9s

When the colors start to change in full speed, the Yeelight colors start to go crazy. I noticed a lag of about 1 second between picture and the lights. I'll do a video and post it here, if necessary.
Reply
Well, yes - you won't get any video like that in real life Smile It works just fine for normal videos, as you can see on Youtube in several posted videos...
Reply
Quote:Also when I change lamp colors on "Play", one is turned off and the other in dark blue, it turns on the standard "Kodi Start" color. But when I test the start function, it turns blue as it should.
That is strange, I mean it has been tested so many times, I really doubt there is a bug there somewhere, somebody else would notice, I have been using this for a long time with 5 bulbs... Can you turn on debugging and repeat that and send me the log or post it here?
Reply
Im using boblight whit my tv and I bought new yeelight, I have intel nuc i5 8gb ram whit libreelec latest. after I enabled this plugin my system started to lag when switching channels or or switching to another media that I needed to ssh into and restart the system. I think the problem might be whit this plugin and boblight ?

when switching from pvr to tv show system hangs for about 20 seconds. in log I saw this

Code:
23:49:49.467 T:140487347873536   ERROR: <function grabloop at 0x7fc66eeb5ed8>
23:49:49.467 T:140487347873536   ERROR: Traceback (most recent call last):
23:49:49.467 T:140487347873536   ERROR:   File "/storage/.kodi/addons/service.yeemee/service.py", line 1626, in grabloop
23:49:49.469 T:140487347873536   ERROR: screen.getColorsSimple(screen)
23:49:49.469 T:140487347873536   ERROR:   File "/storage/.kodi/addons/service.yeemee/service.py", line 1281, in getColorsSimple
23:49:49.469 T:140487347873536   ERROR: x.applyColorsH, x.applyColorsL, x.applyColorsS = screen.calcRegColorSimple(x.bulb_ip, screen.pixels, *x.ambicoord)
23:49:49.469 T:140487347873536   ERROR:   File "/storage/.kodi/addons/service.yeemee/service.py", line 1262, in calcRegColorSimple
23:49:49.470 T:140487347873536   ERROR: im = Image.frombuffer('RGBA', (self.capture_width,self.capture_height), ba, 'raw', 'RGBA', 0, 1)
23:49:49.470 T:140487347873536   ERROR:   File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 2131, in frombuffer
23:49:49.470 T:140487347873536   ERROR: ValueError
23:49:49.470 T:140487347873536   ERROR: :
23:49:49.470 T:140487347873536   ERROR: buffer is not large enough
23:49:49.845 T:140487339480832   DEBUG: -->Python Interpreter Initialized<--
Reply
There is also a problem in my configuration (Libreelec + RPi3) using the latest version of the Add-on and a Yeelight Strip. I have discovered the strip successfully and the developer mode is enabled from Yeelight app. I am trying to use the strip as a Whole Screen Ambi, but when starting a video, I get the following error in kodi log.

12:20:20.342 T:1284494240   ERROR: Unhandled exception in thread started by
12:20:20.342 T:1284494240   ERROR: <function startServer at 0x5a53e4f0>
12:20:20.342 T:1284494240   ERROR: Traceback (most recent call last):
12:20:20.343 T:1284494240   ERROR:   File "/storage/.kodi/addons/service.yeemee/service.py", line 1476, in startServer
12:20:20.344 T:1284494240   ERROR: serversock.bind(ADDR)
12:20:20.345 T:1284494240   ERROR:   File "/usr/lib/python2.7/socket.py", line 228, in meth
12:20:20.345 T:1284494240   ERROR: socket
12:20:20.345 T:1284494240   ERROR: .
12:20:20.345 T:1284494240   ERROR: error
12:20:20.345 T:1284494240   ERROR: :
12:20:20.345 T:1284494240   ERROR: [Errno 98] Address already in use
Reply
There is probably another process listening on the port, can you a) restart Kodi and try again b) disable addons/services which might use the same ports... Doesn't seem like addon error, more like your local config.
Reply
(2018-01-06, 23:55)masinad Wrote: Im using boblight whit my tv and I bought new yeelight, I have intel nuc i5 8gb ram whit libreelec latest. after I enabled this plugin my system started to lag when switching channels or or switching to another media that I needed to ssh into and restart the system. I think the problem might be whit this plugin and boblight ?

when switching from pvr to tv show system hangs for about 20 seconds. in log I saw this
Code:
23:49:49.467 T:140487347873536 ERROR: <function grabloop at 0x7fc66eeb5ed8>
23:49:49.467 T:140487347873536 ERROR: Traceback (most recent call last):
23:49:49.467 T:140487347873536 ERROR: File "/storage/.kodi/addons/service.yeemee/service.py", line 1626, in grabloop
23:49:49.469 T:140487347873536 ERROR: screen.getColorsSimple(screen)
23:49:49.469 T:140487347873536 ERROR: File "/storage/.kodi/addons/service.yeemee/service.py", line 1281, in getColorsSimple
23:49:49.469 T:140487347873536 ERROR: x.applyColorsH, x.applyColorsL, x.applyColorsS = screen.calcRegColorSimple(x.bulb_ip, screen.pixels, *x.ambicoord)
23:49:49.469 T:140487347873536 ERROR: File "/storage/.kodi/addons/service.yeemee/service.py", line 1262, in calcRegColorSimple
23:49:49.470 T:140487347873536 ERROR: im = Image.frombuffer('RGBA', (self.capture_width,self.capture_height), ba, 'raw', 'RGBA', 0, 1)
23:49:49.470 T:140487347873536 ERROR: File "/usr/lib/python2.7/site-packages/PIL/Image.py", line 2131, in frombuffer
23:49:49.470 T:140487347873536 ERROR: ValueError
23:49:49.470 T:140487347873536 ERROR: :
23:49:49.470 T:140487347873536 ERROR: buffer is not large enough
23:49:49.845 T:140487339480832 DEBUG: -->Python Interpreter Initialized<--
 That shouldn't ever happen if you don't use RenderCapture debug. Turn off RenderCapture debug in Addon settings.
Reply
  • 1
  • 28
  • 29
  • 30(current)
  • 31
  • 32
  • 67

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