For such script there are also from time to time timeouts:
I am using KNX cable A-red, B-black.
This is LM4, but other Modbus-RTU devices are working correctly. I am thinking that this is probably an issue of energy meter or its modbus part is little unique.
Code:
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485-2', 9600, 'N', 8, 1, 'H')
mb:connect()
mb:setslave(4)
-- L1 - N
-- read 32-bit floating point value from input register nr 123, use word swap
res, err = mb:readinputregistervalue(0, "float32", "w")
log(res, err)
mb:close()
I am using KNX cable A-red, B-black.
This is LM4, but other Modbus-RTU devices are working correctly. I am thinking that this is probably an issue of energy meter or its modbus part is little unique.