Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.
/ docker-pyloopdb Public archive

Pull data from loopenergy using pyloopenergy module and then write this to influxdb.

License

Notifications You must be signed in to change notification settings

Migz93/docker-pyloopdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyloopdb

Docker Version Docker Image Docker Pulls Docker Stars License MIT

Pull data from loopenergy using pyloopenergy module and then write this to influxdb.

Thanks to pavoni for his work on creating pyloopenergy, without it this script/container wouldn't have been possible.

This connects to Loop Energy, takes the data received from loop energy for electricity/gas usage and writes it to an influx database. (Influxdb needs to be installed/configured seperately.)

This was created for myself as currently the homeassistant loop energy component is not working and my python experience is nowhere near the level required to work out what's wrong with the component. As others may find this handy I thought I would share it.
I only really use homeassistant to amalgamate all my home IOT devices and then pass the data through to influx to be displayed in Grafana so this just cuts out the middleman.

Usage

Docker create command for only electricity monitoring.

docker create \
  --name=pyloopdb \
  -e elec_serial=00000 \
  -e elec_secret=00000 \
  -e type=elec \
  -e influxhost=172.17.0.1 \
  -e influxport=8086 \
  -e influxdb=homeassistant \
  --restart unless-stopped \
  miguel1993/pyloopdb

Docker create command for electricity and gas monitoring. (Untested as I don't have gas monitoring)

docker create \
  --name=pyloopdb \
  -e elec_serial=00000 \
  -e elec_secret=00000 \
  -e gas_serial=00000 \
  -e gas_secret=00000 \
  -e type=elec,gas \
  -e influxhost=172.17.0.1 \
  -e influxport=8086 \
  -e influxdb=homeassistant \
  --restart unless-stopped \
  miguel1993/pyloopdb

Parameters

elec_serial                  Configured with your elec serial from loop.
elec_secret                  Configured with your elec secret from loop.
gas_serial                   Configured with your gas serial from loop. Optional.
gas_secret                   Configured with your gas secret from loop. Optional.
type                         Type of monitoring you want, choices are `elec` & `elec,gas`.
influxhost                   URL/IP that the influx database can be accessed on.
influxport                   Port that the influx database is running on.
influxdb                     The database in influx that you want to write to.

Versions

  • 16.07.2019: - Modified to write to the "W" series in influxdb & to also send data in Watts.
  • 15.07.2019: - Initial release.

Note

  • The measurement is written to the influx database in Watts as all my other IOT devices report in Watts.
  • It should be possible to run the python script directly, rather then running it in a container. You'd just need to set the variables rather than have them load.
  • I only have a very basic understanding of python, just about enough to get things to work, so if you see anything that could be improved please let me know.

About

Pull data from loopenergy using pyloopenergy module and then write this to influxdb.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published