Home/Support/Support Forum/Startup needs help with XBee Sensors, ConnectPort X4H and Digi Cloud
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Startup needs help with XBee Sensors, ConnectPort X4H and Digi Cloud

0 votes
We are a Startup building remote construction monitoring platform for the construction industry. We are great at web development (web apps, web APIs, data visualization) however have 0 knowledge about RF low level engineering and programming.

What is more it is extremely hard to find any XBee developer in our area. To make it possible and deliver MVP we decided to purchase ready-to-use sets and use Digi Cloud, therefore we got:
• 1 ConnectPort X4H http://www.digi.com/products/xbee-rf-solutions/gateways/connectportx4
• 4 XBee Sensors http://www.digi.com/products/xbee-rf-solutions/sensors/xbee-sensors
• 2 XBee Wall Router http://www.digi.com/products/xbee-rf-solutions/range-extenders/xbee-wall-router

What we already know:
• We discovered ConnectPort with visible ZigBee network in Digi Cloud, yes it is visible and can be configured online.
• We know that ConnectPort has built in Python engine however only 2.4.3 Python version is supported.
• We know that we can upload Python files directly to ConnectPort using Digi ESP for Python
• We know that we can upload Python files to ConnectPort using Digi Cloud
• We know that Sensors can sent data into Data Streams that will expire after some time
• We know that we can use Monitor API to forward data into our own external web service each time it will be uploaded into Data Stream

What we want to achieve and have questions:

Scenario 1 (simple):
In this scenario we want to specify all settings and sampling using Digi Cloud online interface.

a) Create data streams using Digi Cloud Interface

o As each XBee Sensors has 1 temperature, 1 humidity and 1 light sensor, we want to specify 3 Data Streams for each XBee Sensor. Having total 4 x 3 Data Streams.

o Each Data Stream besides data value should have additional properties like: NodeId (Id of XBee Sensor), SensorTypeId (Id from dictionary of types), SamplingFrequency (value in milliseconds, 0 = real time) DateStart (date from what point should collect data), DateEnd (date after no data should be collected), MeasurementZoneId(Id of measurement zone specified by user, e.g. Floor 1), PlacementVector (x, y, z location inside construction)

b) Somehow link each data stream with each sensor inside XBee Sensors and “Enable Sampling”
c) Watch data changes online in Digi Cloud

Questions:
1. Is it possible to extend data stream metadata with above properties?
2. Is it possible to define one data stream per one sensor inside one XBee Sensor?
3. Is it possible to define sampling frequency and enable sampling from Digi Cloud interface without writing Python code for ConnectPort (without the need for timer of infinity loop)?
4. If python code is not necessary to enable sampling and data sending, how to do that?
5. If python code is mandatory, does it mean that each time we want to assign XBee Sensors to different measurement zone we need to upload new Python file into ConnectPort?

Scenario 2 (extended):
In this scenario we want to configure devices and sampling from our own external API and use Digi Cloud as a middle man for configuration and data forwarding.

a) While having the same parameters, create data streams using Digi Cloud API from eternal web service (it will be .NET web service, written in C#)
b) While having the same parameters, create Data Forwarding to external web service (it will be .NET web service, written in C#) using Monitor API, each time new data will be uploaded to Digi Cloud
c) While having the same parameters somehow link each data stream with each sensor inside XBee Sensors and “Enable Sampling” using Digi Cloud API from eternal web service (it will be .NET web service, written in C#)
d) Receive data in eternal web service without the need of manual queries

Questions:
1. Is it possible to extend data stream metadata with mentioned properties using Digi Cloud API from external web service?
2. Is it possible to define one data stream per one sensor inside one XBee Sensor using Digi Cloud API from external web service?
3. Is it possible to define sampling frequency and enable sampling using Digi Cloud API from external web service, without writing Python code for ConnectPort (without the need for timer of infinity loop)?
4. If python code is not necessary to enable sampling and data sending, how to do that?
5. If python code is mandatory, does it mean that each time we want to assign XBee Sensors to different measurement zone we need to generate and upload using Digi Cloud API new Python file into ConnectPort?

We will really appreciate help with above questions regarding both scenarios. I believe that many people will also be interested in these two scenarios.

Help us please.
asked Nov 29, 2015 in Device Cloud by Daniel Skowronski New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
I don't know how much of this can be done at the Device Cloud level but most can be done at the Python level directly within the Gateway. Some of which can be done using the sample applications provided in the Python ESP.
answered Nov 30, 2015 by mvut Veteran of the Digi Community (11,300 points)
Thanks for hints mvut, however this still does not answer our questions :-( Lack of knowledge what is possible and what is not that results in guessing will not bring strong fundamental for our development, we can end with crappy software monster that we want to prevent.
Let me answer it this way.  Yes, most of what you want to do can be done with Python directly on the gateway.  If you want to know if it can be done directly from the Device cloud, I would strongly recommend calling into Sales and talking with a Device Cloud Sales Engineer about your application and exactly what you want to do.  The Sales Engineer should be more than capable of answering all of these questions.
This is what we are currently doing. We arranged a call for the next week with Gateway expert from Digi. However we believed that someone here on this forum already had the same questions and scenarios regarding Digi Cloud and hopefully will be kind to share his/her experience. If not, we will managed it by ourselves, but... it is always better to learn from mistakes of others rather than doing the same common mistakes.
...