codearranger/trashminder
Acerca de
Home Assistant (HACS) integration: AI vision checks your curb camera and reminds you to take the bins out. Works with Google Home/Nest cameras.
IA y aprendizaje automáticoCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- Recopilando historial
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalTrashMinder 🗑️
Never forget trash night again. TrashMinder looks at your curb with a camera, asks an AI whether the bins are out, and nags you until they are.
It is a HACS custom integration for Home Assistant. Everything is set up from the UI. There are no add-ons, secrets files or YAML to edit.
How it works
graph TD
A[Evening before pickup, 3 PM] --> B[Grab a frame from your camera]
B --> C[Home Assistant AI Task<br/>OpenAI, Gemini, Anthropic, ...]
C --> D{Bins at the curb?}
D -->|No| E[Notify with the photo]
D -->|Yes| F[Confirm once and stop for this pickup]
E --> G[Wait for the next check]
G --> B
F --> H[Pickup morning: monitoring window closes]
G -->|window closes| H
- Any camera: anything that gives Home Assistant a still image works (ONVIF, RTSP, UniFi, Reolink, Ring, ...). Google Home / Nest cameras work too, even though Google removed their still-image API. See Camera support.
- Any AI: it uses Home Assistant's AI Task, so you pick the provider (OpenAI, Google Gemini, Anthropic, local models, ...). TrashMinder never sees an API key.
- Any notification, or none: use Home Assistant's built-in notification bell (the default, no setup), the Companion mobile app, or any other
notifyservice. The snapshot is attached for the mobile app, Pushover and Telegram. - Smart schedule: it monitors from the evening before pickup until pickup morning, with a holiday-aware pickup day and optional alternate-week bins (for example recycling every other week).
- Stops nagging once it has seen the bins for that pickup, and restarts on the next one.
- Full-resolution frames: the AI gets the camera's native image, with no downscaling.
Installation
In HACS, choose ⋮ → Custom repositories, add
https://github.com/codearranger/trashminderas an Integration, then download TrashMinder. (Or use the button above.)Restart Home Assistant.
Add the integration: Settings → Devices & services → Add integration → TrashMinder.
Requirements: Home Assistant 2025.8 or newer (for AI Task) and at least one AI Task entity, for example from the OpenAI, Google Generative AI or Anthropic integration.
Setup
The setup wizard has four short steps. All of it can be changed later under Configure on the integration.
| Step | What you set |
|---|---|
| Devices | the camera that sees your curb and the AI Task entity. Notification targets are optional |
| Schedule | pickup day, when to start and stop checking, how often, holidays |
| Detection & bins | an optional marker on your bins, hints for the AI, which bins go out when |
| Advanced | a go2rtc stream or URL, or a full prompt override (rarely needed) |
Pickup window. Defaults: the evening before pickup at 15:00 until 07:00 on pickup day, checking every 60 minutes. A holiday between Monday and your pickup day pushes that week's pickup back one day, so list your holidays (YYYY-MM-DD, one per line).
Alternate-week bins. Set "Bins out every pickup" (for example Trash, Yard Waste), "Bins out every other pickup" (Recycling) and one date on which the alternate bins are collected. The notification then names the right bins.
Camera support
TrashMinder asks Home Assistant for the camera's still image, so any camera that works in a Home Assistant picture card should work here.
Google Home / Nest cameras
Google's still-image API (GenerateImage) stopped working for cameras moved to the Google Home app. These cameras only offer WebRTC, and Home Assistant itself returns a dummy black image for them. TrashMinder detects this case and instead:
- registers the camera in go2rtc, using the credentials from Home Assistant's own Nest integration (TrashMinder doesn't store them itself, but go2rtc 1.10+ saves registered streams, including the Nest refresh token, in its own
go2rtc.yaml), and - grabs one live keyframe and decodes it to a full-resolution JPEG.
You need go2rtc: on Home Assistant OS install the go2rtc add-on (1.10.0 or newer; 1.9.15 can hang on a cold stream). It is found automatically. Otherwise enter its URL under Advanced. A snapshot takes about 3 to 4 seconds.
Any other WebRTC / RTSP camera in go2rtc
Enter the name of an existing go2rtc stream under Advanced → go2rtc stream name and TrashMinder will pull its frames from there.
Notifications
Notifications are optional and need no extra service. Leave the notification fields empty and TrashMinder posts to Home Assistant's own notification bell (a persistent notification), so reminders work out of the box. To get push alerts, pick one or more targets under Devices:
| Target | Image |
|---|---|
| (nothing selected): HA notification bell | text only |
notify.mobile_app_* (HA Companion app) |
✅ attached (via the Last snapshot image entity) |
notify.pushover (Pushover integration, optional) |
✅ attached (field-tested) |
notify.telegram* |
attached (not yet field-tested) |
any other notify.* action |
text only |
notify entities (notify.send_message style) |
text only |
Pushover is just one choice, not a requirement. Messages look like "Take the bins out: Bins not seen at the curb. Tomorrow's pickup (Trash, Yard Waste) - please put the bins out." If the check itself fails (camera down, AI error) you get a "could not check" notification rather than silence.
Night-time detection tip 🌙
Infrared night images make dark bins hard to see. Put a strip of reflective tape (a "T" works well) on your bins and describe it in Detection → Marker on your bins (for example bright white T-shaped reflective tape). The prompt then treats that marker as definitive proof the bin is yours. It also ignores neighbours' bins across the street.
Entities
| Entity | Purpose |
|---|---|
binary_sensor.trashminder_bins_at_curb |
on when the last check this pickup saw the bins. Attributes: confidence, description, last_checked, error |
binary_sensor.trashminder_monitoring |
on while the monitoring window is open |
sensor.trashminder_next_pickup |
next pickup date, with bins and the window start and end |
switch.trashminder_monitoring_enabled |
pause monitoring (for example on vacation) |
button.trashminder_check_now |
run a check right now; sends a [Test] notification |
image.trashminder_last_snapshot |
the last frame the AI looked at |
Use them in your own automations, for example a dashboard card, or to turn on a light until the bins are out.
Dashboard card
Paste this into a dashboard (Edit → Add card → Manual) for a snapshot of the last check plus status and controls:
type: vertical-stack
cards:
- type: picture-entity
entity: image.trashminder_last_snapshot
name: "Curb: last check"
show_state: false
- type: entities
title: Trash
entities:
- entity: binary_sensor.trashminder_bins_at_curb
name: Bins at curb
secondary_info: last-changed
- type: attribute
entity: binary_sensor.trashminder_bins_at_curb
attribute: confidence
name: AI confidence
- entity: sensor.trashminder_next_pickup
name: Next pickup
- type: attribute
entity: sensor.trashminder_next_pickup
attribute: bins
name: Bins this pickup
- entity: binary_sensor.trashminder_monitoring
name: Monitoring window
- entity: switch.trashminder_monitoring_enabled
name: Reminders enabled
- entity: button.trashminder_check_now
name: Check now (sends a test)
Troubleshooting
- Press Check now. It runs the whole pipeline and sends a
[Test]notification. TheBins at curbentity shows the AI's reasoning in itsdescriptionattribute, andLast snapshotshows exactly what it saw. - "go2rtc not reachable": install or start the go2rtc add-on, or set its URL under Advanced.
- Detection is unreliable at night: add a reflective marker, mention it in the settings, or try a stronger AI model in your AI Task integration.
- No image in Pushover / Telegram: the file lives under the Home Assistant media folder (
/media/trashminder/). Make sure it is not blocked byallowlist_external_dirs. - Logs: set
custom_components.trashminder: debugunderlogger:inconfiguration.yaml.
Migrating from v1 (AppDaemon)
Version 2 replaces the AppDaemon app and the Pushover/OpenAI secrets in AppDaemon. Remove trashminder.py and trashminder.yaml from your AppDaemon apps folder, install the integration as above, and pick a notification target (the mobile app, or Home Assistant's Pushover integration if you want to keep using Pushover) or leave it empty to use the notification bell. The old code is preserved at the legacy-appdaemon-v1 tag.
Development
python -m pytest tests # schedule and prompt logic, no Home Assistant needed
CI runs hassfest, HACS validation and the tests.
License
Explorar proyectos relacionados
Cargando…