habe mal die config für 3 HUE-Lampen genommen, meine Zugangsdaten eingetragen:
Spoiler anzeigen
import sys
import os
import time
import json
import httplib
from rgb_xy import Converter
from rgb_xy import GamutC # or GamutB, GamutC (you must look for the type of your lamps)
counter = 9
def popen():
converter = Converter(GamutC)
spidev = file( os.getcwd()+'/aufruf.log', "wb")
key = "6YhDQmlf6NqEMto72v8FW7sumlXi19JUyHhSMfnR"
ip = "192.168.0.21"
url = '/api/' + key + '/lights/'
lurl = url + '1/state' # die 1 ersetzen mit der Nummer deiner Leuchte
rurl = url + '2/state' # die 2 ersetzen mit der Nummer deiner Leuchte
aurl = url + '3/state' # usw.
MINIMAL_VALUE=0.000000000
while True:
eingabe = sys.stdin.readline()
if len(eingabe)>0:
global counter
counter += 1
try:
lr,lg,lb,rr,rg,rb,ar,ag,ab,x = eingabe.split(' ')
except ValueError:
spidev.write("Not enough input parameter, do you have the same amount of lights (channels) in your enigmalight config?")
spidev.flush()
raise
lr = (float(lr))*255
lg = (float(lg))*255
lb = (float(lb))*255
rr = (float(rr))*255
rg = (float(rg))*255
rb = (float(rb))*255
ar = (float(ar))*255
ag = (float(ag))*255
ab = (float(ab))*255
lll = calcLuminance(lr,lg,lb)
llr = calcLuminance(rr,rg,rb)
lla = calcLuminance(ar,ag,ab)
if (counter>=13):
connection = httplib.HTTPConnection(ip, timeout=10)
lparams = {'xy': converter.rgb_to_xy(lr,lg,lb), 'colormode': 'xy', 'bri': int(lll), 'on': True}
connection.request('PUT', lurl, json.dumps(lparams))
response = connection.getresponse()
rparams = {'xy': converter.rgb_to_xy(rr,rg,rb), 'colormode': 'xy', 'bri': int(llr), 'on': True}
connection.request('PUT', rurl, json.dumps(rparams))
response = connection.getresponse()
aparams = {'xy': converter.rgb_to_xy(ar,ag,ab), 'colormode': 'xy', 'bri': int(lla), 'on': True}
connection.request('PUT', aurl, json.dumps(aparams))
response = connection.getresponse()
connection.close()
counter=0
else:
os.system("curl -d '{\"on\":false}' -X PUT 192.168.0.21/api/6YhDQmlf6NqEMto72v8FW7sumlXi19JUyHhSMfnR/groups/0/action")
break
def calcLuminance(r,g,b):
LUM_VALUE=20
luminance=1
if (r + g + b > 1):
luminance= r + g + b + LUM_VALUE
if (luminance>=255):
luminance=254
return luminance
import time
time.sleep(1)
popen()
und bekomme folgenden Log:
Spoiler anzeigen
[InitLog]
start of log /home/elight-addons/.enigmalight/enigmalight.log
[CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
[CConfig::CheckConfig] checking config lines
[CConfig::CheckConfig] config lines valid
[CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
[CConfig::BuildConfig] building config
[CConfig::BuildConfig] built config successfully
[main] Start device 1 from 1
[CDevice::Process] ambilight: starting with output "python /home/elight-addons/wifilight/philips_hue/enigmalight_hue_1x.py"
[CDevice::Process] ambilight: setting up
[CEnigmaLight::SetColorSequence]Set colorsequence to RGB
[CGuiServer::Process] Start GuiServerset adjust 0 0 0
1[CGuiServer::Process] Opening listening socket for Enigma2 GUI on 127.0.0.1:6767
[CDevice::Process] ambilight: setup succeeded
[CFlagManager::SetVideoGamma] Gamma not set, using 2.2 since this is default for video
[CMainLoop::Process] Starting grabber..
[CGrabber::Setup] Lights: 1, Cluster leds: 1 as one led
[CGrabber::Setup] Channels: 3
[CGrabber::Setup] Interval: 0.10
[CGrabber::Run] Mode -> Dynamic
[CGrabber::Run] Framegrabber initialized
[CGrabber::Run] Framegrabber Image initialized
[CGrabber::Run] Blackbar Detection i
nitialized
[CFrameGrabber::Setup] Debug mode: enabled
[CGrabber::Run] Framegrabber set up
[CGrabber::Run] entering grabloop
[CFrameGrabber::CheckRes] Set Scanrange to 120x67 (Source 538976288x538976288)
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]
DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CFrameGrabber::updateInfo] DBG -> gFPS:10.4 | Res:120x67 (538976288x538976288)
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
Traceback (most recent call last):
File "/home/elight-addons/wifilight/philips_hue/enigmalight_hue_1x.py", line 82, in <module>
popen()
File "/home/elight-addons/wifilight/philips_hue/enigmalight_hue_1x.py", line 31, in popen
lr,lg,lb,rr,rg,rb,ar,ag,ab,x = eingabe.split(' ')
ValueError: need more than 4 values to unpack
[CBlackbarDetection::FindBounds]
DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
root@vuultimo4k:~# [6n
Meine Lampen reagieren also nicht und ich brauche Hilfe.
import sys
import os
import time
import json
import httplib
from rgb_xy import Converter
from rgb_xy import GamutC # or GamutB, GamutC (you must look for the type of your lamps)
counter = 9
def popen():
converter = Converter(GamutC)
spidev = file( os.getcwd()+'/aufruf.log', "wb")
key = "6YhDQmlf6NqEMto72v8FW7sumlXi19JUyHhSMfnR"
ip = "192.168.0.21"
url = '/api/' + key + '/lights/'
lurl = url + '1/state' # die 1 ersetzen mit der Nummer deiner Leuchte
rurl = url + '2/state' # die 2 ersetzen mit der Nummer deiner Leuchte
aurl = url + '3/state' # usw.
MINIMAL_VALUE=0.000000000
while True:
eingabe = sys.stdin.readline()
if len(eingabe)>0:
global counter
counter += 1
try:
lr,lg,lb,rr,rg,rb,ar,ag,ab,x = eingabe.split(' ')
except ValueError:
spidev.write("Not enough input parameter, do you have the same amount of lights (channels) in your enigmalight config?")
spidev.flush()
raise
lr = (float(lr))*255
lg = (float(lg))*255
lb = (float(lb))*255
rr = (float(rr))*255
rg = (float(rg))*255
rb = (float(rb))*255
ar = (float(ar))*255
ag = (float(ag))*255
ab = (float(ab))*255
lll = calcLuminance(lr,lg,lb)
llr = calcLuminance(rr,rg,rb)
lla = calcLuminance(ar,ag,ab)
if (counter>=13):
connection = httplib.HTTPConnection(ip, timeout=10)
lparams = {'xy': converter.rgb_to_xy(lr,lg,lb), 'colormode': 'xy', 'bri': int(lll), 'on': True}
connection.request('PUT', lurl, json.dumps(lparams))
response = connection.getresponse()
rparams = {'xy': converter.rgb_to_xy(rr,rg,rb), 'colormode': 'xy', 'bri': int(llr), 'on': True}
connection.request('PUT', rurl, json.dumps(rparams))
response = connection.getresponse()
aparams = {'xy': converter.rgb_to_xy(ar,ag,ab), 'colormode': 'xy', 'bri': int(lla), 'on': True}
connection.request('PUT', aurl, json.dumps(aparams))
response = connection.getresponse()
connection.close()
counter=0
else:
os.system("curl -d '{\"on\":false}' -X PUT 192.168.0.21/api/6YhDQmlf6NqEMto72v8FW7sumlXi19JUyHhSMfnR/groups/0/action")
break
def calcLuminance(r,g,b):
LUM_VALUE=20
luminance=1
if (r + g + b > 1):
luminance= r + g + b + LUM_VALUE
if (luminance>=255):
luminance=254
return luminance
import time
time.sleep(1)
popen()
und bekomme folgenden Log:
[InitLog]
start of log /home/elight-addons/.enigmalight/enigmalight.log
[CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
[CConfig::CheckConfig] checking config lines
[CConfig::CheckConfig] config lines valid
[CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
[CConfig::BuildConfig] building config
[CConfig::BuildConfig] built config successfully
[main] Start device 1 from 1
[CDevice::Process] ambilight: starting with output "python /home/elight-addons/wifilight/philips_hue/enigmalight_hue_1x.py"
[CDevice::Process] ambilight: setting up
[CEnigmaLight::SetColorSequence]Set colorsequence to RGB
[CGuiServer::Process] Start GuiServerset adjust 0 0 0
1[CGuiServer::Process] Opening listening socket for Enigma2 GUI on 127.0.0.1:6767
[CDevice::Process] ambilight: setup succeeded
[CFlagManager::SetVideoGamma] Gamma not set, using 2.2 since this is default for video
[CMainLoop::Process] Starting grabber..
[CGrabber::Setup] Lights: 1, Cluster leds: 1 as one led
[CGrabber::Setup] Channels: 3
[CGrabber::Setup] Interval: 0.10
[CGrabber::Run] Mode -> Dynamic
[CGrabber::Run] Framegrabber initialized
[CGrabber::Run] Framegrabber Image initialized
[CGrabber::Run] Blackbar Detection i
nitialized
[CFrameGrabber::Setup] Debug mode: enabled
[CGrabber::Run] Framegrabber set up
[CGrabber::Run] entering grabloop
[CFrameGrabber::CheckRes] Set Scanrange to 120x67 (Source 538976288x538976288)
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]
DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
[CFrameGrabber::updateInfo] DBG -> gFPS:10.4 | Res:120x67 (538976288x538976288)
[CBlackbarDetection::FindBounds]DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
Traceback (most recent call last):
File "/home/elight-addons/wifilight/philips_hue/enigmalight_hue_1x.py", line 82, in <module>
popen()
File "/home/elight-addons/wifilight/philips_hue/enigmalight_hue_1x.py", line 31, in popen
lr,lg,lb,rr,rg,rb,ar,ag,ab,x = eingabe.split(' ')
ValueError: need more than 4 values to unpack
[CBlackbarDetection::FindBounds]
DBG -> FindBounds
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Scanning top: 36 - 36, bottom: 36 - 36, left: 20 - 46, right: 20 - 46
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found top line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 1
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found left line: 1
[CBlackbarDetection::ScanLine] DBG -> Scanning line 119
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found right line: 119
[CBlackbarDetection::ScanLine] DBG -> Scanning line 66
[CBlackbarDetection::IsContent] DBG -> IsContent: Max : R{0}, G{1}, B{2}
[CBlackbarDetection::FindBounds]DBG -> FindBounds: Found bottom line: 66
root@vuultimo4k:~# [6n
Meine Lampen reagieren also nicht und ich brauche Hilfe.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von sweet17051983 ()