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 that you accept these cookies being set.

KNX message queue
#1
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.
Reply
#2
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.
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply
#3
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
Reply
#4
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?
Reply


Forum Jump: