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.
...
(2014-01-16, 19:42)teeedubb Wrote: [ -> ]Sorry man, my script will be of no use then.

@teeedubb - you have info on the script. I have a buddy with OE that would like to try and use it.

is it possible to only have the lights on when media is playing?
(2014-02-10, 19:11)bry- Wrote: [ -> ]
(2014-01-16, 19:42)teeedubb Wrote: [ -> ]Sorry man, my script will be of no use then.

@teeedubb - you have info on the script. I have a buddy with OE that would like to try and use it.

is it possible to only have the lights on when media is playing?

To turn boblight off and on via remote?

Try this:
toggle_boblight_service.py (place in preferred folder)
Code:
import xbmc

cmd =  '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", '
cmd += '"params": { "addonid": "script.xbmc.boblight", "enabled": "toggle" }, "id": 1}'

Keymap entry:
Code:
<hash>RunScript(special://profile/scripts/toggle_boblight_service.py)</hash>
(2014-02-06, 20:10)soder Wrote: [ -> ]Great.

But I think it's possible to have non distracting settings even with about 15% grab at the edges.

My settings now are great I think. :-)

/Söder

Will try this. If only editing boblight.conf wasnt such a PITA.. Anyone know of a calculator I could use? The one I originally used is no longer online.

(2014-02-10, 19:11)bry- Wrote: [ -> ]@teeedubb - you have info on the script. I have a buddy with OE that would like to try and use it.

is it possible to only have the lights on when media is playing?

Code:
#!/bin/bash
export DISPLAY=:0

if [[ ! -f /tmp/boblight.running ]] ; then
        if [[ $(pidof xbmc.bin) ]]; then
                curl -H "Content-Type: application/json" -v -X POST -d '{"id":1,"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Boblight","message":"Enabled","image":"/home/xbmc/.xbmc/addons/script.boblight.launcher/icon.png" }}' http://localhost:9191/jsonrpc
                curl -H "Content-Type: application/json" -v -X POST -d '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": { "addonid": "script.xbmc.boblight", "enabled": true }, "id": 1}' http://localhost:9191/jsonrpc
        else
                notify-send -i /home/xbmc/.xbmc/addons/script.boblight.launcher/icon.png "BOBLIGHT ENABLED                       "
        fi
        sudo /usr/bin/.scripts/reset-teensy.sh
        echo Boblightd + boblight-X11 NOT running, /tmp/boblight.running NOT found...
        echo Turning boblight on.
        if [[ $(pidof boblightd) ]]; then
                kill $(pidof boblightd)
        fi
        if [[ $(pidof boblight-X11) ]]; then
                kill $(pidof boblight-X11)
        fi
        sleep 1
        if [[ $(pidof boblightd) ]]; then
                kill -9 $(pidof boblightd)
                sleep 1
        fi
        if [[ $(pidof boblight-X11) ]]; then
                kill -9 $(pidof boblight-X11)
                sleep 1
        fi
        boblightd -f -c /etc/boblight.conf
        sleep 4
        boblight-X11 -f -x -u 32 -o speed=70 -o value=10 -o saturation=1.0 -o threshold=10 &
        touch /tmp/boblight.running
elif [[ ! -f /tmp/boblight-onecolour.running ]] ; then
        if [[ $(pidof xbmc.bin) ]]; then
                curl -H "Content-Type: application/json" -v -X POST -d '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": { "addonid": "script.xbmc.boblight", "enabled": true }, "id": 1}' http://localhost:9191/jsonrpc
                curl -H "Content-Type: application/json" -v -X POST -d '{"id":1,"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Boblight Single-Colour","message":"Enabled","image":"/home/xbmc/.xbmc/addons/script.boblight.launcher/icon.png" }}' http://localhost:9191/jsonrpc
        else
                notify-send  -i /home/xbmc/.xbmc/addons/script.boblight.launcher/icon.png "BOBLIGHT SINGLE-COLOUR ENABLED                       "
        fi
        echo Boblightd + boblight-X11 running, /tmp/boblight-onecolour.running NOT found...
        echo Turning boblight-onecolour on.
        if [[ $(pidof boblightd) ]]; then
                kill $(pidof boblightd)
        fi
        if [[ $(pidof boblight-X11) ]]; then
                kill $(pidof boblight-X11)
        fi
        sleep 1
        if [[ $(pidof boblightd) ]]; then
                kill 9 $(pidof boblightd)
                sleep 1
        fi
        if [[ $(pidof boblight-X11) ]]; then
                kill 9 $(pidof boblight-X11)
                sleep 1
        fi
        boblightd -f -c /etc/boblight-onecolour.conf
        sleep 4
#        boblight-X11 -f -o speed=70 -o value=10 -o saturation=1.0 -o threshold=10 &
        boblight-X11 -f -x -u 32 -o speed=70 -o value=10 -o saturation=1.0 -o threshold=10 &
        touch /tmp/boblight-onecolour.running
else
        echo Boblightd + boblight-X11 running, /tmp/boblight* found...
        echo Turning boblight off.
        if [[ $(pidof xbmc.bin) ]]; then
                curl -H "Content-Type: application/json" -v -X POST -d '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", "params": { "addonid": "script.xbmc.boblight", "enabled": false }, "id": 1}' http://localhost:9191/jsonrpc
                curl -H "Content-Type: application/json" -v -X POST -d '{"id":1,"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"Boblight","message":"Disabled","image":"/home/xbmc/.xbmc/addons/script.boblight.launcher/icon.png" }}' http://localhost:9191/jsonrpc
        else
                notify-send -i /home/xbmc/.xbmc/addons/script.boblight.launcher/icon.png "BOBLIGHT DISABLED                       "
        fi
        if [[ $(pidof boblightd) ]]; then
                kill $(pidof boblightd)
        fi
        if [[ $(pidof boblight-X11) ]]; then
                kill $(pidof boblight-X11)
        fi
        sleep 1
        if [[ $(pidof boblightd) ]]; then
                kill 9 $(pidof boblightd)
                sleep 1
        fi
        if [[ $(pidof boblight-X11) ]]; then
                kill 9 $(pidof boblight-X11)
                sleep 1
        fi
        rm -f /tmp/boblight.running
        rm -f /tmp/boblight-onecolour.running
fi

It works by stopping/starting boblightd + boblight-x11 and will toggle boblight, single colour boblight then off. Ive found that if xbmc-boblight is started first it will have priority over boblight-x11, so xbmc-boblight will work with videos and boblight-x11 will work in fullscreen vis's, menus and external programs such as steam + chrome when xbmc isnt running. You probably need to mod it to suit your needs/OE. Its run via remote by irexec.


(2014-02-10, 22:12)schumi2004 Wrote: [ -> ]
(2014-02-10, 19:11)bry- Wrote: [ -> ]
(2014-01-16, 19:42)teeedubb Wrote: [ -> ]Sorry man, my script will be of no use then.

@teeedubb - you have info on the script. I have a buddy with OE that would like to try and use it.

is it possible to only have the lights on when media is playing?

To turn boblight off and on via remote?

Try this:
toggle_boblight_service.py (place in preferred folder)
Code:
import xbmc

cmd =  '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", '
cmd += '"params": { "addonid": "script.xbmc.boblight", "enabled": "toggle" }, "id": 1}'

Keymap entry:
Code:
<hash>RunScript(special://profile/scripts/toggle_boblight_service.py)</hash>

Nice.. The script above gives me loads of boblight error messages in the xbmc.log because the add is still enabled, this should solve it.
(2014-02-11, 09:26)teeedubb Wrote: [ -> ]
(2014-02-06, 20:10)soder Wrote: [ -> ]Great.

But I think it's possible to have non distracting settings even with about 15% grab at the edges.

My settings now are great I think. :-)

/Söder

Will try this. If only editing boblight.conf wasnt such a PITA.. Anyone know of a calculator I could use? The one I originally used is no longer online.

Is it really that big pain? When you know you setup, and where the lights are, and how you have placed them on the TV, I find it easy to mod my .conf to grab more or less %.

hscan 75 100
vscan 85 100

Not that hard to make the vscan here to 20% instead of 15%..

I find it more difficult to edit the colors and gamma and "power" to suit just MY "official" Lightpack...

/Söder
...
This is definitly out of scope of this thread which is about the addon. Sry - but if you need to compile something for raspbian i would say ask in the raspbian forum. Sorry again that i can't support all dozens of 3rd party issues which lead to non working boblight - but at least i have to draw a line somewhere for not even more poluting my free time.

PS: also i am not the auhtor of that speedy1985 thingy - but if his howto doesn't work then better ask him?
Thank you for your support and reply.

Fully understand...
(2014-01-24, 14:41)soder Wrote: [ -> ]
(2014-01-24, 02:22)Webbeh Wrote: [ -> ]
(2014-01-21, 18:05)soder Wrote: [ -> ]Hi! I yesterday got my Lightpack from lightpack.tv and since I use OpenELEC I can't use there Prismatik software, but I have to use the Boblight daemon and addon in XBMC.

Here's the settings I'm using with Lightpack/OpenELEC: http://ericsembrat.com/2014/01/23/lightp...elec-xbmc/

But I see you only use the "default" settings the guy in the blog used? Not for the hscan and vscan, but the colors?
You're right that I should be using 0-25, 25-50, 50-75, 75-100 for hscan for the top bar.

I used the default settings for the colors because they worked properly - I used a YouTube video of backlight testing and it worked as expected. I saw no need to adjust them, as they were working to my satisfaction.

I'll see if I can adjust this post this weekend and send out an update. Thanks!
Hi,
i'm a noob who trys to run boblight on his RaspberryPi with RaspBMC.
Actually it runs fine, but there is something verry annoying i dont understand...
Sometimes all LEDs fade on (green color) for 3 times in a row without any doings by me. That happens when the RasPi is doing nothing (runs in the background, LEDs are off (black)) as well as i'm watching a movie or listen to music with the RasPi.
The timeintervalls are verry different. Sometimes it dont happens for hours and than it happens every minute.
I have made two videos.
First one: http://youtu.be/J-sDcAEhNn0
Secound one: http://youtu.be/9OTKEnpVpLc
In the secound one, it happens exactly every 24 secounds and this for hours! Not even a reboot fixed it, i had to import a backup...Now it still happens, but not as often as in the scound video.

How can i stop it? Are there any settings for it?

greetings
hey guys,

i am about to start my little boblight/adalight project (60" 100-150 LEDs) but before i start i got a few (n00b) questions. i hope someone can help me in the case

there are a lot of tutorials regarding boblight - arduino - xbmc on the internet. all of them are based on windows. my HTPC will run xbmcbuntu. can i configurate the arduino from my windows desktop pc and later just plug it into the HTPC (XBMCBuntu + addon) ?
Hey
I;m usuing this addon for a year by now,,,
SUDDENLY when i run XBMC i get:
boblight script failed!
this is the log part:

Code:
12:25:23 T:2272   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeEncodeError'>
                                            Error Contents: 'ascii' codec can't encode characters in position 32-36: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\script.xbmc.boblight\default.py", line 237, in <module>
                                                run_boblight()
                                              File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\script.xbmc.boblight\default.py", line 200, in run_boblight
                                                if not main.connectBoblight():
                                              File "C:\Users\HTPC\AppData\Roaming\XBMC\addons\script.xbmc.boblight\default.py", line 111, in connectBoblight
                                                xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
                                            UnicodeEncodeError: 'ascii' codec can't encode characters in position 32-36: ordinal not in range(128)
                                            -->End of Python script error report<--
12:25:24 T:1628  NOTICE: Thread FileCache start, auto delete: false
12:25:32 T:4580  NOTICE: Previous line repeats 10 times.

tried to install\reinstall boblight xbmc but no success
the LEDS are ws2801 with arduino uno, connected to windows 7 and xbmc 12.3\gotham (doesnt work with both)

THANKS
try this version please
https://dl.dropboxusercontent.com/u/7435...7-test.zip

and does the notification text look wrong afterwards with this version?
I have to Report, that I also use Boblight for year on XBMC.
Since the last update this week - the lights are constant in the standby Color I set.

When playing movies nothing happens.
Please tell me where can I download the bugfree previous Version - without lights watching movies isn`t fun.

GreeT`s eRich
I hope it is OK that I ask here.

I have 2 lightpacks that I wan't to get working with boblight

I haven't installed any libraries for the prismatik,
meaning only boblight/d is installed, and the according libraries.

this is my config

Code:
[global]

[device]
name            LP1
channels        30
type            lightpack
interval        20000
#bus            2
#address        4
serial          95230303231351C020B1

[device]
name            LP2
channels        30
type            lightpack
interval        20000
#bus            2
#address        5
serial          95230303231351E0F1C1


[color]
name            red
rgb             FF0000
gamma           1.6
adjust          1.0
blacklevel      0.0

[color]
name            grn
rgb             0000FF
gamma           1.6
adjust          1.0
blacklevel      0.0

[color]
name            blu
rgb             00FF00
gamma           1.6
adjust          1.0
blacklevel      0.0

[light]
name            L01
color           red     LP1 1
color           blu     LP1 2
color           grn     LP1 3
hscan           83 100
vscan           75 100

[light]
name            L02
color           red     LP1 4
color           blu     LP1 5
color           grn     LP1 6
hscan           83 100
vscan           75 100

[light]
name            L03
color           red     LP1 7
color           blu     LP1 8
color           grn     LP1 9
hscan           83 100
vscan           50 75

[light]
name            L04
color           red     LP1 10
color           blu     LP1 11
color           grn     LP1 12
hscan           67 83
vscan           75 100

[light]
name            L05
color           red     LP1 13
color           blu     LP1 14
color           grn     LP1 15
hscan           50 67
vscan           75 100

[light]
name            L06
color           red     LP1 16
color           blu     LP1 17
color           grn     LP1 18
hscan           83 100
vscan           25 50

[light]
name            L07
color           red     LP1 19
color           blu     LP1 20
color           grn     LP1 21
hscan           83 100
vscan           0 25

[light]
name            L08
color           red     LP1 22
color           blu     LP1 23
color           grn     LP1 24
hscan           83 100
vscan           0 25

[light]
name            L09
color           red     LP1 25
color           blu     LP1 26
color           grn     LP1 27
hscan           67 83
vscan           0 25

[light]
name            L10
color           red     LP1 28
color           blu     LP1 29
color           grn     LP1 30
hscan           50 67
vscan           0 25

[light]
name            L11
color           red     LP2 1
color           blu     LP2 2
color           grn     LP2 3
hscan           50 67
vscan           0 25

I have only inserted 1 LED strip for LP2 (I am adding 1 by 1)

but, when I start boblightd, LP2 is not showing anything, and looking at the debug, it is like it is adding and throwing the connection for both LP1 and LP2 again and again (I only took a snippet of the log..)

Code:
(CDeviceLightpack::SetupDevice) LP2: found Lightpack at bus 2 address 4, serial is 95230303231351E0F1C1
(CDevice::Process)              LP2: setup succeeded
(CDevice::Process)              LP1: closed
(CDevice::Process)              LP1: setting up
(CDeviceLightpack::SetupDevice) LP1: found Lightpack at bus 2 address 3, serial is 95230303231351C020B1
(CDeviceLightpack::SetupDevice) LP1: Lightpack is initialized, bus 2 device address 3
(CDeviceLightpack::SetupDevice) LP1: found Lightpack at bus 2 address 4, serial is 95230303231351E0F1C1
(CDevice::Process)              LP1: setup succeeded
(CDevice::Process)              LP2: closed
(CDevice::Process)              LP2: setting up
(CDeviceLightpack::SetupDevice) LP2: found Lightpack at bus 2 address 3, serial is 95230303231351C020B1
(CDeviceLightpack::SetupDevice) LP2: Lightpack is initialized, bus 2 device address 3
(CDeviceLightpack::SetupDevice) LP2: found Lightpack at bus 2 address 4, serial is 95230303231351E0F1C1
(CDevice::Process)              LP2: setup succeeded
(CClientsHandler::ParseSet)     127.0.0.1:42039 priority set to 255
(CDevice::Process)              LP1: closed
(CDevice::Process)              LP1: setting up
(CDeviceLightpack::SetupDevice) LP1: found Lightpack at bus 2 address 3, serial is 95230303231351C020B1
(CDeviceLightpack::SetupDevice) LP1: Lightpack is initialized, bus 2 device address 3
(CDeviceLightpack::SetupDevice) LP1: found Lightpack at bus 2 address 4, serial is 95230303231351E0F1C1
(CDevice::Process)              LP1: setup succeeded
(CDevice::Process)              LP2: closed
(CDevice::Process)              LP2: setting up
(CDeviceLightpack::SetupDevice) LP2: found Lightpack at bus 2 address 3, serial is 95230303231351C020B1
(CDeviceLightpack::SetupDevice) LP2: Lightpack is initialized, bus 2 device address 3
(CDeviceLightpack::SetupDevice) LP2: found Lightpack at bus 2 address 4, serial is 95230303231351E0F1C1
(CDevice::Process)              LP2: setup succeeded
^C(SignalHandler)                 caught SIGINT
(CClientsHandler::GetReadableFd)select() Interrupted system call
(main)                          signaling devices to stop
(CClientsHandler::Cleanup)      disconnecting clients
(CClientsHandler::RemoveClient) removing 127.0.0.1:42039
(CClientsHandler::Cleanup)      closing listening socket
(CClientsHandler::Cleanup)      clients handler stopped
(main)                          waiting for devices to stop
(CDevice::Process)              LP2: closed
(CDevice::Process)              LP2: stopped
(CDevice::Process)              LP1: closed
(CDevice::Process)              LP1: stopped
(main)                          exiting


Well, I can get LP1 working, so I am thinking that it is OK, that I haven't installed prismatik, or any libraries.
I have used the prismatik, and both lightpacks are working, I just didn't like how prismatik worked.

Have anyone experienced anything like this in their quest of using boblight with lightpack..? thanks