Giter Club home page Giter Club logo

crategrafanaweatherdata's Introduction

CrateGrafanaWeatherdata

Extract data from Weewx and post via MQTT to InfluxDB (not Cratedb) and view with Grafana I wanted to use Crate, but it was too difficult to get it going on a single Raspberry Pi, so I refocused on InfluxDB instead.

mqtt_weather.py

Runs on Raspi 3 that contains Weewx. Weewx updates the SQLite db every 2 minutes with new data. This code reads the latest and posts it to MQTT topic Weather/data. The script mqtt_weather is the script that goes in /etc/init.d for the daemon. See http://blog.scphillips.com/posts/2013/07/getting-a-python-script-to-run-in-the-background-as-a-service-on-boot/

Install mosquitto and mosquitto-clients using sudo apt install sudo nano /etc/mosquitto/mosquitto.conf add at the bottom: listener 1883 allow_anonymous true and restart mosquitto

mqtt_subscribe.py

Runs on Raspi 4 and subscribes to the weather data topic. It then posts the messages to InfluxDB

Mosquitto is running on Raspi4, but it could be elsewhere.

Install Grafana and connect it to the Influx instance on Raspi4. Use topic 'weather' image

crategrafanaweatherdata's People

Stargazers

 avatar

Watchers

Lucian avatar  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.