This project provides a server for a weatherstation. It subscribes to various MQTT topics, stores the retrieved data based on the content and visualizes it.
See also Weatherstation Client.
For building and starting of the server, docker-compose
and docker
are required.
To directly start the server, without building it, one can use pre-built docker images.
docker-compose -f docker-compose.yml up
This will, based on the defined version in the docker-compose.yml, pull two pre-built docker images of the weatherstation in the given version. For the available versions, please see the weatherstation server and the weatherstation datahandler.
In order to freshly build an image (e.g.: to include new changes), a second docker-compose file is used, to override the standard configuration.
docker-compose -f docker-compose.yml -f docker-compose.override.yml build
And then starting it:
docker-compose -f docker-compose.yml -f docker-compose.override.yml up
The input data is based on MQTT. Currently the temperature and the humidity are stored to a database. Whenever new values are stored, the values are automatically updated in the visualization.
Following mqtt topics are currently in use for the visualization and storing of the data.
This topic is used to insert new values to the database.
The weatherstation client can be used for publishing new data. The expected format is: esp/UID/VALUE_TYPE
.
The weatherstation client uses the mac address
of the device as UID
and either the humidity
or the temperature
for the VALUE_TYPE
.
This topic is used to update the visualization of the data.
Whenever any new value has been stored for a given UID
, the UID
is published as value for this topic. The visualization then retrieves the latest data for the UID
.
Whenever a new UID
has been stored, this topic is used to publish the new UID
.
The data is visualized on a http server.
The webpage, where the data is visualized can be accessed via localhost:8000.