2014-02-11, 09:26
(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.