No description
  • Python 99.1%
  • Dockerfile 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
edekeijzer f59a1195f8
All checks were successful
Build and push Docker image release / build-push-docker (release) Successful in 7s
Build and push Docker image development / build-push-docker (push) Successful in 8s
Update rootfs/rws2mqtt/app/main.py
Limits no longer seem to be always present, make finding and processing them more robust.
2026-08-04 17:34:22 +02:00
.forgejo/workflows Update .forgejo/workflows/build-dev.yaml 2026-08-03 16:15:39 +02:00
rootfs/rws2mqtt/app Update rootfs/rws2mqtt/app/main.py 2026-08-04 17:34:22 +02:00
tests Tests 2026-08-04 17:34:22 +02:00
.gitignore Add Forgejo workflows 2026-08-04 17:34:22 +02:00
docker-compose.yml Rewrite some more 2024-08-23 16:50:02 +02:00
Dockerfile Use correct path for entrypoint 2024-09-02 16:24:07 +02:00
pytest.ini Adapt to new API layout, use Pydantic instead of self made getter/setters. 2026-08-04 17:34:22 +02:00
README.md Adapt to new API layout, use Pydantic instead of self made getter/setters. 2026-08-04 17:34:22 +02:00
requirements-dev.txt Adapt to new API layout, use Pydantic instead of self made getter/setters. 2026-08-04 17:34:22 +02:00
requirements.txt Adapt to new API layout, use Pydantic instead of self made getter/setters. 2026-08-04 17:34:22 +02:00

rws2mqtt

Rijkswaterstaat data (waterhoogte, waterafvoer) in MQTT

Usage

Go to this page, open the details for the height/flow measurement(s) you want to track. Click 'Export/delen' and then 'Link' to find the location code. It will look something like tiel.waal

Config

Mandatory is one or more sensor entries with their location code and type. The name is optional; when omitted it is derived from the location code by replacing dots with spaces and title casing it (tiel.waal becomes Tiel Waal).

interval: 10m
sensor:
    - location: 'tiel.waal'
      name: 'Tiel-Waal' # Optional!
      type: 'waterafvoer'
    - location: 'tiel.waal'
      type: 'waterhoogte'

For a single sensor, you don't have to define an array:

sensor:
    location: 'tiel.waal'
    type: 'waterhoogte'

Valid types are waterhoogte, waterafvoer, watertemperatuur and zouten. The interval accepts either a number of seconds or a duration such as 10m or 1h30m.

Full config (with defaults):

interval: 900
oneshot: false
sensor:
  - location: tiel.waal
    name: Tiel-Waal
    type: waterhoogte
mqtt:
  host: localhost
  port: 0 # 0 means 1883, or 8883 when ssl is enabled
  ssl: false
  ssl_insecure: false
  client_id: rws2mqtt
  topic: rws2mqtt
  keepalive: 0
  username: null # may also be nested under an 'auth' key
  password: null
homeassistant:
  discovery: false
  topic: homeassistant
  cleanup: true
logging:
  file: null
  level: INFO
  colourize: false
  format: '%(asctime)s %(name)s %(levelname)-8s %(message)s'
  date_format: '%Y-%m-%d %H:%M:%S'

The config file is read from /etc/rws2mqtt.yml, or from the path in the CONFIG environment variable.

Development

python3 -m pip install -r requirements-dev.txt
python3 -m pytest