Logic Machine Forum
LM5 DW1 4bit with KNX Sensor - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: LM5 DW1 4bit with KNX Sensor (/showthread.php?tid=3673)



LM5 DW1 4bit with KNX Sensor - pepe - 10.11.2021

Hello everyone

I would like to dim the light using a KNX button (4-bit datapoint).
In the dali tab, i can link this object for the lamp, the dimming works well for one lamp, but as soon as more than 5 lamps with the same data type are controlled, the lamps dim differently and with a delay.

does anyone know a script to control the dali group with 4bit datapoint?
like that:

daligroup=0
if (grp.getvalue('10/0/3') > 1) then
require('user.dali')
dalicmd('internal', 'arc', { addrtype = 'group', address = daligroup, value = (grp.getvalue('10/0/3')*2.54) })
  else
  require('user.dali')
dalicmd('internal', 'arc', { addrtype = 'group', address = daligroup, value = 0 })
end


thx

used firmware: LM5 Lite+Ext (i.MX6)
produkt: LM5 DW1


RE: LM5 DW1 4bit with KNX Sensor - Daniel - 10.11.2021

There is probably better way but you could convert this script. It was created for short address and to be dimmed bu visu button 4 bit object.
https://forum.logicmachine.net/showthread.php?tid=1334&pid=8061#pid8061


RE: LM5 DW1 4bit with KNX Sensor - pepe - 10.11.2021

thank you very much, but this is the wrong way...

I was able to dim with the following script, the problem is that I have to press it every time.
as soon as I press it, it must be sent cyclically, as long as I press the button, it is dimmed (that is normal)

daligroup=0
if (grp.getvalue('10/0/52') == 9) then
require('user.dali')
dalicmd('internal', 'up', { addrtype = 'group', address = daligroup })
dalicmd('internal2', 'up', { addrtype = 'group', address = daligroup })

elseif (grp.getvalue('10/0/52') == 1) then
require('user.dali')
dalicmd('internal', 'down', { addrtype = 'group', address = daligroup })
dalicmd('internal2', 'down', { addrtype = 'group', address = daligroup })

end

big thx


RE: LM5 DW1 4bit with KNX Sensor - Daniel - 10.11.2021

This is why the script I sent you use while loop.


RE: LM5 DW1 4bit with KNX Sensor - admin - 10.11.2021

Do as Daniel suggested and use 0.2 seconds sleep time between up/down calls


RE: LM5 DW1 4bit with KNX Sensor - pepe - 11.11.2021

(10.11.2021, 11:39)Daniel Wrote: There is probably  better way but you could convert this script. It was created for short address and to be dimmed bu visu button 4 bit object.
https://forum.logicmachine.net/showthread.php?tid=1334&pid=8061#pid8061

Hello Daniel
Thank you very much, it worked perfectly
the script controls my dali group with few adjustments