Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denwilliams/envirophat-mqtt
Publish sensor updates from Enviro pHat to MQTT
https://github.com/denwilliams/envirophat-mqtt
envirophat mqtt phat
Last synced: about 7 hours ago
JSON representation
Publish sensor updates from Enviro pHat to MQTT
- Host: GitHub
- URL: https://github.com/denwilliams/envirophat-mqtt
- Owner: denwilliams
- License: mit
- Created: 2017-06-03T08:53:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T20:51:07.000Z (about 6 years ago)
- Last Synced: 2024-04-14T10:06:31.973Z (10 months ago)
- Topics: envirophat, mqtt, phat
- Language: JavaScript
- Size: 22.5 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# envirophat-mqtt
Publish sensor updates from Enviro pHat to MQTTCalibrates 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:
```yml
---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.