Page 1 of 1

possible to dim / pwm several channels together

Posted: 03 Oct 2016, 16:21
by kr0815
I want to dim up several channels together, but switch them off individual

a short test with a rule like

Code: Select all

on ledon do
pwm,4,1023,1000  
 pwm,5,1023,1000
 pwm,14,1023,1000  
 pwm,16,1023,1000  
endon
showed, that now the led´s go on one after the other, so one dims up in 1000ms, as soon as that is finished the next one starts.
Any idea / workaround on this?

Best regards

Klaus

Re: possible to dim / pwm several channels together

Posted: 23 Oct 2016, 19:51
by kr0815
no reply so far :-(

Does anybody usw a RGB LED stripe ? How do you dim up / down the 3 colors the same time ?

Re: possible to dim / pwm several channels together

Posted: 23 Oct 2016, 20:27
by Madbanana
Hi, I'm still waiting for my strips to arrive so haven't had any time playing yet, however a workaround could be to dim in stages?

So instead of going to full brightness on each channel in one go, how about doing each say 10% and then move on to the next? Then repeat until they're all at full brilliance.

It may not be very neat coding and may not be visually what you want, but its what I'd try first. If it looks jerky, maybe reduce each to 5%.

Good luck, once I get mine I will give it a go. There must be an easier way!

Re: possible to dim / pwm several channels together

Posted: 02 Nov 2016, 13:40
by renearts
As far as I have experienced the tasks are carried out sequentially, so this behaviour is expected. Also the fading is a blocking operation AFAIK.
I totally agree that there should be a neater method to fade several channels at the same time to be able to get a nice color fade.
A temporary workaround as Madbanana might provide a solution for now, but the requested functionality will take some time to implement as both the tasks and fading will need to be converted to 'multithreaded' operations.

Re: possible to dim / pwm several channels together

Posted: 03 Nov 2016, 14:30
by mrwee
This sounds interesting. I'm using a H801 with espeasy R120 but can't seem to find a good dimmer solution.

Re: possible to dim / pwm several channels together

Posted: 03 Nov 2016, 21:27
by ledfreak3d
the milight plugin works fine for rgb
sadly not for rgbw yet

Re: possible to dim / pwm several channels together

Posted: 06 Nov 2016, 14:31
by pmayer
@ledfreak3d: Could you post an example?

Re: possible to dim / pwm several channels together

Posted: 06 Nov 2016, 15:41
by ledfreak3d
ofcourse just compile the rgbw plugin with easy esp and you can control it via the milight plugin in domoticz
works good for rgb but not rgbw yet
but that's a limitation of domoticz not of the plugin


_P105_RGBW.zip
rgbw plugin
(3.42 KiB) Downloaded 213 times

Re: possible to dim / pwm several channels together

Posted: 06 Nov 2016, 19:02
by mrwee
i have tried that plugin, but I often find the fading to be very unstable.

Re: possible to dim / pwm several channels together

Posted: 08 Nov 2016, 08:44
by ledfreak3d
I must say I don't use it my self I use a modified version of quindor's lau code to contoll my aquarium lights
they fade very nicely
and are super stable

Re: possible to dim / pwm several channels together

Posted: 08 Nov 2016, 09:26
by papperone
ledfreak3d wrote:I must say I don't use it my self I use a modified version of quindor's lau code to contoll my aquarium lights
they fade very nicely
and are super stable
can you share some info? maybe woudl be great to leverage the algorithm used for fading if very nice and create a RGBW plugin which is more "universal" than the P105 which emulates a MiLihght device...

Re: possible to dim / pwm several channels together

Posted: 08 Nov 2016, 11:03
by ledfreak3d
wel the fading in quindor's code is done automaticly it fades between levels instead of just selecting the level straight away

see http://blog.quindorian.org/2015/01/esp8 ... p-01.html/ for details on the code

would be great it it can be integrated into esp easy

Re: possible to dim / pwm several channels together

Posted: 09 Dec 2016, 23:44
by nygma
I was just looking for the same. Does anyone know if this has been considered (fading in between PWM states)? I guess this is not something which can be implemented in rules.

Re: possible to dim / pwm several channels together

Posted: 10 Dec 2016, 00:04
by ledfreak3d
Yep confirmed working with esp easy and domoticz with the correct script

Re: possible to dim / pwm several channels together

Posted: 10 Dec 2016, 09:28
by nygma
I am sorry, I don't understand. What does this mean?