This repository contains the official open weather vision (owvision) core engine. This includes the REST api together with the corresponding CLI and the abstract recorder interface, which can be used to connect any weather station and any sensor.
This image shows an overview of the open weather vision system. Every red component is a docker container.
The owvision
cli is an easy tool to manage and configure your weather stations. Internally it just calls the endpoints of the REST api.
There are two different setups possible:
Setup A: the owvision api and the recorder are on the same host
Setup B. the owvision api and the recorder are on a different host
In the following sections main host refers to the host hosting the api. recorder host refers to the host recording the weather data.
owvision needs an interface that allows it to communicate with your weather station. This interface is basically a single javascript file that extends the WeatherStationInterface class. To register this javascript file execute:
owvision register-interface <path-to-js-file> <interface-name>
Trusted interfaces are listed here.
After that you can use this interface to connect to your weather station. You have to give your station a name and you can select your favorite units. Added to that you can set each sensor's update times. Your selected interface may require more configuration (e.g. a COM
port). Any configuration can be changed later.
owvision initialize <interface-name>
You can temporary disconnect using owvision <station-name> disconnect
.
Reconnecting is possible using owvision <station-name> connect
.
To delete the whole configuration and data use owvision <station-name> delete
. Use owvision <station-name> prune
to only clear the recorded weather data.
owvision needs an interface that allows it to communicate with your weather station. This interface is basically a single javascript file that extends the WeatherStationInterface class.
To register this javascript file execute on the main host (not the recorder host):
owvision register-interface <path-to-js-file> <interface-name>
After that you can configure your weather station. You have to give your station a name and you can select your favorite units. Added to that you can set each sensor's update times. Your selected interface may require more configuration (e.g. a COM
port). Any configuration can be changed later.
owvision initialize --remote-recorder <interface-name>
Now you can start the recorder on the recorder host.
owvision-recorder start <main-host-url> <weather-station-name>
The main host url is the url to your api. It should be something like
https://192.168.40:8000
. After that you specify the weather station's name.
You can temporary disconnect using owvision <station-name> disconnect
.
Reconnecting is possible using owvision <station-name> connect
.
To delete the whole configuration and data use owvision <station-name> delete
. This will also delete the recorder on the recorder host. Use owvision <station-name> prune
to only clear the recorded weather data.
owvision stations
This command lists all connected weather stations with some additional information.
owvision station <station-name> sensors
This command lists all sensors of a weather station with some additional information.
owvision station <station-name> sensors read
This command lists the most recently recorded value (and unit) of every sensor of the specified weather station.
owvision station <station-name> sensor <sensor-name>
This command gets some additional information about the specified sensor.
owvision station <station-name> sensor <sensor-name> read
This command lists the most recently recorded value (and unit) of the specified sensor.
owvision station <station-name> summary <daily/monthly/....>
This command prints out the latest summary for the given interval.
Some interfaces offer extra commands that you can execute on your weather station. E.g. a command to turn on the weather station's console backlight. To list all extra commands run:
owvision station <station-name> commands
Executing a command is quite straightforward:
owvision station <station-name> exec <command> [OPTIONS ...]