Sensor Data to own Server via DIA or XIG

220 views
Skip to first unread message

marle...@googlemail.com

unread,
Sep 4, 2014, 10:18:07 AM9/4/14
to xbee-inter...@googlegroups.com
Hi all,

I'm working since many months with XBee Modules and I've set up some nice Applications. For example wireless valves for greenhouse irrigation and measuring environment data like temperature. But a big problem is the connection through the Internet. I've tried to work with an arduino yun to handle my things but at the moment I think a Connecport is a better solution.

My target is the following.
I would like to take data at a Connecport X2 and send it in the transformed way to my own server.
At the moment I could send data via XIG to the Device Cloud. This is working great but I only see the Integer values. As I read in another thread I have transform my data via DIA and then send it to my server. In this case I've some questions:
1) Is it possible to use DIA to send data to my own server, or only send it to the device cloud?
2) Can someone give me another tutorial for DIA? I've made the two getting starteds from the Digi ESP (Python and DIA getting started)
2b) Maybe a DIA is the wrong way, is a Python script better to convert sensor values? Until now I found this in the digi wiki to transform sensor data:http://www.digi.com/wiki/developer/index.php/Scaling_Analog_Values
      The problem is how can I run this? Before I can transform, I have to take the I/O packages in my connecport after that I've to send it to the server. Therefore I think it is better to put such a scaling script in the XIG.

I hope u understand my problem.
Kind regards

Joe Bermej

unread,
Mar 24, 2015, 5:26:48 AM3/24/15
to xbee-inter...@googlegroups.com
Hi,

I am dealing with the exact problem, I would like to connect to an external cloud.


Greg Howard

unread,
Jul 14, 2015, 2:57:52 PM7/14/15
to xbee-inter...@googlegroups.com
Poke, any discussion on this?

Rob Faludi

unread,
Jul 14, 2015, 4:28:13 PM7/14/15
to xbee-inter...@googlegroups.com
Here’s two suggestions for connecting to a non-Digi cloud. Check out section A and section G of this document: https://github.com/XBeeInternetGateway/XIG/wiki/user-documentation


--
You received this message because you are subscribed to the Google Groups "xbee-internet-gateway" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xbee-internet-ga...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg Howard

unread,
Jul 14, 2015, 7:19:21 PM7/14/15
to xbee-inter...@googlegroups.com
Rob Faludi,
Thanks for the quick response. Please forgive me, I don't think I understand this correctly. I am new to XIG.

The HTTP method outlined in section A, receiving data or commands using GET. For sending via http you: "using the http facility even allows you to send information from your Xbee." How does the sending of urls work? I see examples of manual typing int he serial interface, can it be automated?

Is there more documentation on managing and automating the sending of urls with data in them?

It looks like section G is triggered by an I/O packet. Where is the I/O packet sent from, the gateway (X2), XBee device wirelessly connected to the gateway, or from an external request (such as a cloud)?


Rob Faludi

unread,
Jul 15, 2015, 10:03:30 AM7/15/15
to xbee-inter...@googlegroups.com
With a get request you send the data as an argument at the end of the URL. Then your server receives the request and unpacks the data. The examples online and linked from my book (chapter 7 has XIG) show how to do this with PHP. https://www.faludi.com/xig/files/

For the method described in section G you would use the I/O features on the XBee (see the product manual or my book’s Chapter 4) to read the digital or analog input pins with cyclic sampling. Those samples would automatically be transmitted to the gateway, where the XIG moves them to a server in the URL format described in that section.


Greg Howard

unread,
Jul 15, 2015, 12:44:58 PM7/15/15
to xbee-inter...@googlegroups.com
I bought your book. Will look at Ch. 4 and Ch. 7. Very cool. I am using Django on the server side with PostgreSQL. Trying to figure out the best way to write through the Django api. I also bought a 10 hr block of support time with Digi. 

My goal: take measurements of a few attached sensors and send them to my Django server (that will write to a PostgresSQL server). To save battery power, I would like to take measurements 1x per hour but only send the results once a day. I think the only way to do this would be to use the I/O features, putting the XBee Pro to sleep between readings. 

Is there a way to store sensor data once an hours (or so) but send  those 24 readings only once a day with the goal of lowering power consumption by transmitting only once per day? 

Thanks
Greg



Rob Faludi

unread,
Jul 15, 2015, 4:43:12 PM7/15/15
to xbee-inter...@googlegroups.com
The XBees themselves do not have a facility for storing data samples. However I’d guess that the difference in power savings between hourly and daily aggregate transmission would be negligible in this case anyway. 



bue...@comcast.net

unread,
Jul 16, 2015, 8:25:13 AM7/16/15
to xbee-inter...@googlegroups.com
Start breaking open that book, all your greatest desires will be fullfilled.  Rob is a genius and a great writer.  Ask some questions after you read :)


From: "Rob Faludi" <r...@faludi.com>
To: xbee-inter...@googlegroups.com
Sent: Wednesday, July 15, 2015 3:43:10 PM
Subject: Re: Sensor Data to own Server via DIA or XIG
Reply all
Reply to author
Forward
0 new messages