[bug-15455]addDevice zeroBasedAddressing not working properly on upgrade

I’ve tried both zeroBaseAddressing and oneBasedAddressing on addDevice, but the device created is always set to True.

8.0.6 RC1

system.device.addDevice(deviceType = "ModbusTcp", deviceName = "Modbus_2", deviceProps = {'hostname': "1.1.1.1", "zeroBasedAddressing": True})
is properly creating a device with the setting False True, for me. Are you using the older-style syntax with named arguments, or the newer ‘deviceProps’ syntax?

Using the exact code you just posted, the device created still has True.

Yes…as it should be? The setting is now Zero Based Addressing in the GUI, as well:
image

EDIT: Doh, of course I use the wrong word in my original post.

Right. But I am trying to make it so the value is False on the gateway.

system.device.addDevice(deviceType = “ModbusTcp”, deviceName = “Modbus_2”, deviceProps = {‘hostname’: “1.1.1.1”, “zeroBasedAddressing”: False})
and
system.device.addDevice(deviceType = “ModbusTcp”, deviceName = “Modbus_2”, deviceProps = {‘hostname’: “1.1.1.1”})

both still set the value to True.

I just tested 8.0.6RC1 and the nightlies and it’s working fine for me - passing False results in a setting of False, omitting the setting results in the default False, passing True results in True. Can you get in touch with support?

system.device.addDevice(deviceType = “ModbusTcp”, deviceName = “Modbus_2”, deviceProps = {“hostname”:“1.1.1.1”, “zeroBasedAddressing”: False})

Results on gateway.
Fresh install 805 = True
Fresh install 807 = False

Fresh install 805 upgraded to 807 = True
So it treats upgraded gateways differently.

The fix for the issue described here isn’t in the main-line 8.0.7 yet - 8.0.6 has it fixed in the final release, but the changes won’t be merged into 8.0.7 until after that release actually happens. There shouldn’t be any way for the setting to be acting like that besides that schema upgrade firing, so I’m going to say it’ll be fixed once everything’s brought up to date - but we’ll definitely keep an eye on it and do more testing.

1 Like

Well, egg on my face, there’s a separate issue that I need to fix. Should probably make it into 8.0.7.