Applications
Develop Python applications
LR54 User Guide
726
Note
Leave the interactive Python session active while completing task two, below. Once you have
completed task two, exit the interactive session by using
Ctrl-D
. You can also exit the session using
exit()
or
quit()
.
Task two: Create and send an SCI request from Digi Remote Manager
The second step in using the
device_request
module is to create an SCI request that Remote Manager
will forward to the device. For example, you can create in SCI request a the Remote Manager API
explorer:
1. In Remote Manager, click
Documentation
>
API Explorer
.
2. Select the device to use as the SCI target:
a. Click
SCI Targets
.
b. Click
Add Targets
.
c. Enter or select the device ID of the device.
d. Click
Add
.
e. Click
OK
.
3. Click
Examples
>
SCI
>
Data Service
>
Send Request
.
Code similar to the following will be displayed in the HTTP message body text box:
<sci_request version="1.0">
<data_service>
<targets>
<device id="00000000-00000000-0000FFFF-A83CF6A3"/>
</targets>
<requests>
<device_request target_name="myTarget">
my payload string
</device_request>
</requests>
</data_service>
</sci_request>
Note
The value of the
target_name
parameter in the
device_request
element must
correspond to the
target
parameter of the
device_request.register
function in the Python
script. In this example, the two are the same.
4. Click
Send
.
Once that the request has been sent to the device, the handler on the device is executed.
n
On the device, you will receive the following output:
>>> received request
my payload string
for target myTarget
>>>
n
In Remote Manager, you will receive a response similar to the following:
<sci_reply version="1.0">
<data_service>
Содержание 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 ...