Run Python applications
Python 3.6.4
>>> from digidevice import datapoint
>>> help(datapoint.upload)
Help on function upload in module digidevice.datapoint:
upload(stream_id:str, data, *, description:str=None,
timestamp:float=None, units:str=None, geo_location:Tuple[float, float,
float]=None, quality:int=None, data_
type:digidevice.datapoint.DataType=None, timeout:floa
t=None)
.
.
.
>>>
digidevice.config module
Use the digidevice.config module to access and modify the device configuration.
The code snippet below demonstrates how to read the device configuration using the
digidevice.config module:
# python
Python 3.6.4
>>> from digidevice import config
>>> cfg = config.load()
>>> print(cfg)
action.ModemManager.config.0=action.ModemManager.debug
action.ModemManager.config_restart=false
action.ModemManager.cron=
action.ModemManager.debug=false
.
.
.
>>> print(cfg.get("system.name"))
IX14
interfaces = cfg.get("network.interface")
print(interfaces.keys())
['aview', 'defaultip', 'defaultlinklocal', 'lan', 'loopback', 'modem']
>>> print(interfaces.get("lan.ipv4.address"))
192.168.2.1/24
>>>
The code snippet below demonstrates how to write the device configuration using the
digidevice.config module:
# python
Python 3.6.4
>>> from digidevice import config
>>> cfg = config.load(writable=True)
>>> cfg.set("system.name", "New-Name")
>>> cfg.commit()
True
>>> print(cfg.get("system.name"))
New-Name
>>>
Digi IX14 User Guide
Get help with Python programming on the Digi IX14
52
Need help?
Do you have a question about the IX14 and is the answer not in the manual?
Questions and answers