24.02.2021, 08:49
Try this:
Code:
addr = '1/1/1'
-- delete object
grp.delete(addr)
-- clear modbus mapping
id = buslib.encodega(addr)
db:query('UPDATE modbus_mapping SET bus_address="" WHERE bus_address=?', id)
-- restart modbus
os.execute('sh /lib/genohm-scada/plugins/modbus/stop.sh; sleep 1; sh /lib/genohm-scada/plugins/modbus/start.sh')