homebridge-afvalwijzer
v1.0.0
Published
Homebridge plugin that adds HomeKit MotionSensors per Dutch waste fraction via mijnafvalwijzer.nl.
Downloads
27
Maintainers
Readme
homebridge-afvalwijzer
A Homebridge platform plugin that creates a MotionSensor in HomeKit for each Dutch waste fraction collected at your address, powered by mijnafvalwijzer.nl.
Each sensor reports Motion Detected on (or before) the day your bin is collected, making it easy to build HomeKit automations — for example, a notification at 19:00 the evening before collection day.
Supported fractions (and any others returned by the API):
- GFT (groente-, fruit- en tuinafval)
- Restafval
- PMD (plastic, metaal en drinkpakken)
- Papier
- Glas
- Kerstboom, Takken, Grof afval, Textiel, …
Requirements
- Node.js 22 or 24
- Homebridge 1.8+ or 2.x
- A Dutch address served by mijnafvalwijzer.nl
Installation
Via the Homebridge UI: search for Afvalwijzer and click Install.
Via npm:
npm install -g homebridge-afvalwijzerConfiguration
Add the following platform to your Homebridge config.json:
{
"platforms": [
{
"platform": "Afvalwijzer",
"name": "Afvalwijzer",
"postalCode": "1234AB",
"houseNumber": 1,
"suffix": "",
"pollIntervalHours": 4,
"triggerOffsetDays": 1
}
]
}| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| postalCode | string | yes | — | Dutch postal code (e.g. 1234AB or 1234 AB) |
| houseNumber | integer | yes | — | Numeric house number |
| suffix | string | no | "" | House number addition (e.g. A, bis) |
| pollIntervalHours | integer | no | 4 | How often to refresh data (1–24 hours) |
| triggerOffsetDays | integer | no | 0 | Days before collection to activate sensors (0 = on the day, 1 = day before) |
Automation example
To receive a push notification the evening before collection:
- Open the Home app → Automation → +.
- Trigger: An accessory controls something → pick the sensor for your fraction (e.g. "GFT").
- Condition: when Motion is Detected.
- Time filter: At a specific time → 19:00.
- Action: send a notification or trigger a scene.
With triggerOffsetDays: 1 the sensor turns on the day before collection, so the 19:00 automation will fire the evening before your bin needs to go out.
How it works
On startup the plugin calls api.mijnafvalwijzer.nl for your address and creates one MotionSensor per waste fraction. Sensors are refreshed every pollIntervalHours and re-evaluated right after local midnight so the state is always up to date. Any fraction that disappears from the API response is automatically removed from HomeKit.
Credits
API endpoint and data structure based on the homeassistant-afvalwijzer project by xirixiz. Plugin scaffold follows the official homebridge-plugin-template.
License
MIT
