Toolkit for managing Arduino sensors
Julien Riou
bb65a7c6b6
The sound module may not be available so the parse function fails. This commit makes the parsing function more generic by giving a list of metrics to retreive in order. Signed-off-by: Julien Riou <julien@riou.xyz> |
||
---|---|---|
debian | ||
freebsd | ||
static | ||
.gitignore | ||
.pre-commit-config.yaml | ||
.pydocstyle | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
sensors2serial.ino | ||
serial2mqtt.ini.example | ||
serial2mqtt.py |
arduino-sensors-toolkit
This toolkit has been designed to be used with a DHT22 (humidity, temperature) and KY-037 (sound) sensors connected to an Arduino microcontroller. It is part of a self hosting project with specific needs. Feel free to fork this repository and update code for your needs.
sensors2serial
Arduino circuit:
serial2mqtt
Requirements
- serial interface using sensors2serial code (ex: /dev/cuaU0 for FreeBSD, /dev/ttyACM0 for Debian)
- MQTT broker (ex: Mosquitto)
Installation
Configuration
An optional configuration file can be used with --config <file>
. See serial2mqtt.ini.example.
Usage
python3 serial2mqtt.py --help