add documentation

This commit is contained in:
2026-05-18 11:50:36 +03:00
parent 75aafabc54
commit 7ca5498092
16 changed files with 928 additions and 40 deletions

View File

@@ -44,14 +44,14 @@ emerge net-analyzer/net-snmp
```
Available plugin options:
- `DUMMY`  Dummy weather station for testing.
- `FDEXAMPLE`  Example file descriptor plugin.
- `HYDREON`  Hydreon RG-11 rain sensor.
- `BTAMETEO`  BTA 6-m telescope main meteostation (shared memory).
- `REINHARDT`  Old Reinhardt meteostation.
- `WXA100`  Vaisala WXA100 ultrasonic station.
- `SNMP`  UPS monitoring via SNMP.
- `LIGHTNING`  AS3935-based lightning sensor.
- `DUMMY` Dummy weather station for testing.
- `FDEXAMPLE` Example file descriptor plugin.
- `HYDREON` Hydreon RG-11 rain sensor.
- `BTAMETEO` BTA 6-m telescope main meteostation (shared memory).
- `REINHARDT` Old Reinhardt meteostation.
- `WXA100` Vaisala WXA100 ultrasonic station.
- `SNMP` UPS monitoring via SNMP.
- `LIGHTNING` AS3935-based lightning sensor.
4. Building:
@@ -94,7 +94,7 @@ Format:
```
- `library`: path to the shared library, e.g. `libwxa100.so`.
- `type`: Connection type  `D` for serial device, `U` for UNIX socket, `N` for INET socket.
- `type`: Connection type `D` for serial device, `U` for UNIX socket, `N` for INET socket.
- `parameter`: device path and optional speed (`/dev/ttyS0:9600`), UNIX socket name, or `host:port` for INET.
Examples:
@@ -150,7 +150,7 @@ Run with:
superweatherdaemon -c /etc/weather.conf
```
To run on system start you can use OpenRó `rc.local` mechanism.
To run on system start you can use OpenRС `rc.local` mechanism.
## Plugins
@@ -185,8 +185,8 @@ daemon will try to reconnect every `reinit_delay` seconds.
| Library | Sensor | Type |
|---------|--------|------|
| `libwsdummy.so` | Dummy station  outputs random walk data around realistic values. | Test / Development |
| `libfdex.so` | Example of a filedescriptor based plugin. Prompts for commaseparated values. | Example |
| `libwsdummy.so` | Dummy station outputs random walk data around realistic values. | Test / Development |
| `libfdex.so` | Example of a filedescriptor based plugin. Prompts for commaseparated values. | Example |
| `libhydreon.so` | Hydreon RG-11 optical rain sensor. | Serial |
| `libbtameteo.so` | BTA 6-m telescope main meteostation (shared memory). | Shared Memory |
| `libreinhardt.so` | Old Reinhardt meteostation (serial, `?U` command). | Serial |
@@ -216,22 +216,22 @@ Use the existing plugins as templates. A minimal plugin must:
The daemon combines data from all active plugins and continuously evaluates a global **weather
level**:
- `0`  **GOOD**: observations can start safely.
- `1`  **BAD**: risky to start, but can continue.
- `2`  **TERRIBLE**: dome must close, instruments park.
- `3`  **PROHIBITED**: complete shutdown, power off equipment.
- `0` **GOOD**: observations can start safely.
- `1` **BAD**: risky to start, but can continue.
- `2` **TERRIBLE**: dome must close, instruments park.
- `3` **PROHIBITED**: complete shutdown, power off equipment.
### Criteria
Each weather parameter (wind speed, humidity, clouds, sky temperature, lightning distance,
precipitation, etc.) has configurable thresholds:
- `good`  below/above this (depending on sign) the condition is good.
- `bad`  above this the condition is bad.
- `terrible`  above this the condition is terrible.
- `prohibited`  (if defined) above this the condition goes directly to PROHIBITED.
- `negflag`  if `1`, a smaller value is worse (e.g., clouds).
- `shtdnflag`  if `1`, entering the terrible/prohibited range also sets the **FORCE SHUTDOWN** flag.
- `good` below/above this (depending on sign) the condition is good.
- `bad` above this the condition is bad.
- `terrible` above this the condition is terrible.
- `prohibited` (if defined) above this the condition goes directly to PROHIBITED.
- `negflag` if `1`, a smaller value is worse (e.g., clouds).
- `shtdnflag` if `1`, entering the terrible/prohibited range also sets the **FORCE SHUTDOWN** flag.
### Special Flags
@@ -251,9 +251,9 @@ passed since the last serious event. This prevents rapid toggling.
The daemon listens on two interfaces:
1. **Network socket** (TCP, default port 12345)  read-only (in meaning they cannot change any
1. **Network socket** (TCP, default port 12345) read-only (in meaning they cannot change any
parameters) access for remote clients.
2. **Local UNIX socket** (abstract or filesystem, default `@weather`)  full control for local applications.
2. **Local UNIX socket** (abstract or filesystem, default `@weather`) full control for local applications.
Commands are sent as plain text strings, terminated by a newline.
@@ -285,7 +285,7 @@ Commands are sent as plain text strings, terminated by a newline.
Reply format: each line is a FITS-like `KEY = value / comment` string; commands that set something
usually echo back the variable and its new value. For `get=<N>` each `KEY` have a suffix in square
brackets  number of plugin, e.g. `WIND[1]= 10.1 / Wind speed, m/s`.
brackets number of plugin, e.g. `WIND[1]= 10.1 / Wind speed, m/s`.
## Signals