I've been testing some emergency lights with a KNX/DALI-gateway.
There are two status-objects from each converter:
- DPT244.600 DALI converter status
- DPT245.600 DALI converter test result
In the manual the 2byte and the 6byte object are divided into several results, like converter status, hardware status and so on.
Here are the full explanation on the content of these two objects:
Anyone made a solution for this in LM5/SL/Wiser??
Or maybe another post on this forum I've overlooked?
I would like to have one GA for each status/result in these objects, but can't get it to work.
I've managed to get some HEX-value, but somehow the part in the string with 00 get "lost in translation "
Have been testing with some of the solutions in this forum, but not sure if I understand it right.
I'm working with a Zennio DALIBOX KNX-gateway at the moment.
Could you please give me a full example of the script. I would like to have this script in general for anykind of bitset decoding. In my case I need to decode a 1byte message to 8 bits (boolean) and then visualize them so to be able to write a KNX Object or Virtual for each bit. (Please have a look at the attached photo)
But I also have a big project where emergency dali lights are insalled and I would like to be able to decode the status of the converter (1byte and 3bytes) bit by bit.
(21.09.2018, 10:04)admin Wrote: Use this event script to get specific bits from an integer value. Make sure to create bit objects manually before running it.
Code:
function getbit(value, nr)
value = bit.rshift(value, nr)
return bit.band(value, 1) == 1
end
(21.09.2018, 10:54)admin Wrote: You can access any value up to 4 bytes the same way. Second argument for getbit function is bit number (starting from 0, up to 31).
You can also access bytes separately by using the code from the first example:
Code:
hex = event.datahex
bytes = {}
for i = 1, #hex, 2 do
bytes[ #bytes + 1 ] = tonumber(hex:sub(i, i + 1), 16)
end
function getbit(value, nr)
value = bit.rshift(value, nr)
return bit.band(value, 1)
end
The script works and logs the right datasets. What I need now is a way to write out the different parts to different group addresses for BMS purposes. Could you give a hint on how to do this also?