weatherflux/weatherflux

A gateway to listen WeatherFlow stations on a local network and write weather data in InfluxDB 2.

2.1.4 2021-02-04 12:47 UTC

This package is auto-updated.

Last update: 2024-04-05 02:58:52 UTC


README

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).

WeatherFlux on Docker

Docker Image Version (tag latest semver) Docker Cloud Build Status Docker Image Size (tag)

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.

WeatherFlux as standalone tool

Packagist Version Packagist PHP Version Support Packagist License

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.

Running WeatherFlux as standalone tool

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.