What is what and where in the digi ecosystem

I built my own WSN last year with XBee radios hooked up to sensors and an xbee radio tied in, serially, to an Asus wifi router. I flashed the router with OpenWRT and added python. The python scripts read the sensor radio data and then send it to data logger web services like Pachube.com. From there I can very easily aggregate charts into my own web site. Pachube also has triggering mechanisms.

I am now playing with an X2 and a smart plug and trying to accomplish a similar setup but for the life of me I can’t see how I’m supposed to accomplish that.

I see the iDigi platform on the server end which seems to be able to detect the pings from my X2. It indicates that it sees the Smart Plug. All good and I can set the A4 setting on the smart plug config to turn a lamp on/off. Wooeee!

I’m looking at Getting Started Guides and stuff about Digi Dia, about how to add new libs to the gateway, about some mechanisms for collecting data into the iDigi system, how to access something via web services to see charts (I think), but I can’t seem to see an overview of how this all fits together or a diagram or a discussion about what approach is best for different conditions…

Please, does anybody know of references or documents that explain this? Perhaps in more technical terms?

  • Where IS the actual database? (just curious)
  • How do I send sensor readings to iDigi? Is it happening automatically?
  • I read a description of various types of cached data. How long does this last? If I want to store my data for a year, how much does it cost? How much data can I store; iow, how granular can I see my stats?
  • Where do the Dia python scripts run? On the gateway? In a virtual environment in the iDigi Server?
  • How can I get access to urllibs in a script I loaded into the X2? (If I get that far, could I just call 3rd party web services from my code?)
  • How can I send my sensor readings to Pachube.com, or ThingSpeak, or OpenSen.se?

These are the kinds of questions I’m trying to answer but I’m not asking someone to tell me all the natty details, just where I can find the info.

Thanks in advance,


Too many questions? Ohhh…

iDigi is the secured cloud service.

Digi provide two types of cloud services:

  1. Developer Cloud – helps for development purpose with some limitations of device and data usage. This is free service.
  2. Production Cloud. – helps for actual professional use. Provides all the features with multiple devices and data usage. Provides iDigi SMS facility. Provides multiple user access to a single account with different accesses as required. This is the paid cloud.

To read the sensor reading and upload to the iDigi Data Storage, you need a python script running on the gateway with some additional library modules added to the .zip file and libraries need to be imported from .zip file. You need to add these libraries to say.path.

DIA is the open source application and it runs on the gateway, as per dia.yml is configured. The preferred way to use DIA is using Digi ESP for Python.

urllib, httplib etc are not by default in the ConnectPort X gateways. We can add these module in the .zip file in the compiled format. And we can import those modules by adding .zip to sys.path.

You can send your sensor reading to anywhere in the web. Provided you have python script running on the gateway.

I hope this helps.

That’s a great start, Shahrj.

I really appreciate your help. It is a shame that Digi doesn’t have an overview or PDF document that gives a newbie a reference to understand the “ecosystem” of the digi development world.

I must now learn about:

  • ESP - is it a specialized IDE? Why is it better than what I use for python scripting, notepad++ or Eclipse?

  • which features I can leverage from the iDigi platform (hopefully with APIs); data analysis, jQuery charting, client provisioning, sensor alerts and trigger settings with control signals

  • where is iDigi storage and once I’m finished with development and want to use the production mode, how much will it cost me? Perhaps it would be better for me to build my own data logger or use Pachube, ThingSpeak, or Open.Sen.se

  • urllib, httplib - seems these would be very common and someone would already have a set zipped. I have latest version of python on my dev machines and would need to re-install 2.4.3 for compiling versions for the gateway, right? I would assume there would be a digi repository for these libs. (although I suppose this is outside what digi would encourage us to do; they would want us to use the default sensor storage, etc.).

  • to see demo code for delivering sensor data to iDigi API.

I’ve seen this page http://www.digi.com/products/wireless-routers-gateways/kits/gatewaydevkit#docs

but it isn’t detailed enough to understand all this info.

Again, Thanks,


Digi provides all the types of support documents and knowledge based articles under www.digi.com – support. And those are really helpful.

Even for iDigi related and iDigi DIA related more documents are found under developer.idigi.com – resources after login to the iDigi.

I would recommend you to go through iDigi Webservices programming guide and DIA Web tutorial, lying at the resources page.

Digi ESP for python is better than other IDEs because, it provides faster way to deal with Digi python enable devices and Provides wonderful DIA project Support.

Creating a developer account on iDigi and then going to the resources section is a good step to getting started. However, about the ecosystem:

  1. The gateways are programmable in Python. If you want to build your own gateway there is now the iDigi Cloud Connector fod Embedded. If you can program in C you can adapt your own gateway or embedded “thing” to connect to iDigi

  2. The gateways can be programmed in from the ground up in custom Python or you can use a framework such as the iDigi Dia or iDigi Smart Energy framework. If you don’t want to do any custom programming there is a simple way of connecting by using the XBee Internet Gateway (a public open-source project): http://code.google.com/p/xig

  3. The iDigi Dia can be extended to abstract your own device or connect to your own services (e.g. Pachube, ThingSpeak or sen.se). The downloadable iDigi ESP for Python available in the resources section contains extensive tutorials and examples for doing just this.

  4. iDigi can temporarily hold on to large amounts of data. It supports bi-directional communications to devices behind firewalls and push messaging support. You can also update your devices firmware and applications. It’s unique and continuously being improved.

I hope this helps!


Dear all,

I want to develop an application WSN, with five DHT 22 , five Arduino UNO, five xbee Pro S2 and one gateway Connect Port x4…

I have a big problem with the gateway …

After the research, I found this information:

I can use iDigi ESP for Python to develop my own application and not use iDigi Cloud to retrieve data from XBee(that i need :no cloud)

But I have not found a tutorial, I don’t know the necessary steps to bluid my application in Digi ESP for Python…

like this :


You can help me ?