Page 1 of 1

Can't dim light with LUA

Posted: Thursday 24 November 2016 18:55
by Melissen
Hi, I want to dim my lights with a LUA-command. In my switchpanel I can dim the lights (higher or lower).

I used this command:

if devicechanged['Woonkamer -alles']=='On' and otherdevices['Keuken spotjes']=='Off' then
commandArray['Keuken spotjes']='Set Level: 5%'
end

But the lights don't dim to 5%. They will go on, when they are off. But they remain on 60% which was the dimming-state on the switch panel.
I've got the KIKA AILD-250 dimmer installed.

How do I solve this problem?

And is there also a command to read out the dimming-rate in LUA?

Very new to LUA and the search-function didn't helped me either....

Re: Can't dim light with LUA

Posted: Thursday 24 November 2016 18:57
by Melissen
Naam: Keuken spotjes
Weergeven regelsZoeken :
Datum
Data
2016-11-24 18:56:18 Set Level: 60 %
2016-11-24 18:56:17 Set Level: 66 %
2016-11-24 18:46:53 Set Level: 6 %
2016-11-24 18:46:20 Off
2016-11-24 18:39:51 Set Level: 66 %
2016-11-24 18:39:49 Set Level: 26 %

This is the log for Keuken spotjes... when I change the dimmingrate manually

Re: Can't dim light with LUA

Posted: Thursday 24 November 2016 19:00
by jvdz
-edit- I see it works when using the slider in Domoticz?
what command are you sending with LUA?

Code: Select all

commandArray['Keuken spotjes']='Set Level 5'
Jos

Re: Can't dim light with LUA

Posted: Thursday 24 November 2016 19:21
by Melissen
Tried this,,, doens't work

In Blockly I can dim the light biy pressing a switch... very strange. Seems to be a fault in the command: set level

Re: Can't dim light with LUA

Posted: Thursday 24 November 2016 19:44
by Melissen
Image
Image
Image

Re: Can't dim light with LUA

Posted: Friday 25 November 2016 0:39
by Melissen
Typed everything again.... it works now...

I can put the script down, if someone wants to have it.



PROBLEM SOLVED !!!

Image