Git Product home page Git Product logo

lightwaveenergy2influx's Introduction

Lightwave Energy Monitoring with InfluxDB

This application is designed to run on a Raspberry Pi via Balena Cloud, however it can also be executed directly on any hardware capable of running Python 3.x.

The code listens for the network broadcast messages from the energy monitor and converts these into a suitable format to push to InfluxDB. You can then view the data either by uploading the custom graphs to Grafana or by querying the database directly.

The Grafana Dashboard

Pre-requisites

You'll need an InfluxDB database and a Grafana installation to store and view the data.

If you want to use additional Raspberry Pi's or similar for this, you can follow these guides:

If you want to go even further and have another pi with a screen as a dashboard for the house, then you can follow these steps and use BalenaDash to deploy that as well - just make sure you set the LAUNCH_URL environment variable in the BalenaDash app to point to your new dashboard!

Installation

The recommended method of installing this application is using Balena Cloud as it removes a lot of the complexity around maintaining and deploying a python application.

To deploy this application, follow the Getting Started with Raspberry Pi 2 and Python, however when you get to the part which starts A nice first project to get started is a simple Flask web server, clone this LightwaveRF Git repository and use that as the source instead of the link they give you.

NOTE: This application should work on any device for which Balena provide an image. It has been tested on both RaspberryPI 2 and 3

Manual Installation

Manual installation is a bit more involved, however there are times when it can be useful (for example, local debugging)

The steps are as follows:

  1. Clone this repository onto the relevant hardware and cd into that directory
  2. Create a python virtual env venv .venv
  3. Activate the virtual environment source .venv/bin/activate
  4. Install the required dependencies pip install -r requirements.txt
  5. Export the environment variables as listed under Configuration
  6. Start the script by running python lwrf2influx.py

Configuration

You will need to set the following variables at either device or application level in the Balena Cloud Dashboard (or on the command line via export commands for a manual installation):

Variable Name Description Example
INFLUXDB_URL The hostname of the InfluxDB instance without any protocol influxdb.mydomain.com or 192.168.1.x where x is the local IP Address
INFLUXDB_PORT The port number we should be talking to 8086 by default, otherwise check with the database provider to see how yours is configured.
INFLUXDB_USER Optional The username for connecting to the database influx
INFLUXDB_USER Optional The password for authenticating to the database influx
LOG_LEVEL Optional The amount of logging you want to see from the application INFO is the default, possible values include INFO, WARNING, ERROR, and DEBUG

lightwaveenergy2influx's People

Stargazers

GAURAV avatar

Watchers

James Cloos 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.