Logic Machine Forum
KNX message queue - 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: KNX message queue (/showthread.php?tid=1203)



KNX message queue - hummelsystemhaus - 30.01.2018

hi everybody,

we have a little problems with a big scene. There are about 30. KNX commands in this scene and if we activate the scene all commands get send. the elapsed time for sending all the commands is very short (some where around 20ms). We are using a gateway in this projekt to connect knx to a wireless bus. And here is the problem:
Only the first few commands will exectued in the other bus. This is because the commands came in to fast.
So my question is:

Is it possible to slow down the knx command queue? something like "limit the commands to 10 commands / messages per second" or something?
otherwise i need to write an ugly lua script, which makes a "os.sleep" after every command...it think this is not a nice solution.


RE: KNX message queue - Thomas - 30.01.2018

Hi
Sorry I don't know how to insert delays between packets so maybe I'm slightly out of topic. But I had similar issue and my solution was to set ACK for all messages. On both sides. What did you describe is a strange behavior. Packets can be delivered in a different order but should never be lost. As I remember most of KNX devices have output buffer for at least 5 last commands implemented. Transmission scheme on KNX line is CSMA/CA so collisions are detected.


RE: KNX message queue - Bitver - 30.01.2018

Hello. I don't know what the real problem is, but here is example of "pretty" Lua code. Note, loop on hashtable doesn't respect order, so if you need respect order you must use array of objects.
Code:
hashtable = {
 ['1/0/0'] = true,
 ['1/0/1'] = true,
 ['1/0/2'] = false,
}
for key, value in pairs(hashtable) do
 os.sleep(0.05) -- 50ms or you should try more
 --log(key, value)
 grp.write(key, value)
end



RE: KNX message queue - hummelsystemhaus - 31.01.2018

hi hanks for the reply,
but this is exactly what i said with ugly code. I dont want to write code for the scene, i want to use the scene modul.
maybe admin have any ideas?