Milight & Lightscene

Begonnen von nocomment, 18 Februar 2015, 22:01:40

Vorheriges Thema - Nächstes Thema

nocomment

Hallo ihr Lieben,
leider werden die "states" der Milight Lampen nicht richtig gespeichert mit RGB etc, von den Philips Hue devices dennoch schon.
Liegt es an Lightscene ?

Auszug aus der LightScenes.Save:
Wohnzimmer_Scene":{"Full_On":{"bridge_HUEDevice4":{"icon":"on@#ffffff","state":"bri 254 : xy 0.3333,0.3333"},"bridge_HUEDevice3":{"icon":"on@#ffffff","state":"bri 254 : xy 0.3333,0.3333"},"HUEDevice5":{"icon":"on@#ffffff","state":"bri 254 : xy 0.3333,0.3333"},"Deckenlampe_Wohnzimmer":"on 100","Wohnzimmer_Alkschrank":"on 100"},"Warme_Sonne":{"bridge_HUEDevice4":{"icon":"on@#e038a8","state":"bri 254 : xy 0.4612,0.2336"},"bridge_HUEDevice3":{"icon":"dim93%@#e4226e","state":"bri 251 : xy 0.5294,0.242"},"HUEDevice5":{"icon":"dim87%@#fe6520","state":"bri 239 : xy 0.5727,0.3626"},"Deckenlampe_Wohnzimmer":"on 33","Wohnzimmer_schrank":"on 45"}}}

Deckenlampe_Wohnzimmer & Wohnzimmer_schrank sind Milight devices.

Wäre dankbar für einen Ansatz zur Lösung dieses Problems.

lg,
Patrick

justme1968

#1
was heisst nicht richtig gespeichert?

wenn nicht state sondern ein anderes reading gespeichert und per set wieder hergestellt werden soll musst du das lightSceneParamsToSave attribut passend setzen.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

nocomment

Dankö Andre, das war es!

Gute Nacht  ;D

nocomment

#3
Leider zu früh gefreut. :(

Die Helligkeit wird nicht übernommen von den Milight devices. Die Farbe wird geändert aber die Helligkeit wird nicht geändert.

define Deckenlampe_Wohnzimmer MilightDevice RGBW MiLightBridge 7
attr Deckenlampe_Wohnzimmer IODev MiLightBridge
attr Deckenlampe_Wohnzimmer alias Wohnzimmer Deckenlampe
attr Deckenlampe_Wohnzimmer devStateIcon {(MilightDevice_devStateIcon($name),"toggle")}
attr Deckenlampe_Wohnzimmer event-on-change-reading state,transitionInProgress
attr Deckenlampe_Wohnzimmer group Licht
attr Deckenlampe_Wohnzimmer room Wohnzimmer
attr Deckenlampe_Wohnzimmer webCmd rgb:rgb ffffff:rgb ff2a00:rgb 00ff00:rgb 0000ff:rgb ffff00:on:off:dim
attr Deckenlampe_Wohnzimmer lightSceneParamsToSave state,brightness,brightness_on,RGB,hue,saturation,discoMode,discoSpeed,previousState

justme1968

kann es sein das du dir gegenseitig voneinander abhängige parameter überschreibst?

schau mal ins log und schalte von hand genau so wie  es die  oben angegeben konfiguration tut.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

mattwire

I have added support to LightScene for the MilightDevice.  Please try it by using 31_LightScene.pm and 31_MilightDevice.pm from here: https://github.com/mattwire/fhem/commit/24dd8c587029321a78193f9b4dbd14561d6a3fd3

Be sure to delete LightSceneParamsToSave first

nocomment

Thanks Matt for adding Milight support to LightScene!
Made my day :D 8)

justme1968

this is not the best way to go. lightscene ahould geht less device dependend. not more.

could you please provide a initialization of LightSceneParamsToSave in the commandref or even in the module so lightscene can work unchanged?

thanks
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

mattwire

@justme1968: ok. How should I do that? I need to "set hsv x, x, x"  in lightscene. At the moment there is no reading "hsv" but I could add one. Then I would only need to set LightSceneParamsToSave=hsv
Correct?

justme1968

yes. a hsv reading would be one way. or an rgb reading.

the other would be to accept a set like this:set <device> hue <value> : saturation <value> : brightness <value>then you would set LightSceneParamsToSave hue:saturation:brightness

  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

mattwire

#10
I've updated MilightDevice to set attribute lightSceneParamsToSave=hsv for RGBW/RGB; lightSceneParamsToSave=brightness for White; https://github.com/mattwire/fhem/commit/07f96f813893ffbb6fcfc88bf851c89dcc72268c
Fix typo: https://github.com/mattwire/fhem/commit/71da5a317673cac5fb251a6b9ca7d920390503b1

Please use original 31_LightScene.

Matthew