07.02.2020, 22:08
(This post was last modified: 07.02.2020, 22:16 by Erwin van der Zwart.)
Hi,
First of all a Wiser for KNX can host a maximum of 10 devices by profile, this is a software restriction that is build in the Wiser for KNX firmware, if you need more profiles then you need to have a spaceLYnk that has no software limit. You should be able to read the 30 devices by profile with a spaceLYnk.
As i understand it correctly you now have several devices by profile and another set by script, do you read them over the same gateway (ICF module)?
If yes then i think you have a port (502) conflict when the profile and the script are reading the same device at the same moment. If that is the case i would advice you to read them all in sequence from script and to remove the other devices from the Modbus template engine.
To simplify your script (and have some extra routine checks) you can do this:
BR,
Erwin
First of all a Wiser for KNX can host a maximum of 10 devices by profile, this is a software restriction that is build in the Wiser for KNX firmware, if you need more profiles then you need to have a spaceLYnk that has no software limit. You should be able to read the 30 devices by profile with a spaceLYnk.
As i understand it correctly you now have several devices by profile and another set by script, do you read them over the same gateway (ICF module)?
If yes then i think you have a port (502) conflict when the profile and the script are reading the same device at the same moment. If that is the case i would advice you to read them all in sequence from script and to remove the other devices from the Modbus template engine.
To simplify your script (and have some extra routine checks) you can do this:
Code:
require('luamodbus')
mb = luamodbus.tcp()
mb:open('192.168.90.105', 502)
res, err = mb:connect()
if res then
mb:setslave(1)
value = mb:readregistervalue(32095,"uint64")
if value then
value = value * 0.001
grp.update("50/3/0", value)
end
for i = 2, 6, 1 do
os.sleep(0.2)
mb:setslave(i)
value = mb:readregistervalue(1999,"int32")
if value then
grp.update("50/3/" .. (i-1), value)
end
end
else
log('connect failed', err)
end
mb:close()
Erwin