Kodi Community Forum

Full Version: [RELEASE] Official XBMC boblight Addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I did install the daemon as well and the message regarding the binary is gone. I want to say, that I didn't have to install the daemon, when installing XBMC boblight on my FireTV.

Anyway, the connection is working. Thanks for the info. Could be mentioned in the pop-up for the binary Wink
Its openelec specific.
nobody knows what the problem?
If red and blue are mixed up it normally means that something is not in RGB but BGR format. Try to change the color definitions in your boblightd like this:

http://pastebin.com/HDc52pfP

(basically change red with blue ...)
Thank you !! Try what you said, but changed everything. And only had to change the hexadecimal
Don't get that answer - could you reformulate it?
Hi Memphiz;

I have wetek device and raspberry pi b+ for led drive. I used before raspberry pi with openelec and hyperion. Now i want wetek and boblight. I installed raspbian on raspberry. I installed and make boblight. I create config and copy raspbian etc path.(boblight.conf). And i installed xbmc boblight addon and boblightd service on openelec(wetek device) I config xbmcaddon to boblight server my raspberry pi ip adress. And i restart both of systems. But no luck. What i missing? I trying use hyperion as server but leds stay same colors. Not change to video. Maybe xbmc boblight capture a small or big images. Anyone help with this? Raspberry pi and wetek and boblight.
Hi , I have since yesterday a weird problem with my boblight , It was working like charm for years now . So first I am using a xtreamer ultra 2 with Openelec 5.0.6 running

Since yesterday the LEd arround my TV are just updating like every minute . My Boblight is connected to a sedu board .

In the Boblight Log I just get this

http://pastebin.com/xV0SSYur

Here is the Kodi Debug Log
http://pastebin.com/ej52AyiA

It looks like Boblight is running and then stopping and so on ,

I have no clue why , maybe someone could help me out

Thx

.
Hi Memphiz,

is it maybe possible to get support for milight bulbs?
I allready have something working but it does not really do nice.

Here is what i got:

boblight.conf:
Code:
[device]
name        WifiLed
output        python /storage/.kodi/userdata/addon_data/service.multimedia.boblightd/milight.py
channels    3
type        popen
interval    100000
debug        off

[color]
name        WIFIred
rgb            FF0000
blacklevel    0.00

[color]
name        WIFIgreen
rgb            00FF00
blacklevel    0.00

[color]
name        WIFIblue
rgb            0000FF
blacklevel    0.00

[light]
name        WI1
color        WIFIred     WifiLed 1
color        WIFIgreen     WifiLed 2
color        WIFIblue     WifiLed 3
hscan        0 100
vscan        0 100

milight.py:
Code:
import colorsys
import sys
import socket

logger=None

class Logger:
  logfile=None
  def __init__(self,activateLogging,path):
    if(activateLogging):
      self.logfile = file(path, "wb")

  def writeLine(self,msg):
    if(self.logfile!=None):
      self.logfile.write(str(msg))
      self.logfile.flush()


class boblightMilightConnector:
  def __init__(self):
    self.readInputStream()

  def readInputStream(self):
    milight=milightController("192.168.178.44",8899)
    while True:
      input = sys.stdin.readline()
      logger.writeLine("Input: "+input)
      inputData=input.split(' ')
      if(len(inputData)>3):
        r = float(inputData[0])
        g = float(inputData[1])
        b = float(inputData[2])
        milight.setRGB(r,g,b)


class milightController:
  ip=None
  port=None
  sock=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  def __init__(self,IP,Port):
    self.ip=IP
    self.port=Port
  def setRGB(self,r,g,b):
    h, s, v = colorsys.rgb_to_hsv(float(r), float(g), float(b))
    logger.writeLine("H: "+str(h)+" S: "+str(s)+" v: "+str(v))
    if(s<0.02):
      MESSAGE1 = "\xC5\x00"
      if(h>0.3333):
        htmp=h-0.3333
        logger.writeLine("Vk1: "+str(htmp))
        vtmp=htmp/0.6666
        logger.writeLine("Vk2: "+str(vtmp))
        vtmp=(2*vtmp)
        logger.writeLine("Vk3: "+str(vtmp))
        v=v/vtmp
        logger.writeLine("Vk4: "+str(v))
    else:
      #Korrektur Gelb
      if (h < 0.33333):
        h= h *0.5
      #Korrektur Cyan
      if (h > 0.33333 and h < 0.5):
        h= h*0.9
      if(h>0.3333):
        htmp=h-0.3333
        logger.writeLine("Vk1: "+str(htmp))
        vtmp=htmp/0.6666
        logger.writeLine("Vk2: "+str(vtmp))
        vtmp=(2*vtmp)
        logger.writeLine("Vk3: "+str(vtmp))
        v=v/vtmp
        logger.writeLine("Vk4: "+str(v))
      h = int((h) * 256)
      #Korrektur Farbverschiebung
      h=h+85
      if(h>256):
        h=256-(h%256)
      else:
        h=abs(h-256)
      h=int(h)
      MESSAGE1 = "\x40" + chr(h)
    if (v>=0.75):
      v=0.75
    v=v*25
    v=int(round(v))
    v=v+2
    v=min(27,v)
    v = max(2,v)
    MESSAGE2 = "\x4E" + chr(v)
    logger.writeLine("H2: "+str(h)+" S2: "+str(s)+" v2: "+str(v))
    self.sock.sendto(MESSAGE1, (self.ip, self.port))
    self.sock.sendto(MESSAGE2, (self.ip, self.port))
    
logger=Logger(False,"/storage/milight.log")
boblightMilightConnector()

This still works but there is one big problem, if i stop video playback and normal ambilight (arduino with ws2801) turns off the milight.py sends the command to set the milights to white mode and this will happen permanent, that means if i don't look video and wnat to turn of the milight bulbs with the remote or the smartphone app they immediatelly will turn on again because boblight will trigger the milight.py script even if there is no playback.

How did you realize that my arduino turn off the lights and how can i integrate the milights better, any idea appreaciated Smile

Here is a link to the api of the milights or how ever they name em:
http://www.limitlessled.com/dev/

the milights are a good and cheaper alternative to the philips hue lights, i payed 80€ for 3 9w RGBW Milight Bulbs + RF Remote + WLAN Bridge, philips hue is about 200€


Reagrds X23
Consider implementing support for those in boblightd - thats where this belongs to. The addon will work automagically then. For answering your question i would need to know how you hooked up that python script to boblight (its a fact that the boblight addon doesn't call python scripts Wink ).
(2015-03-27, 16:09)BTopbas Wrote: [ -> ]Hi Memphiz;

I have wetek device and raspberry pi b+ for led drive. I used before raspberry pi with openelec and hyperion. Now i want wetek and boblight. I installed raspbian on raspberry. I installed and make boblight. I create config and copy raspbian etc path.(boblight.conf). And i installed xbmc boblight addon and boblightd service on openelec(wetek device) I config xbmcaddon to boblight server my raspberry pi ip adress. And i restart both of systems. But no luck. What i missing? I trying use hyperion as server but leds stay same colors. Not change to video. Maybe xbmc boblight capture a small or big images. Anyone help with this? Raspberry pi and wetek and boblight.

What you described sounds good so far. This should work as long as you are running openelec on your wetek box and the /dev/videocap0 is available.
I have made a small python tool that captures and analyses the screen of Windows, so you can use boblight in Windows and Kodi menu's. It automatically disables when it detects a movie playing in Kodi so the Boblight addon can take over (because is works more efficent). It uses some of the code from the boblight addon, and uses Pillow (PIL) to capture the screen. It does produce some stutter in videos on windows but on my system it is very acceptable.

Anyone interested?
hello


I want that the leds will only work on movies, I disable on the boblight setting all the options but the movies, but still some addons starts the leds.
Is there away to control whitch addons will start the boblight ?
movie is movie - there sre only the options you see (differentiate livetv files movies musicmovies)
Hi,

Im trying to set up lightpack with boblight but I cant seem to get the lights to turn on. XBMC notifies me thats its connected to boblight but nothing happens when I start watching a movie.

When I do c:\boblightd\boblightd.exe -c c:\boblightd\boblight.conf it tells me that port 19033 is already in use and that it could not retrieve port number for the device. Does anyone know what Im doing wrong?