ESP RGBWW Wifi Led Controller - fhem - Modul

Begonnen von pjakobs, 28 Juni 2016, 10:31:13

Vorheriges Thema - Nächstes Thema

Torben

Hallo,

ich hatte ab und an den Fall, dass ein Controller sich aufgehangen hat. Daher frage ich mich, ob man in das Modul einen Health-Check einbauen kann, also alle x Minuten/Stunden automatisch geprüft werden kann, ob der Controller erreichbar ist und dies in einem Reading dargestellt werden kann. Dies ist ja z.B. bei yowsup, Sonos, HM oder der Fritzbox und bestimmt vielen anderen Devices auch üblich. Man könnte dann z.B. auch eine Schaltsteckdose, an der der Controller hängt aus und wieder einschalten, um ihn neu zu starten.

Gruß
Torben

herrmannj


pjakobs


herrmannj

In Arbeit. Bin aber erst September wieder in de.

VG
Jörg

oli82

Guten Morgen.
Gibt es zum Modul schon etwas neues?
Gerade die Möglichkeit der Farbwahl oder das direkte schalten von WW oder CW wären mir sehr wichtig.

pjakobs

Hi Olli,

ich habe meine Controller so in fhem eingebunden:


define LED_Wo LedController 192.168.29.55
attr LED_Wo colorTemp 2700
attr LED_Wo defaultColor 0,10,80
attr LED_Wo defaultRamp 6000
attr LED_Wo room Licht,Wohnzimmer
attr LED_Wo verbose 5
attr LED_Wo webCmd rgb:rgb ffdb4a:rgb ff0000:rgb 80eeff:rgb 00ff00:rgb 0000ff:  rgb 000000
attr LED_Wo widgetOverride rgb:colorpicker,rgb


Damit kann ich sie über den colorpicker oder einige Farbschalter ansprechen.

Hast Du RGBWWCW Strips am Controller? Ich hatte die Farbtemperatur als attr, nicht als Setting angelegt, weil ich davon ausgehe, dass man grundsätzlich eine Farbtemperatur vorgibt.
Als Workaround würde ich vorschlagen, dass Du das attr "colorTemp" setzt und dann mit einer kleinen Änderung der Helligkeit aktivierst.
Aber: die Farbtemperatur hat imho nur Bedeutung, wenn warmweiß und kaltweiß LED dran hängen.

pj

oli82

Hi.
Danke für deine Antwort.
Kann es sein, dass du ein anderes Modul benutzt, als das auf GitHub?
Ich habe nämlich als einziges Attribut, welches ich setzen kann defaultRamp  ???
32_LedController.pm                       0 2016-05-01 12:00:00Z herrmannj

pjakobs

Hi Oli,

pull mal dev-pj, das ist meine aktuelle Version, die tatsächlich ein bisschen mehr Funktionen bietet.

pj

oli82

#68
Danke.
Scheint zu laufen!
Heute Abend mal testen, aber bereits jetzt geht mehr als zuvor ;)

Allerdings habe ich nun auch ein paar Warnings:
PERL WARNING: Use of uninitialized value $a in concatenation (.) or string at /opt/fhem/FHEM/32_LedController.pm line 199.
2016.09.27 15:37:26 1: PERL WARNING: Use of uninitialized value $b in concatenation (.) or string at /opt/fhem/FHEM/32_LedController.pm line 199.
2016.09.27 15:37:26 1: PERL WARNING: Use of uninitialized value $a in pattern match (m//) at /opt/fhem/FHEM/32_LedController.pm line 212.
2016.09.27 15:37:26 1: PERL WARNING: Use of uninitialized value $a in pattern match (m//) at /opt/fhem/FHEM/32_LedController.pm line 213.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 91.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in concatenation (.) or string at /opt/fhem/FHEM/32_LedController.pm line 93.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 95.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 101.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 114.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 127.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 140.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 149.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 158.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 167.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 178.
2016.09.27 15:38:05 1: PERL WARNING: Use of uninitialized value $cmd in string eq at /opt/fhem/FHEM/32_LedController.pm line 190.

pjakobs

das sieht aus, wie ein Aufruf mit ohne Kommando (also nur ein set <devicename> )
seltsam.

oli82


pjakobs

merkwürdig.
Möglicherweise hab ich nicht die neueste Version gepusht....
Die Fehler kommen aus der Funktion "ArgsHelper", die die erweiterten Argumente Queue (q), Long (l) und Time (numerisch) auswertet.
Du könntest ja schreiben

set RGBWW.o off 1000 q

was bedeuten würde, dass der Controller über 1000ms auf null dimmt und dass dies an die bestehende Command queue  angehängt wird.
In meinem Code hier checke ich, ob die Parameter überhaupt existieren, dass scheint bei Dir nicht zu passieren
Ich push mal meinen Stand, aber das wird, fürchte ich, ein bisschen dauern, weil ich einen neuen Rechner habe, und meine git Umgebung dort noch nicht drauf ist.

oli82

Lass dir ruhig Zeit. Bin der Version kann ich erstmal weiter testen und wenn du soweit bist, aktualisiere ich.
Danke auf jeden Fall!

pjakobs

bis ich dazu komme, nimm mal die Version im Anhang.
Beware: there be Dragons!
Vor allem die "set <devicename> raw" Funktion ist mit Vorsicht zu genießen, weil sie überhaupt nicht in den Rest integriert ist.

pj

oli82

Modul habe ich getauscht.
Sehr redselig das ganze ;)
2016.09.28 08:53:47 4: RGBWW.u: get config request
2016.09.28 08:53:47 5: RGBWW.u send API Call {
  'callback' => sub { "DUMMY" },
  'hash' => {
    'DEF' => '192.168.100.76',
    'IP' => '192.168.100.76',
    'NAME' => 'RGBWW.u',
    'NR' => 388,
    'STATE' => '???',
    'TYPE' => 'LedController',
    'helper' => {
      'cmdQueue' => [],
      'isBusy' => 1
    }
  },
  'header' => 'User-Agent: fhem
Accept: application/json',
  'method' => 'GET',
  'parser' => sub { "DUMMY" },
  'timeout' => 30,
  'url' => 'http://192.168.100.76/info'
}

2016.09.28 08:53:47 4: RGBWW.u attrib colorTemp set 2700
2016.09.28 08:53:47 4: RGBWW.u attrib defaultColor set 0,10,80
2016.09.28 08:53:47 4: RGBWW.u attrib defaultRamp set 6000
2016.09.28 08:53:47 4: RGBWW.u attrib event-on-change-reading set hsv
2016.09.28 08:53:47 4: RGBWW.u attrib room set 07_Wohnzimmer
2016.09.28 08:53:47 4: RGBWW.u attrib userReadings set hsv {ReadingsVal($name,'hue','0').','.ReadingsVal($name,'sat','100').','.ReadingsVal($name,'bri','100')}
2016.09.28 08:53:47 4: RGBWW.o: get config request
2016.09.28 08:53:47 5: RGBWW.o send API Call {
  'callback' => sub { "DUMMY" },
  'hash' => {
    'DEF' => '192.168.100.78',
    'IP' => '192.168.100.78',
    'NAME' => 'RGBWW.o',
    'NR' => 389,
    'STATE' => '???',
    'TYPE' => 'LedController',
    'helper' => {
      'cmdQueue' => [],
      'isBusy' => 1
    }
  },
  'header' => 'User-Agent: fhem
Accept: application/json',
  'method' => 'GET',
  'parser' => sub { "DUMMY" },
  'timeout' => 30,
  'url' => 'http://192.168.100.78/info'
}

2016.09.28 08:53:47 4: RGBWW.o attrib colorTemp set 2700
2016.09.28 08:53:47 4: RGBWW.o attrib defaultColor set 0,10,80
2016.09.28 08:53:47 4: RGBWW.o attrib defaultRamp set 6000
2016.09.28 08:53:47 4: RGBWW.o attrib event-on-change-reading set hsv
2016.09.28 08:53:47 4: RGBWW.o attrib room set 07_Wohnzimmer