30.08.2019, 06:42
Use this event script to emulate a web request to enable/disable RTU. Attach it to a boolean object.
Code:
value = event.getvalue()
require('uci')
require('json')
function getvar()
return 'config-save'
end
function json.data()
return { enabled = value }
end
dofile('/lib/genohm-scada/plugins/modbus/web.lua')