Giter VIP home page Giter VIP logo

envirophat-mqtt's Introduction

envirophat-mqtt

Publish sensor updates from Enviro pHat to MQTT

Calibrates the temperature reading for variance caused by heat from the CPU of the Raspberry Pi and smooths the data using a moving average.

A factor of 1.2 works well for me, but may vary depending on case and environment.

Running

sudo npm i -g envirophat-mqtt
envirophat-mqtt

Use PM2 or similar to run on startup.

Configuration

Create a config file at /etc/envirophatmqtt/config.yml

Check the available settings and defaults in config/defaults.yml.

Example:

---

mqtt:
  host: '192.168.0.123'
  topic: sensor/loune/input
temperature:
  factor: 1.2
interval:
  duration: 60000

Pre-requisites

  1. Pimoroni libs: curl https://get.pimoroni.com/envirophat | bash
  2. Node js

Why Node js?

Selfish reason: Because all my existing home automation runs on Node js managed with PM2.

Even though the provided libraries are Python, and it's pretty easy to publish to MQTT from Python, I wrote this so I could run my entire platform on Node js.

envirophat-mqtt's People

Contributors

denwilliams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

phillprice

envirophat-mqtt's Issues

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.