9: Administration
SGX 5150 IoT Device Gateway User Guide
78
TM
To Configure Action Settings
Using Web Manager
To view Action status, on the
Administration
page, click
Action > Status
on the menu.
To modify Action information, on the
Administration
page, click
Action > Configuration
on
the menu and select a specific action from the drop-down menu.
lists the
options.
Using the CLI
To enter the eth0 link state change command level:
enable > config > action > eth0
link state change
To enter the wlan0 link state change command level:
enable > config > action >
wlan0 link state change
To enter device temperature change command level:
enable > config > action >
device temperature change
To enter on scheduled reboot command level:
enable > config > action > on
scheduled reboot
Using XML
Include in your file:
<configgroup name = "action" instance = "eth0 link
state change">
Include in your file:
<configgroup name = "action" instance = "wlan0 link
state change">
Include in your file:
<configgroup name = "device temperature change"
Include in your file:
<configgroup name = "action" instance = "on scheduled reboot">
Python
Python™ is a dynamic, object-oriented programming language that can be used for developing a
wide range of software applications. The Lantronix SGX 5150 includes the installation of Python
interpreter, making it easy to load and run custom Python scripts on your device.
The version of Python programming language installed on the Lantronix SGX 5150 comes with
"batteries included" by having the Python language's standard library. In addition, the developer
can take advantage of thousands of available third party packages to speed up development.
IDE
Python scripts can be written with any text editor. If using Windows for development, + is
a powerful choice as this text editor includes traditional IDE features such as syntax highlighting
and automatic indentation (
http://notepad-plus-plus.org/
). + also includes the ability to
customize through plugins. Some interesting plugins for the development of Python scripts for the
Lantronix SGX 5150 platform include the following:
PyNPP:
https://github.com/mpcabd/PyNPP
This plugin allows the user to use keystrokes to launch the open Python script in the local
Python interpreter for debugging and testing.