2024-06-15 19:38:55 +02:00
# PegelOnline Binding
2024-09-28 17:46:53 +02:00
Binding to observe water level from german rivers.
2024-06-15 19:38:55 +02:00
Data is provided by german **Water-Route and Shipping Agency** [WSV ](https://www.pegelonline.wsv.de/ ).
2024-09-28 17:46:53 +02:00
Goal is to monitor actual water levels from rivers nearby your home.
2024-06-15 19:38:55 +02:00
In case of changing water levels the corresponding warning level is lowered or raised.
## Supported Things
| Label | Description | ID |
|---------------------|---------------------------------------------------------------------------------|---------|
| Measurement Station | Station providing water level measurements | station |
## Discovery
In case your home location coordinates are set the discovery will recognize all measurement stations within a radius of 50 km.
Found Things are added in your Inbox.
## Thing Configuration
Thing configuration contains 3 sections
2024-09-28 17:46:53 +02:00
- [Station selection ](station_selection )
- [Warning Levels of selected station ](warning_levels )
- [Refresh rate ](configuration_parameters )
2024-06-15 19:38:55 +02:00
### Station selection
2024-09-28 17:46:53 +02:00
Stations can be selected with an Universally Unique Identifier (uuid).
It's automatically added by the Discovery.
2024-06-15 19:38:55 +02:00
Configure a station manually using [list of all available stations ](https://pegelonline.wsv.de/gast/pegeltabelle ) or [stations.json ](https://www.pegelonline.wsv.de/webservices/rest-api/v2/stations.json ) and choose the uuid of your desired measurement station.
### Warning Levels
< img align = "right" src = "./doc/Marburg.png" width = "450" height = "500" / >
Each station has specific warning levels
2024-09-28 17:46:53 +02:00
- Warning Levels 1 (*lowest*) to 3 (*highest*)
- Flooding Levels
2024-06-15 19:38:55 +02:00
2024-09-28 17:46:53 +02:00
Unfortunately these levels cannot be queried automatically.
2024-06-15 19:38:55 +02:00
Please select your [federal state ](https://www.hochwasserzentralen.de/ ) and check if which levels they provide.
The picture shows the levels of [measurement station Marburg of federal state Hesse ](https://www.hlnug.de/static/pegel/wiskiweb2/stations/25830056/station.html?v=20210802152952 )
If you cannot evaluate warning or flooding levels leave the parameter empty.
### Configuration parameters
2024-09-28 17:46:53 +02:00
| configuration | content | unit | description | required | default |
2024-06-15 19:38:55 +02:00
|------------------|-----------|------|---------------------------|----------|---------|
| uuid | text | - | Unique Station Identifier | X | N/A |
| warningLevel1 | integer | cm | Warning Level 1 | | N/A |
| warningLevel2 | integer | cm | Warning Level 2 | | N/A |
| warningLevel3 | integer | cm | Warning Level 3 | | N/A |
| hq10 | integer | cm | Decade Flooding | | N/A |
| hq100 | integer | cm | Century Flooding | | N/A |
| hqExtreme | integer | cm | Extreme Flooding | | N/A |
| refreshInterval | integer | min | Refresh Interval | X | 15 |
## Channels
| channel id | type | description |
|----------------------|----------------------|--------------------------------|
| timestamp | DateTime | Last Measurement |
| level | Number:Length | Water Level |
| trend | Number | Water Level Trend |
| warning | Number | Current Warning |
### Trend
Possible values:
2024-09-28 17:46:53 +02:00
- 1 : Rising
- 0 : Steady
- -1 : Lowering
2024-06-15 19:38:55 +02:00
### Warning
Current warning according to configuration
2024-09-28 17:46:53 +02:00
- 0 : No Warning
- 1 : Warning level 1
- 2 : Warning Level 2
- 3 : Warning Level 3
- 4 : Decade Flooding
- 5 : Century Flooding
- 6 : Extreme Flooding
2024-06-15 19:38:55 +02:00
## Full Example
### Things
```java
Thing pegelonline:station:giessen "Measurement Station Giessen" [
2024-09-28 17:46:53 +02:00
uuid="4b386a6a-996e-4a4a-a440-15d6b40226d4",
refreshInterval=15,
warningLevel1=550,
warningLevel2=600,
warningLevel3=650,
hq10=732,
2024-06-15 19:38:55 +02:00
hq100=786
]
```
### Items
```java
2024-09-28 17:46:53 +02:00
DateTime Lahn_Giessen_Timestamp "Measurement timestamp Lahn Giessen" {channel="pegelonline:station:giessen:timestamp" }
Number:Length Lahn_Giessen_Level "Water Level Lahn Giessen]" {channel="pegelonline:station:giessen:level" }
2024-06-15 19:38:55 +02:00
Number Lahn_Giessen_Trend "Water Level Trend Lahn Giessen" {channel="pegelonline:station:giessen:trend"}
2024-09-28 17:46:53 +02:00
Number Lahn_Giessen_Warning "Warning Level Lahn Giessen" {channel="pegelonline:station:giessen:warning"}
2024-06-15 19:38:55 +02:00
```
## Links
[PegelOnline API Documentation ](https://www.pegelonline.wsv.de/webservice/dokuRestapi#caching )