Change the ports of a modbus device by script

Hello,

I would like to know if it’s possible to change the ports of a mobus device.
I have found a solution for the hostname but nothing for the ports

myDevices = system.device.listDevices()
system.device.setDeviceHostname(deviceName,ipAddress)

Thanks

I don’t think there is a current mechanism for editing devices, outside of what you’ve already seen. Looks like you would have to remove, then add the device back in.

Thank you, That’s what I tought.
This is a pity because it is possible to change all the parameters from the Gateway and only a few per script.