WeatherFlux is a simple gateway that listen on the local network to messages sent by WeatherFlow station(s) and send them to an InfluxDB 2.x server.
You can run WeatherFlux on:
- any system supporting Docker version 19 or greater (WeatherFlux dockerized version);
- any POSIX compatible operating system (Linux, OSX, BSD) supporting PHP 7.4 or greater and composer 2.0 or greater (WeatherFlux standalone version).
To run WeatherFlux on Docker, just type:
docker run -itdp 50222:50222/udp -v /my/local/path:/usr/share/weatherflux/config pierrelannoy/weatherflux:latest
where /my/local/path
is a valid path on the host.
Then, adjust the settings in the /my/local/path/config.json
file.
If you don't want - or can't - use the dockerized version of WeatherFlux, you can use it as a standalone tool. If so, installing WeatherFlux is simple as:
composer require weatherflux/weatherflux
Then, creating a configuration file named config.json
:
mkdir ./config && cp ./vendor/weatherflux/weatherflux/config-blank.json ./config/config.json
Adjust the settings in this newly created file to match your environment and your needs.
To just listen the local network and display discovered devices (without recording anything), start WeatherFlux in observer mode
php vendor/weatherflux/weatherflux/weatherflux.php start -o
To listen the local network and send data to InfluxDB (with console output), start WeatherFlux in console mode
php vendor/weatherflux/weatherflux/weatherflux.php start -c
To listen the local network and send data to InfluxDB (unattended), start WeatherFlux in daemon mode
php vendor/weatherflux/weatherflux/weatherflux.php start -d
If WeatherFlux is started in daemon mode, you can stop it as follow:
php vendor/weatherflux/weatherflux/weatherflux.php stop
For other modes, just hit CTRL C
to stop it.