OK, so I got this working. I made a small resident script that tracks the busload and then writes the value to a group address. Then one can add a trend for the busload and see the bus load in % over time.
As the getstats() is not giving the load as a percentage, but rather the number of telegrams in total, I have added a paramter for the number of telegrams pr second. This is of course not an exact value, as the length of the telegrams will vary. Normally, an average telegram time is 25ms, so that should give a theoretical max of 40/s.I have used a lower value in my script.
The getstats() is also only updated every minute, so the values we get from it is only to be seen as an indication of the bus load. The trend will be able to give you a hint that there might be too high bus load, and then you will have to do a more detailed analyze of this in another tool.
As the values are somewhat uncertain when it comes to actual bus load I have not seen the value in creating seperate GA for send, receive and repeats. I have only added them all together. If one want to split it, it should be fairly easy to modify the script accordingly.
I have tried this script and compared the loged value with the KNX Stats in the system page but it seems that the calculated value by the script is around half of the value is displayed in the KNX stats.
For the virtual object a datatype 1byte scale is used. Is this normal?
Is there a better way to calculate the knx bus load in percentage?
In KNX stats the maximum is set to 15 telegrams per second instead of 30 as in the example above. Repeats should not be counted as they are included in the received telegram count.