eagle

command
v0.0.0-...-8b54c08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2019 License: GPL-3.0 Imports: 21 Imported by: 0

README

Eagle Driver

Because this is deployed as an HTTP/HTTPS server, look in the container/ folder for systemd/docker files for deployment

Driver URI Parameters

PONUM: 2.1.1.4
service name: s.eagle
interface name: i.xbos.meter

Documentation

Overview

This package implements the UPLOADER API described in https://rainforestautomation.com/wp-content/uploads/2014/07/EAGLE-Uploader-API_06.pdf The EAGLE sends data in a POST request, e.g.

POST /rfaeagle.php HTTP/1.0
Host: 192.168.11.3:8888
Accept: */*
From: nobody@rainforestautomation.com
User-Agent: Raven Uploader/v1
Content-Length: 483
Content-Type: application/x-www-form-urlencoded
<?xml version="1.0"?>
<rainforest macId="0xf0ad4e00ce69" timestamp="1355292588s">
<InstantaneousDemand>
<DeviceMacId>0x00158d0000000004</DeviceMacId>
<MeterMacId>0x00178d0000000004</MeterMacId>
<TimeStamp>0x185adc1d</TimeStamp>
<Demand>0x001738</Demand>
<Multiplier>0x00000001</Multiplier>
<Divisor>0x000003e8</Divisor>
<DigitsRight>0x03</DigitsRight>
<DigitsLeft>0x00</DigitsLeft>
<SuppressLeadingZero>Y</SuppressLeadingZero>
</InstantaneousDemand>
</rainForest>

Tags are case-insensitive. We need to make sure to extract the MAC address from the header (attribute of the rainforest tag) Eagle does expect a response to each POST request. At the very least its 200 OK response, but we can also send commands back to the eagle in this reply (only one command per reply)

XML "Fragments" to look for:

  • Instantaneous Demand
  • Message (might require a reply?)
  • CurrentSummation
  • FastPollStatus
  • HistoryData

Commands to send:

  • set_schedule (changes poll rate)

There are two approaches for the Eagle driver. We either implement a centralized service that the Eagle is configured to talk to, or we implement a local driver that then polls the Eagle's local REST interface. This file implements the former. We implement a server with a single URL served over HTTPS

  • GET: returns a page of directions on how to set this up on your own Eagle
  • POST: the Eagle will POST to this URL. The server will check if we've already seen the Eagle. If it hasn't, we register the Eagle locally (instantiate another struct) and configure it for our desired reporting interval, and extract all the necessary metadata Finally, for all received messages, we process the latest reading and mirror it onto BOSSWAVE

Configuration options:

  • reporting interval (TODO: figure out what the bounds are)
  • how much historical data to grab (TODO: figure out what the bounds are), which is then replayed on BOSSWAVE with the appropriate timestamps

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL