This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

DALI DT8 Dimmer
#9
Functions to get current RGBWAF:

Code:
function getChannel(gateway, addr, code)
 res, err = dalicmd(gateway, 'setdtr0', { addrtype = 'short', address = addr, value = code })
 if err then return nil, 'setdtr0 error: ' .. err end
 res, err = dalicmd(gateway, 'enabledevicetype', { addrtype = 'short', address = addr, value = 8 })
 if err then return nil, 'enabledevicetype error: ' .. err end
 res, err = dalicmd(gateway, 'querycolorvalue', { addrtype = 'short', address = addr })
 return res, err
end

function getRGBWAF(gateway, addr)
 -- codes for RGBWAF could be 233-237 or 227-232
 res_t = {}
 for i = 233, 237, 1 do
   res, err = getChannel(gateway, addr, i)
   if res then table.insert(res_t, res:byte()) end
 end
 return res_t
end
Reply


Messages In This Thread
DALI DT8 Dimmer - by managementboy - 06.11.2018, 15:55
RE: DALI DT8 Dimmer - by admin - 08.11.2018, 08:07
RE: DALI DT8 Dimmer - by managementboy - 17.11.2018, 13:39
RE: DALI DT8 Dimmer - by AEK - 28.11.2018, 09:19
RE: DALI DT8 Dimmer - by Daniel. - 28.11.2018, 10:12
RE: DALI DT8 Dimmer - by AEK - 28.11.2018, 10:28
RE: DALI DT8 Dimmer - by Snoolik - 19.12.2018, 12:16
RE: DALI DT8 Dimmer - by Snoolik - 26.12.2018, 12:22
RE: DALI DT8 Dimmer - by Snoolik - 08.05.2019, 09:48

Forum Jump: