Logic Machine Forum
DALI dimming and scale objects - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: DALI dimming and scale objects (/showthread.php?tid=1817)



DALI dimming and scale objects - managementboy - 04.01.2019

I am dying trying to wrap my head around this. The touch panel MDT Smart 86 has 4 Objects to control dimming. On/off , Dimming, and I think Visu Scale on one button.

This is how it looks in my LM DR
   

this is how I have configured in ETS4 (PB2 is the button)
   

The button Kitchen does dimm and do on/off, but the scale object does not update to the real dimming value neither in the LM nor on the Button Display.

what am I doing wrong?


RE: DALI dimming and scale objects - admin - 05.01.2019

LM does not provide status feedback for DALI light levels. You can create a resident script to poll actual values from ballasts. Do you have many of them?


RE: DALI dimming and scale objects - managementboy - 05.01.2019

(05.01.2019, 13:27)admin Wrote: LM does not provide status feedback for DALI light levels. You can create a resident script to poll actual values from ballasts. Do you have many of them?

Hi! I have 8 devices (4 on each Lunatone).


RE: DALI dimming and scale objects - admin - 05.01.2019

Use this resident script, 0 sleep time. It will poll each ballast, then sleep for 1 second internally. You need to create status objects manually, this example uses 32/2/0..32/2/7 range. Data type is 1-byte scale, make sure that status objects are not the same as control objects.

Code:
require('user.dali')

for address = 0, 7 do
  res = dalicmd('internal', 'queryactual', { addrtype = 'short', address = address })

  if res then
    value = res:byte()
    value = math.floor(value / 2.54 + 0.5)
    
    grp.checkupdate('32/2/' .. address, value)
  end

  os.sleep(1)
end



RE: DALI dimming and scale objects - managementboy - 05.01.2019

res = dalicmd('internal', 'queryactual', { addrtype = 'short', address = address })

returns Nill for all addresses ... on/off works flawlessly

ohh my mistake, changed it to "internal2". Works!!! thank you


RE: DALI dimming and scale objects - khalil - 24.04.2022

(05.01.2019, 18:02)admin Wrote: Use this resident script, 0 sleep time. It will poll each ballast, then sleep for 1 second internally. You need to create status objects manually, this example uses 32/2/0..32/2/7 range. Data type is 1-byte scale, make sure that status objects are not the same as control objects.

Code:
require('user.dali')

for address = 0, 7 do
  res = dalicmd('internal', 'queryactual', { addrtype = 'short', address = address })

  if res then
    value = res:byte()
    value = math.floor(value / 2.54 + 0.5)
   
    grp.checkupdate('32/2/' .. address, value)
  end

  os.sleep(1)
end

Hello Admin 
What method could one use for more devices like 40?
Tag on the control objects could help?


RE: DALI dimming and scale objects - admin - 25.04.2022

Change 7 on line 3 to the number of ballasts you want to poll.


RE: DALI dimming and scale objects - khalil - 25.04.2022

(25.04.2022, 06:18)admin Wrote: Change 7 on line 3 to the number of ballasts you want to poll.

I did, but its takes 40 seconds to update all feedback.
Is there an optimized solution?


RE: DALI dimming and scale objects - admin - 25.04.2022

You can lower the sleep time between each poll.


RE: DALI dimming and scale objects - khalil - 25.04.2022

(25.04.2022, 08:52)admin Wrote: You can lower the sleep time between each poll.

Could I set it to 0.1?


RE: DALI dimming and scale objects - admin - 25.04.2022

Try and see if it works for you. DALI bus is very slow so it can be easily overloaded. If you query too often then the control requests will be delayed.


RE: DALI dimming and scale objects - khalil - 25.04.2022

(25.04.2022, 08:58)admin Wrote: Try and see if it works for you. DALI bus is very slow so it can be easily overloaded. If you query too often then the control requests will be delayed.

Thanks I will try.
Also I should use only one script to read/write from/to DALI Bus in-order to prevent collision?
another thing, How to read the ballast on/off status ?
BR,


RE: DALI dimming and scale objects - admin - 25.04.2022

You can use multiple scripts in parallel. For both on/off and scale status see this: https://forum.logicmachine.net/showthread.php?tid=2665&pid=19988#pid19988


RE: DALI dimming and scale objects - khalil - 25.04.2022

(25.04.2022, 09:20)admin Wrote: You can use multiple scripts in parallel. For both on/off and scale status see this: https://forum.logicmachine.net/showthread.php?tid=2665&pid=19988#pid19988

Big thanks


RE: DALI dimming and scale objects - toujour - 19.09.2024

Is this right also today for the LM5-DW1 ? I have a new installation with it.


RE: DALI dimming and scale objects - admin - 19.09.2024

Yes, for the second port change internal to internal2