The description of the Weather Station Controller service.
The WSC publishes data collected from a serial device (weather station) specified MQTT broker's topics.
The MQTT broker is configured by the config/mqtt_config.json file. Other config directory can be specified, Dockerfile modification needed.
In the Docker image the configuration files are stored in the directory /home/ws_collector/config.
The full qualified path to the MQTT configuration is therefore /home/ws_collector/config/mqtt_config.json.
The publication topic can be configured by modifying the topics field.
WSC published only to the default topic.
It's currently set to "assist-iot/weather-station-controller/data"
The serial device must be configured while running the Docker image.
The Docker image expects environmental variables WS_DEVICE and WS_BAUD to be set to the device descriptor path and its baudrate respectively.
The WSC can be configured to sample the data only every WS_SAMPLE_TIME seconds. This value defaults to 15, and can be set via the environmental variable.
The WSC can be configured to run in debug mode, by setting the environmental variable WS_DEBUG to either true, t or 1 (all case insenstive). This will result in printing logs to the container's output.
The --device option for docker run must be set to the host path of the device descriptor. (Same as WS_DEVICE)
For examples see run.txt and test/docker-compose.yml. The docker compose file uses the test/test.env file for environmental variables.
This code is licensed under the Apache License, Version 2.0.
Copyright 2025 Systems Research Institute, Polish Academy of Sciences
This work is part of the ASSIST-IoT project that has received funding from the EU’s Horizon 2020 research and innovation programme under grant agreement No 957258.