02.10.2016, 19:05
Thanks.
Is it possible to set the profile to poll the read values even though it haven't changed?
I have a Gira Homeserver, KNX visualization, but I can't read the modbus values from the KNX bus, by sending a read request or read on init, when the server reboots.
I have tried script, but it returns 0, always.. even though the value should be greater!
I have disabled RTU, and the register adress is 4x00027.
The LM modbus profile can read this register, but it doesn't poll the value since it's not changed often, but I need to learn my KNX devices this value when they reboot or things like that.
Is it possible to set the profile to poll the read values even though it haven't changed?
I have a Gira Homeserver, KNX visualization, but I can't read the modbus values from the KNX bus, by sending a read request or read on init, when the server reboots.
I have tried script, but it returns 0, always.. even though the value should be greater!
Code:
-- init modbus on first script execution
if not mb then
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485', 9600, 'N', 8, 1, 'H')
mb:connect()
end
-- sets slave ID to read/write data from/to
mb:setslave(1)
result=mb:readregisters(27)
grp.write('2/3/10',result)
mb:close()
I have disabled RTU, and the register adress is 4x00027.
The LM modbus profile can read this register, but it doesn't poll the value since it's not changed often, but I need to learn my KNX devices this value when they reboot or things like that.