Applications
Develop Python applications
LR54 User Guide
722
4. Use the help command with
datapoint.upload
:
>>> 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:float=None)
...
5. Use the help command with
datapoint.upload_multiple
:
>>> help(datapoint.upload_multiple)
Help on function upload_multiple in module digidevice.datapoint:
upload_multiple(datapoints:List[digidevice.datapoint.DataPoint],
timeout:float=None)
...
6. Use
Ctrl-D
to exit the Python session. You can also exit the session using
exit()
or
quit()
.
Use digidevice.config for device configuration
Use the
config
Python module to access and modify the device configuration.
Read the device configuration
1. Select a device in Remote Manager that is configured to allow shell access to the admin user,
and click
Actions
>
Open Console
. Alternatively, log into the LR54 local command line as a
user with shell access.
Depending on your device configuration, you may be presented with an
Access selection
menu
. Type
shell
to access the device shell.
2. At the shell prompt, use the
python
command with no parameters to enter an interactive
Python session:
# python
Python 3.10.1 (default, May
9 2021, 22:49:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
3. Import the
config
submodule:
>>> from digidevice import config
>>>
4. Use
config.load()
and the
get()
method to return the device's configuration:
a. Return the entire configuration:
>>> from pprint import pprint # use pprint vs. print to make the
output easier to read
Содержание TransPort LR54
Страница 1: ...LR54 User Guide Firmware version 22 8 ...
Страница 506: ...Virtual Private Networks VPN OpenVPN LR54 User Guide 506 5 Click Apply to save the configuration and apply the change ...
Страница 628: ...Services Simple Network Management Protocol SNMP LR54 User Guide 628 The SNMP page is displayed 4 Click Download ...
Страница 1050: ...Command line interface Execute a command from the web interface LR54 User Guide 1050 The Admin CLI prompt appears ...
Страница 1095: ...Command line interface Command line reference LR54 User Guide 1095 reboot Reboot the system Parameters None ...