Arilux_AL-LC0X icon indicating copy to clipboard operation
Arilux_AL-LC0X copied to clipboard

[Feature] Add ability to turn on/off with transition

Open papaiatis opened this issue 7 years ago • 9 comments

I'd like to request a feature so that when I turn off the device it fades into black with the specified transition duration.

For example: { "state": "ON", "transition": 3 } would turn on the lights with a black to color transition of 3 seconds. { "state": "OFF", "transition": 1 } would turn on the lights with a color to black transition of 1 second.

papaiatis avatar Oct 04 '17 19:10 papaiatis

This already works does it not? I know that if I send an MQQ Json message from HomeAssistant with transition: 5 the lights will transition on/off over 5 seconds.

Philje123 avatar Nov 16 '17 16:11 Philje123

So, how such a MQTT message should look like exactly? Because this one does not work: { "state": "OFF", "transition": 5 }

This one works: { "color": { "r":255, "g":255, "b":255 }, "transition": 5 } but this is not what I requested in this ticket.

papaiatis avatar Nov 16 '17 20:11 papaiatis

I'm not sure on your specific formatting or how you are sending the message. I use Home Automation.

So my scene contains a command for my MagicHome controller (running this firmware of course) like this:

light.kitchen_cupboard_leds:
    state: on
    transition: 5
    brightness: 120
    rgb_color: [255, 99, 62]

Philje123 avatar Nov 17 '17 13:11 Philje123

Please read the title of this ticket carefully. I'm talking about turning on or off with a transition. Not changing colors.

papaiatis avatar Nov 17 '17 15:11 papaiatis

Ok. I just tried without any colours.

  • name: Kitchen Dining test entities: light.kitchen_island_leds: state: on transition: 5 light.kitchen_cupboard_leds: state: on transition: 5

It works fine. Both the above lights are MagicHome rgb controllers with this firmware on. They both started in an off state then slowly transitioned to on over 5 seconds to their last colour.

Philje123 avatar Nov 17 '17 15:11 Philje123

I agree with papaiatis,

transition with only state changes without color mentioning does not work.

rvt avatar Jan 26 '18 16:01 rvt

I am working on a version with different way to handle transitions and allow to add more transitions easily. However, I am changing a lot of thing quite a bit. It will only support JSON and only HSB with white 1 and white 2 colors. So it should be mostly backwards compatible but you have to start feeding it with HSB instead of RGB. So om the sending end things might get easer (at least in openhab). I am also planning to make short duration transitions with fade in/out in shorter time frames.

if anybody is interested I will put it on github..

rvt avatar Feb 22 '18 18:02 rvt

quick update: I have everything working now except one transition I need for myself (5 minute or more slow transition between two color states).

rvt avatar Mar 03 '18 22:03 rvt

Here is a branch where this issue is solved https://github.com/rvt/Arilux_AL-LC0X/tree/redesign

Note: It´s not a drop-in replacement because color model is changed from RGB to HSB and some things are changed to follow this design. It should be easy to convert though. If there is really a need for RGB model I can see what I can do but I just assumed that all control software (openHAB, Home assistant etc) can output HSB

rvt avatar Mar 18 '18 19:03 rvt