# How do I interface with device properties setting?

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240>\
**Category:** Ignition\
**Created:** [July 22, 2022, 11:49pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240 "2022-07-22T23:49:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wildbilly](https://avatars.discourse-cdn.com/v4/letter/w/e19adc/32.png) [@wildbilly](https://forum.inductiveautomation.com/u/wildbilly)\
**Post date:** [July 22, 2022, 11:49pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/1 "2022-07-22T23:49:18Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/8/980ff8da1f8bea048b25e9280a215d6c11d6adc9.png)

you can supply the device add function these keys when adding… but how would someone query them and edit them after the fact? I don’t see them in config.idb 😕 is there a way?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 22, 2022, 11:51pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/2 "2022-07-22T23:51:56Z")

</div>

They are in their own tables, specific to each device type. There is no supported way to edit these programmatically. Except for hostname, IIRC.

---

<div class="post-metadata">

**Author:** ![wildbilly](https://avatars.discourse-cdn.com/v4/letter/w/e19adc/32.png) [@wildbilly](https://forum.inductiveautomation.com/u/wildbilly)\
**Post date:** [July 22, 2022, 11:54pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/3 "2022-07-22T23:54:36Z")

</div>

do you think there is any harming in editing the db say if i wanted to set span gaps or zerobased?  
during commissioning? would it harm the device connection or driver? I am making a device adding tool

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [July 22, 2022, 11:55pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/4 "2022-07-22T23:55:16Z")

</div>

If you want the unsupported methods;

> [@How to update the configuration of an existing device via System.device](https://forum.inductiveautomation.com/t/how-to-update-the-configuration-of-an-existing-device-via-system-device/52506):
>
> Hi everyone, I am trying to update the configuration of an existing device using System.device utilities. I can some devices via script as mentioned in the [System.device.addDevice](https://docs.inductiveautomation.com/display/DOC80/system.device.addDevice) document. Howerver, the system.device utility doesn’t have a function to get info of an existing device by the device name. There’s a function called system.device.getListDevices will return a read-only dataset of devices. You can see in the figure below. Thank you for your time!

I'm not sure if this module still exists or will do what you want, I came across it while searching for the above link;

> [@\[IALabs\] Scripting Module](https://forum.inductiveautomation.com/t/ialabs-scripting-module/5126):
>
> Scripting Module Exposes scripting functions to dynamically add/edit/delete devices, database connections, and tags in Ignition. Current version: 1.0.0 Download link: [IA Labs Scripting-module.modl](http://files.inductiveautomation.com/software/IA%20Labs%20Scripting-module.modl) Cost: This module will be free. Dependencies: OPC-UA module. To use: Simply install the module and call any of the following functions: Datasource Functions: system.db.addDatasource(…) - Takes PyArgs, example: system.db.addDatasource(jdbcDriver="MySQL ConnectorJ", name="MySQL", connectURL="…

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [July 22, 2022, 11:57pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/5 "2022-07-22T23:57:14Z")

</div>

Sorry, that top link isn’t the right one, but might give some more context. Trying to find the link I found a minute ago 😊

Edit; actually it is the right link, I just thought nminchin was the OP, I know he was working on similar.

Time for a coffee.

---

<div class="post-metadata">

**Author:** ![wildbilly](https://avatars.discourse-cdn.com/v4/letter/w/e19adc/32.png) [@wildbilly](https://forum.inductiveautomation.com/u/wildbilly)\
**Post date:** [July 22, 2022, 11:58pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/6 "2022-07-22T23:58:58Z")

</div>

```auto
	
		session = IgnitionGateway.get().getPersistenceInterface().getSession()
		
		try:
			session.rawUpdateDB("UPDATE DEVICESETTINGS SET Description = '" + deviceDesc + "' WHERE NAME = '" + newdeviceName +"'", []) # sql, flush, params
		finally:
		    session.close()			

```

something like this works well for me… I assume it is fine to edit the device properties table as well… ill give it a go anyways

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [July 22, 2022, 11:59pm UTC](https://forum.inductiveautomation.com/t/how-do-i-interface-with-device-properties-setting/62240/7 "2022-07-22T23:59:38Z")

</div>

Read the full thread and heed the warnings. It isn’t a supported method, for a reason.
