# Reimplementating system.device.addDevice functionality

**URL:** <https://forum.inductiveautomation.com/t/reimplementating-system-device-adddevice-functionality/111062>\
**Category:** Module Development\
**Tags:** ignition83\
**Created:** [September 29, 2025, 3:39pm UTC](https://forum.inductiveautomation.com/t/reimplementating-system-device-adddevice-functionality/111062 "2025-09-29T15:39:20Z")\
**Posts on this page:** 1\
**Showing post:** 17

<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:** [June 15, 2026, 4:23pm UTC](https://forum.inductiveautomation.com/t/reimplementating-system-device-adddevice-functionality/111062/17 "2026-06-15T16:23:31Z")

</div>

Yes, that's absolutely an intended use case. Basically all the one-off configuration manipulation functions (in system.device, system.db, etc) can now be expressed in the `system.config` API, albeit more verbosely:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d3ff8277fcf8ca26f428716f7fc5cc9d14fc8a01.png)

For instance, here's a (contrived) example of adding a Modbus device with some overrides, plus an address mapping:

```python
def modbus(hostname, port=502, timeout=2000):
	return {
	  "profile": {
	    "browsePath": "",
	    "type": "ModbusTcp"
	  },
	  "settings": {
	    "advanced": {
	      "maxRetryCount": 1,
	      "reconnectAfterConsecutiveTimeouts": True,
	      "reverseWordOrder": False,
	      "zeroBasedAddressing": False
	    },
	    "connectivity": {
	      "communicationTimeout": timeout,
	      "hostname": hostname,
	      "localAddress": "",
	      "port": port
	    },
	    "readRequests": {
	      "readMultipleCoilsAllowed": True,
	      "readMultipleDiscreteInputsAllowed": True,
	      "readMultipleRegistersRequestAllowed": True
	    },
	    "requestOptimization": {
	      "concurrentRequests": 1,
	      "maxCoilsPerRequest": 2000,
	      "maxDiscreteInputsPerRequest": 2000,
	      "maxHoldingRegistersPerRequest": 125,
	      "maxHoldingRegistersPerWriteRequest": 123,
	      "maxInputRegistersPerRequest": 125,
	      "spanGaps": True
	    },
	    "stringHandling": {
	      "readRawStrings": False,
	      "reverseByteOrder": False,
	      "rightJustifyStrings": False
	    },
	    "writeRequests": {
	      "forceMultipleRegisterWritesEnabled": False,
	      "writeMultipleCoilsRequestAllowed": True,
	      "writeMultipleRegistersRequestAllowed": True
	    }
	  }
	}

def createModbus():
	return system.config.create(
		moduleId="com.inductiveautomation.opcua",
		typeId="device",
		name="MyTestDevice",
		config=modbus("1.1.1.1"),
		files={
			"address-map.txt": system.file.readFileAsBytes("/Users/pgriffith/Downloads/modbus-config.csv")
		},
		description="A device created in a script",
		enabled=False,
		actor="joe.schmoe",
	)

```

For now, you always have to specify all the configuration - there's no merging with defaults.

---

_[View the full topic](https://forum.inductiveautomation.com/t/reimplementating-system-device-adddevice-functionality/111062)._
