2014-02-07, 17:05
...
(2014-01-16, 19:42)teeedubb Wrote: Sorry man, my script will be of no use then.
(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?
import xbmc
cmd = '{"jsonrpc": "2.0", "method": "Addons.SetAddonEnabled", '
cmd += '"params": { "addonid": "script.xbmc.boblight", "enabled": "toggle" }, "id": 1}'
<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
(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?
#!/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
(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>
(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.
(2014-01-24, 14:41)soder Wrote:You're right that I should be using 0-25, 25-50, 50-75, 75-100 for hscan for the top bar.(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?
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.
[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
(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