13.11.2025, 05:56
(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?