Posts: 51
Threads: 14
Joined: Jul 2015
Reputation:
1
Hello,
I would like to know if there is any way how to check if there is a specific device on the KNX bus operating. In ETS we can just "ping" the physical address and get a yes/no result. It would be great if we can do something similar in LM. Possible use case: we have just arrived at a house where a KNX thermostat stopped working, therefor the heating was off. If we would have known that, the customer would not have to find it out after a long time.
Thanks
Posts: 8434
Threads: 45
Joined: Jun 2015
Reputation:
482
Code: result = knxlib.ping('1.1.1')
Posts: 51
Threads: 14
Joined: Jul 2015
Reputation:
1
13.10.2015, 12:10
(This post was last modified: 13.10.2015, 13:44 by Peter.)
(13.10.2015, 11:53)admin Wrote: Code: result = knxlib.ping('1.1.1')
you are the best! LM ROCKS! 
thanks
OK, I would like to extend my previous question for all of LM users: what other use cases of this little script can you think of? And more importantly: what other diagnostic tool for KNX bus and LM do you use, or would you want to use?
Thanks for all of your ideas.
Peter
Posts: 1807
Threads: 7
Joined: Jul 2015
Reputation:
121
I use it as a line check on the device at the end of a line, this way you know all cabling is still functional.
Posts: 51
Threads: 14
Joined: Jul 2015
Reputation:
1
I have another idea: if you do Export OPC from your ETS, you get also a project.phd file, which contains all the KNX devices with their physical addresses. Would it be possible to upload such a file to LM's ftp and then write a script that will check the bus for all these addresses?
Posts: 187
Threads: 43
Joined: Jul 2015
Reputation:
2
21.01.2016, 23:30
(This post was last modified: 21.01.2016, 23:31 by gtsamis.)
Hello,
I need to check if the devices on my line are alive. I am using LM Load Balnce that doesn't have TP1 on board knxlib.ping won't work.
Can someone suggest another way on how to implement same functionality without the use of knxlib.ping?
Thank you in advance
Posts: 6
Threads: 1
Joined: Feb 2016
Reputation:
0
Hi everyone!
I also use knxlib.ping for check accessibility of many KNX devices in few zones. Im try knxlib.ping every few minutes and if status of object is changed send push notification. If ping is fail im try few times with random seconds between it.
But every day many times ping is failed. May be another type of check is more stable? Like config perdiodicaly sent value of object (etc luminosity) and check last update time?
Posts: 200
Threads: 60
Joined: Jun 2015
Reputation:
7
Hi,
You could try changing the KNX address of the Logic Machine ( found in System Configuration \ Network \ KNX Connection ) to an free address on the first line of the KNX bus.
Thanks,
Roger
Posts: 6
Threads: 1
Joined: Feb 2016
Reputation:
0
(28.02.2016, 20:47)rocfusion Wrote: Hi,
You could try changing the KNX address of the Logic Machine ( found in System Configuration \ Network \ KNX Connection ) to an free address on the first line of the KNX bus.
Thanks,
Roger
Thank you. My LM uses last free address (1.1.253) and dont cross with another devices.
I think what root cause is any problem with bus? but in same time from pinged device im receive another telegram.
Posts: 200
Threads: 60
Joined: Jun 2015
Reputation:
7
when you create a new script on a object that pings a module which is known to fail does that work? disable your scheduled script for this test.
Posts: 8434
Threads: 45
Joined: Jun 2015
Reputation:
482
Another approach is to map a specific read-only group address and send read requests from LM to check if the device is alive. This will work even over IP networks.
Code: addr = '1/1/1'
-- send read request and wait for reply
grp.read(addr)
os.sleep(2)
-- get time difference between now and last telegram
obj = grp.find(addr)
delta = os.time() - obj.updatetime
if delta < 10 then
alert('Check OK')
else
alert('Check FAIL')
end
Posts: 13
Threads: 5
Joined: May 2022
Reputation:
0
(02.03.2016, 08:46)admin Wrote: Another approach is to...
Old thread...NEWbie questions
I have a few knx-devices i want to monitor and when a device is not responding I would like to send True in a GA. Separate GA's for each device.
No problem running 6-7 of these in parallell?
How do you run this, should one use a scheduled script? Every 5 min, 10 min?
In the reference manual under Basic functions there is the sleep. An then there is os.sleep. Could anyone explain the difference?
Posts: 8434
Threads: 45
Joined: Jun 2015
Reputation:
482
Create a single scheduled script and modify addrs table as needed. Left side (key) is individual address, right side (value) is status group address.
Code: addrs = {
['1.1.1'] = '32/1/1',
['1.1.2'] = '32/1/2',
['1.1.3'] = '32/1/3',
}
for ia, ga in pairs(addrs) do
res = buslib.ping(ia)
grp.checkupdate(ga, not res)
os.sleep(1)
end
Run the script as often as you need to check the devices.
There's no difference between os.sleep and sleep, it's the same function.
Posts: 13
Threads: 5
Joined: May 2022
Reputation:
0
Posts: 2
Threads: 0
Joined: Nov 2025
Reputation:
0
(05.11.2025, 08:06)admin Wrote: Create a single scheduled script and modify addrs table as needed. Left side (key) is individual address, right side (value) is status group address.
Code: addrs = {
['1.1.1'] = '32/1/1',
['1.1.2'] = '32/1/2',
['1.1.3'] = '32/1/3',
}
for ia, ga in pairs(addrs) do
res = buslib.ping(ia)
grp.checkupdate(ga, not res)
os.sleep(1)
end
Run the script as often as you need to check the devices.
There's no difference between os.sleep and sleep, it's the same function.
I'd like to check/monitor a read response instead of pinging, as in the #11 post, but if possible using a table and a boolean output sent to separate group addresses as in #13 post.
Can I use the left side (key) as the group address to read from and the right side (value) as output group address?
Change buslib.ping to grp.readvalue?
Then add obj = grp.find etc?
Posts: 5319
Threads: 29
Joined: Aug 2017
Reputation:
239
Try this, it takes 2 seconds for each group so run it accordingly based on the amount.
Code: addrs = {
['1/1/2'] = '32/1/1',
['1/1/4'] = '32/1/2',
['1/1/6'] = '32/1/3',
}
for ia, ga in pairs(addrs) do
grp.read(ia)
os.sleep(2)
-- get time difference between now and last telegram
obj = grp.find(ia)
delta = os.time() - obj.updatetime
if delta < 10 then
grp.checkupdate(ga, true)
else
grp.checkupdate(ga, false)
end
end
------------------------------
Ctrl+F5
Posts: 2
Threads: 0
Joined: Nov 2025
Reputation:
0
|