22.05.2017, 21:43
If the modbus bus is not proprietary the LM should be able to handle it.
You can try with this.
You can try with this.
Code:
require('luamodbus')
mb = luamodbus.rtu()
mb:open('/dev/RS485', 19200, 'E', 8, 1, 'H') -- change with correct MB settings : speed, parity, stop bit, ...
mb:connect()
if mb ~= nil then
value = mb:readregisters(40188) -- read AC current register
log(value)
mb:close()
end