ioBroker.hue icon indicating copy to clipboard operation
ioBroker.hue copied to clipboard

Proper transitiontime support

Open Coalado opened this issue 3 years ago • 11 comments

Is your feature request related to a problem? Please describe. The transition time can only be used when changing values using the command datapoint. This does not work if I want to use the datapoints e.g.in a visualisation

Describe the solution you'd like If I set e.g. the *.on datapoint, I want the adapter to check the datapoints: hue.0.global.transitiontime and hue.0..transitiontime if there is a value>=0. If so, add it to the resulting command request.

Describe alternatives you've considered Read the transitiontime from the object. e.g. I changed hue.0.mylamp.on -> getObject(hue.0.mylamp.on).common.custom["hue.0].transitiontime. This would allow to define a dedicated transitiontime for every datapoint.

Coalado avatar Jan 07 '22 14:01 Coalado

Sorry, but I don't get why you are not able to use it in a vis etc, if you want to have e.g. a button which sets constant values, why not use an alias or for dynamic values a short script. On adapter level this will change the behavior for all changes if once e.g. transitiontime has been changed, also there a lots of other possible args for commands, thus I really don't see every option as a separate state.

foxriver76 avatar Jan 07 '22 14:01 foxriver76

How would a simple alias solve my issue? I would have to write a script that copies all related datapoints, syncs them with the original ones, and convert other changes on them to a setState on the target device. While this would be possible for me, it is almost impossible for someone without scripting know-how. In my opinion, transitiontime is important enough, to implement this on adapter level. There are even more possible args? Can you link me a documentation? That would be great.

Coalado avatar Jan 07 '22 14:01 Coalado

I wrote an external script that creates a synced *-extended state for on, bri, hue, sat,ct as suggested by foxriver76. The extended states mirror the value of the actual state and use the "command" state to send changes incl. additional properties like the transitiontime.

So for now, my problem is "solved", but I would be very happy to find this feature in the adapter someday anyway.

Coalado avatar Jan 07 '22 17:01 Coalado

I want to use the ioBroker.scenes adapter. The transitiontime is calculated by a script for sunrise and sunset. But I have no idea how to use the calculated value from my datapoint for transitiontime in a scene with the command datapoint. Can you descript how to use the scene adapter with the hue adapter when i have calculated transitiontime?

Eistee82 avatar Sep 06 '22 19:09 Eistee82

transitiontime, or transition in milliseconds available in the next latest release. transitiontime (4 = 400, 10 = 1000,...) available in current stable release with command state.

Schmakus avatar May 25 '23 15:05 Schmakus

ähm Kenn hue nicht - aber was bedeutet 4 = 400 ? Ist diese krumme Umrechnung / Codierung von hue vorgegeben? Ansonsten wäre ja 4s = 4000ms natürlich

mcm1957 avatar May 25 '23 15:05 mcm1957

Phillips HUE verwendet Dezisekunden für transitiontime. Ist also alles andere als was krummes.

Eistee82 avatar May 25 '23 17:05 Eistee82

Wie Eistee schon sagte, ist es bei Hue Standard. Jedoch bietet die API weitere Einheiten. Das Sekunden und Millisekunden auch bei anderen Adaptern verwendet wird, habe ich das bei Hue nun auch umgesetzt.

Schmakus avatar May 25 '23 17:05 Schmakus

OKey - dass hue DEZIsekunden vwerwendet ist ja schon fast als Vewrschlüsselung zu werten. :-) Alles OK - kenn mich aus.

mcm1957 avatar May 25 '23 18:05 mcm1957

Wie ist denn hier der Stand? Wird transitiontime demnächst eingebaut? Kann man behilflich sein um es einzubauen bzw. zu testen oder ähnliches?

Eistee82 avatar Jul 19 '23 20:07 Eistee82

Wie ist denn hier der Stand? Wird transitiontime demnächst eingebaut? Kann man behilflich sein um es einzubauen bzw. zu testen oder ähnliches?

Hi, der Adapter wurde auf Typescript umgestellt, bevor mein PR gemerged wurde. Bisher hatte ich keine Zeit, meine Erweiterung in den neuen Code zu implementieren. Gerne kannst unterstützen. Schau in meinem Fork nach den Bausteinen für die transmission time. Kopiere sie raus und füge sie dem neuen Code hinzu. Danke.

Schmakus avatar Jul 20 '23 06:07 Schmakus