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

**URL:** <https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925>\
**Category:** Ignition Early Access\
**Created:** [November 13, 2019, 12:33am UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925 "2019-11-13T00:33:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [November 13, 2019, 12:33am UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/1 "2019-11-13T00:33:49Z")

</div>

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

8.0.6 RC1

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 13, 2019, 5:24pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/2 "2019-11-13T17:24:06Z")

</div>

`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?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [November 13, 2019, 5:47pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/3 "2019-11-13T17:47:16Z")

</div>

> [@\[BUG-14790\] system.device.addDevice - zeroBasedAddressing is inverted](https://forum.inductiveautomation.com/t/bug-14790-system-device-adddevice-zerobasedaddressing-is-inverted/27222/8):
>
> system.device.addDevice(deviceType = "ModbusTcp", deviceName = "Modbus\_2", deviceProps = {'hostname': "1.1.1.1", "zeroBasedAddressing": True})

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

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 13, 2019, 5:51pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/4 "2019-11-13T17:51:52Z")

</div>

Yes…as it should be? The setting is now `Zero Based Addressing` in the GUI, as well:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a712ce13137cff70a98d51a4b50c9060194fa191.png)

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

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [November 13, 2019, 6:08pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/5 "2019-11-13T18:08:24Z")

</div>

> [@\[BUG-14790\] system.device.addDevice - zeroBasedAddressing is inverted](https://forum.inductiveautomation.com/t/bug-14790-system-device-adddevice-zerobasedaddressing-is-inverted/27222/8):
>
> system.device.addDevice(deviceType = "ModbusTcp", deviceName = "Modbus\_2", deviceProps = {'hostname': "1.1.1.1", "zeroBasedAddressing": True})

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 13, 2019, 7:01pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/6 "2019-11-13T19:01:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [November 13, 2019, 8:22pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/7 "2019-11-13T20:22:46Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 13, 2019, 9:11pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/8 "2019-11-13T21:11:44Z")

</div>

The fix for the issue described [here](http://forum.inductiveautomation.com/t/modbus-v2-8-0-6-rc1-zero-based-addressing/29587/3?u=pgriffith) 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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 14, 2019, 10:34pm UTC](https://forum.inductiveautomation.com/t/bug-15455-adddevice-zerobasedaddressing-not-working-properly-on-upgrade/29925/9 "2019-11-14T22:34:17Z")

</div>

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