Programming interfaces and capabilities
11
Programming interfaces and capabilities
The ConnectPort X2e ZB allows custom embedded logic via the Python scripting language. To
meet the needs of customers with varying levels of Python expertise and application complexity, a
number of development strategies are supported, which can be mixed and matched as a developer
sees fit:
Python development independent of the target device
The ConnectPort X2e ZB features a standard Python 2.7 distribution, allowing applications that are
not dependent on Digi-proprietary interface modules to be developed and tested independently of
the device. Scripts developed in this manner can generally be transferred to the device for final
testing at the end of the development cycle, with a PC serving as a device proxy during the bulk of
development.
Python development on the target device
The ConnectPort X2e ZB features a Linux shell interface allowing a developer to experiment with
the Python interpreter interactively, create scripts, launch scripts, and control their operation.
Digi ESP for Python
The ConnectPort X2e ZB is supported by the Digi ESP for Python, an IDE featuring device
detection, debugging, compiling and downloading of iDigi Dia/Python code to Digi gateways.
Integrated into the Digi ESP are example applications that can demonstrate the use of some of
Digi’s proprietary Python extensions, serving as templates for applications seeking to incorporate
common functionality.
iDigi Dia
The ConnectPort X2e ZB is supported by the iDigi Dia application framework, which is provided
within Digi ESP for Python. The iDigi Device Integration Application (“Dia”) is an application
software platform for Digi gateways. iDigi Dia makes connecting remote devices and sensors to
Digi gateway products easy by providing a ready-to-use software. Put simply, the iDigi Dia
framework is used to gather data from XBee sensor networks, transform the data into a useful form,
and push the data to the iDigi Device Cloud for consumption by a user. iDigi Dia is written in the
Python programming language, and can be extended to meet unique device connectivity
requirements. Particularly valuable in conjunction with the Digi ESP for Python, the iDigi Dia
framework seeks to shrink the development cycle for complex data gathering and transformation
applications. With abstractions for components like interface handling (drivers), data management
(channels), data delivery (presentations); and a library of ready-to-use modules for common
operations; the iDigi Dia framework allows a developer to focus efforts on proprietary logic, not
the glue that holds an application together. The iDigi Dia application framework also provides the
shortest path to integration on proprietary logic with Digi’s network device and data management
platform, iDigi.