Giter VIP home page Giter VIP logo

docker-pyloopdb's Introduction

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.

docker-pyloopdb's People

Contributors

migz93 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.