NEWS
Hue adapter
Hue adapter
-
im Body können noch weitere Argumente stehen:
transitiontime, bri_inc, sat_inc, hue_inc, ct_inc finde ich interessant.
transitiontime uint16 The duration of the transition from the light’s current state to the new state. This is given as a multiple of 100ms and defaults to 4 (400ms). For example, setting transistiontime:10 will make the transition last 1 second. Optional
bri_inc -254 to 254 As of 1.7. Increments or decrements the value of the brightness. bri_inc is ignored if the bri attribute is provided. Any ongoing bri transition is stopped. Setting a value of 0 also stops any ongoing transition. The bridge will return the bri value after the increment is performed. Optional
sat_inc -254 to 254 As of 1.7. Increments or decrements the value of the sat. sat_inc is ignored if the sat attribute is provided. Any ongoing sat transition is stopped. Setting a value of 0 also stops any ongoing transition. The bridge will return the sat value after the increment is performed. Optional
hue_inc -65534 to 65534 As of 1.7. Increments or decrements the value of the hue. hue_inc is ignored if the hue attribute is provided. Any ongoing color transition is stopped. Setting a value of 0 also stops any ongoing transition. The bridge will return the hue value after the increment is performed.
Note if the resulting values are < 0 or > 65535 the result is wrapped. For example:
{"hue_inc": 1}
on a hue value of 65535 results in a hue of 0.
{"hue_inc": -2}
on a hue value of 0 results in a hue of 65534.
Optional
ct_inc -65534 to 65534 As of 1.7. Increments or decrements the value of the ct. ct_inc is ignored if the ct attribute is provided. Any ongoing color transition is stopped. Setting a value of 0 also stops any ongoing transition. The bridge will return the ct value after the increment is performed. Optional
xy_inc -0.5 to 0.5 As of 1.7. Increments or decrements the value of the xy. xy_inc is ignored if the xy attribute is provided. Any ongoing color transition is stopped. Setting a value of 0 also stops any ongoing transition. Will stop at it's gamut boundaries. The bridge will return the xy value after the increment is performed. Optional
-
Bin seit gestern wieder zu Hause und werde im Laufe der Woche den Sammelzustand implementieren.
Das ganze einfach an die Bridge weiterleiten kann die node-hue-api glaube ich nicht, ich halte es aber ohnehin für sinnvoller die Eingabe auszuwerten bevor sie weitergeleitet wird um fehlerhafte Eingaben direkt abzufangen.
-
ct_inc verstehe ich nicht. ct kann Werte von 153 bis 500 haben, ct_inc aber bis 65534?
Ich lasse xy_inc und ct_inc erstmal weg, da mir die Wirkungsweise nicht klar ist.
bri_inc wird im Adapter zu bri verarbeitet (da Farbänderungen teilweise bri schon verändern), aber nur wenn bri nicht angegeben wurde.
sat_inc und hue_inc werden an die node-hue-api weitergegeben.
-
ct_inc verstehe ich nicht. ct kann Werte von 153 bis 500 haben, ct_inc aber bis 65534? `
Ja, das ist mir auch aufgefallen. Ich habe es für mich als Fehler in der hue Doku verbucht.
Der alte hue Adapter für die ccu.io hatte die Datenpunkte wohl drin. Zu mindestens kann man davon ausgehen, aus dem Code-Beispiel hier:
-
ich teste das nachher mal mit der Dev-Webseite der Bridge und gebe eine Rückmeldung
Gesendet von iPhone mit Tapatalk `
Das wäre super! Der Fehler könnte aber auch in der node-hue-api liegen, die Unterstützung für die inc-Werte ist erst eine Woche alt und evtl. noch unfertig.Wenn der command state ansonsten (inklusive bri_inc) ordentlich funktioniert mache ich damit schonmal einen pull request, damit eine aktuelle Version online kommt. Ich teste gerade einige Dinge durch, du kannst auch gerne schonmal von meinem Github testen.
-
Du meinst mit der Version von Github?
Die wollte ich jetzt installieren. Irgendetwas, auf das ich speziell achten muss? `
Genau, Version 0.4.0. Eigentlich gibt es nichts zu beachten, beim starten der Instanz sollten die neuen command-States hinzugefügt werden. bri_inc sollte funktionieren, die anderen inc Werte nicht. transitiontime geht bei mir! Es gibt natürlich relativ viele Kombinationen von on, bri, hue, ct, xy, rgb usw., ob es bei einigen Sonderfällen zu Problemen mit der aktuellen Implementierung kommt wäre interessant. Ein paar Fehler hatte ich schon gefunden und gefixt.
-
Habe mir die Files rüber kopiert und den Adapter neu gestartet upload/restart.
Kämpfe gerade damit, dass er nun nicht mehr startet:
iobroker 2015-08-03 17:54:20 error host.iobroker instance system.adapter.hue.0 terminated with code 8 (node.js: Cannot find module) -
Ist jetzt gestartet.
In den Objekten ist nur der Datenpunkt command dazugekommen?
D.h. alle besprochenen Punkte muss ich darüber testen?
1526_uifrhi6f.txt -
Ist jetzt gestartet.
In den Objekten ist nur der Datenpunkt command dazugekommen?
D.h. alle besprochenen Punkte muss ich darüber testen? `
Du kannst dort so was wie "{"bri_inc":100,"ct":369,"transitiontime":10}" machen. Ich glaube die gröbsten Fehler sind raus, evtl. gibt es ein paar Unstimmigkeiten, wenn "on", "bri" und rgb kombiniert werden, da sich diese gegenseitig verändern…

