Rainforest Automation, Inc.
EAGLE™
Uploader API Manual
4
OVERVIEW
EAGLE
™
Uploader API
The
EAGLE
™ is an Ethernet device that communicates with a smart meter over a secured
ZigBee wireless network. The
EAGLE
™ is an endpoint on the ZigBee network that is authorized
and authenticated to communicate with the smart meter. The API (Application Programming
Interface) described in this document provides a mechanism to allow external web servers to
receive smart meter data from the
EAGLE
™.
Communications Model
The
EAGLE
™ is a Linux-based device that is running an internal web server. This web server
receives real time data from the smart meter, and can forward this data to external web servers
using HTTP POST requests. The body of these POST requests contains the meter data
structured as XML Fragments.
Data Structures
1. Requests
The
EAGLE
™ sends data in a POST request. POST requests have the following structure:
POST <URL> HTTP/1.1
<headers>
<blank>
<body>
Where:
-
Every line ends with the newline character (0x0A).
-
<URL>
is the Uniform Resource Locator (web address) of the external web server.
-
<headers>
are a variable number of HTTP headers; each header is on its own line.
-
<blank>
is a blank line, consisting only of the newline character (0x0A).
-
<body>
is the main text of the POST request, which has the structure shown below.
The body of the POST request has the following structure:
<?xml version="1.0"?>
<rainforest macId="0xffffffffffff" version=”undefined”
timestamp="0000000000s">
<XML>
</rainforest>
The first line is the standard XML (eXtensible Markup Language) Prolog. This is followed by the
Root Element, which for our purposes is enclosed by the tags
<rainforest>
and
</rainforest>
. The Root Element has three attributes: