2016-12-09, 16:08
Trying to set it up on a rpi 3 with kodi: I'm trying to get the rgbw-values sent as arguments to a python script / client. Is this possible with the plugin alone or does it also need boblightd running in the background? Afaik hyperion's boblightd doesn't have a popen function to output to file/binary, so it has to run on the original boblightd?
I've set it up with following config
When you start the process it changes lots of colors and keeps counting down towards 000 000 000 all the time within a couple of seconds. Seems to be on the daemon-side. How can I tell if Kodi is stopping sending color-data within a couple of seconds? I've tried outputting directly to a file and see the same trend: starts with RGB goes towards 000 000 000
I've set it up with following config
Code:
[global]
interface 127.0.0.1
port 19333
[device]
name ambilight
type popen
output python /home/pi/boblight/ambixi.py
channels 3
interval 500000
[color]
name red
rgb FF0000
[color]
name green
rgb 00FF00
[color]
name blue
rgb 0000FF
[light]
name xi
color red ambilight 1
color green ambilight 2
color blue ambilight 3
hscan 0 100
vscan 0 100
Code:
Ambixi.py
from yeelight import *
import sys
bulb = Bulb(IPADDRESS)
bulb.turn_on()
while True:
input = sys.stdin.readline()
inputData=input.split(' ')
print(input)
if(len(inputData)>3):
r = float(inputData[0])
g = float(inputData[1])
b = float(inputData[2])
bulb.set_rgb(r, g, b)
When you start the process it changes lots of colors and keeps counting down towards 000 000 000 all the time within a couple of seconds. Seems to be on the daemon-side. How can I tell if Kodi is stopping sending color-data within a couple of seconds? I've tried outputting directly to a file and see the same trend: starts with RGB goes towards 000 000 000