8226f622fa
Reviewed-on: https://codeberg.org/grisu48/meteo/pulls/2 |
||
---|---|---|
cmd/meteod | ||
integrators/home-assistant | ||
Sensors | ||
.gitignore | ||
.travis.yml | ||
Containerfile | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
meteo.png | ||
meteod.conf.example | ||
README.md |
meteo
meteo is a lightweight environmental monitoring solution. The project aims to provide an easy environmental monitoring system for different sensors. Sensors publish their data via MQTT.
Sensor data measurements can be stored in an InfluxDB database using the meteod
server.
Nodes/Sensors
meteo sensors can be anything that publish data via MQTT in a certain data format (see below).
Currently some sensor nodes are provided by the project in the Sensors folder.
Che recommended hardware basis for meteo sensor nodes is ESP32, however everything that works with MQTT will work.
MQTT packets
Every node that publishes MQTT
packets in the given format is accepted.
# Node ID: 1, replace in topic and payload
## meteo packets
TOPIC: meteo/1
PAYLOAD: {"id":1,"name":"Node","values":{"t":23.36,"hum":44.56,"p":99720.89}}
A more verbose example of the payload is the following json packet:
{"id":12,"name":"attic","tsp":123456789,"measurement":"meteo","values":{"t":18.12,"hum":20.48,"p":1024539.17}}
The MQTT topic can be meteo/1
where 1 is the NodeID, or simply meteo
. In the latter case, the "id"
field is obligatory, otherwise the packet is invalid.
meteod - meteo Server
meteod
is a server program to collect meteo data points from mqtt and push them to a InfluxDB database (Version 2). This program is written in go and needs to be build
go build ./...
The gateway is configured via a meteod.conf file.
Usage:
./meteod -c meteod.conf
Use ./meteod -h
to display available options
Usage: ./meteod [OPTIONS]
OPTIONS
-h,--help Display this help message
-c,--config FILE Load config file
-v, --verbose Verbose mode
--mqtt MQTT Set mqtt server
--mqtt-client-id ID Set mqtt client id
--influx HOST Set influxdb hostname
--org ORGANIZATION Set influxdb organization
--bucket BUCKET Set influxdb bucket
--token TOKEN Set influxdb token
--http BINDADDR Enable http server on the given address
container image
You can run meteod
as container image from codeberg.org. Create a meteod.conf configuration file, and run the container in the container engine of your choise:
podman run --name meteo -v /path/to/your/meteod.conf:/conf/meteod.conf -p 4042:4042 codeberg.org/grisu48/meteo
That's it!