Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

PhilDye/loop-energy-http-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loop Energy Meter API HTTP Proxy

This is a very simple API for the Loop Energy Saver, a realtime energy monitoring device.

There is no official API, but the dashboard uses a WebSocket service to display current usage data. Inspired by Loop Graphing, this simple Node server effectively proxies this data into a simple HTTP API.

Each GET / returns average usage data since the last request (as the underlying WebSocket feeds data about every 10s, depending on usage). This is not very RESTful, since each request 'resets' the counters, but for my usage (to be polled by the SmartThings home automation platform), this suffices.

Both mean and median usage of the cumulative readings are returned; use whichever suits your needs best.

Deployment

Note the configuration needed, elec_serial and elec_secret - get these values by logging into your-loop.com, opening your browser's console, and typing in Drupal.settings.navetas_realtime - the returned JSON object contains these values.

These values can then be set in environment (eg to run in Heroku), or set locally.

ToDo

  • Gas support
  • More robust retry and restart

Releases

1.0.0

Initial version

About

Loop Energy Meter API HTTP Proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published