17.02.2020, 09:00
Hello!
Can you help to enable/disable modbus correctly?
Scenario. In case of prolonged absence, I turn off the power ventilation and the modbus reports an error every 5 seconds.
The solution was a script in firmware 201706:
value = grp.getvalue('32/0/15')
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')
In the new firmware it does not work correctly.
He really turns off the modbus.
But it can’t turn it on.
The RTU1 checkbox is enabled, but no data is received even when trying to read RTU - a message: RTU(serial) is not enabled.
Solution - manually disable and enable RTU1 checkbox.
How to correctly enable/disable RTUx from a script?
Can you help to enable/disable modbus correctly?
Scenario. In case of prolonged absence, I turn off the power ventilation and the modbus reports an error every 5 seconds.
The solution was a script in firmware 201706:
value = grp.getvalue('32/0/15')
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')
In the new firmware it does not work correctly.
He really turns off the modbus.
But it can’t turn it on.
The RTU1 checkbox is enabled, but no data is received even when trying to read RTU - a message: RTU(serial) is not enabled.
Solution - manually disable and enable RTU1 checkbox.
How to correctly enable/disable RTUx from a script?