Set up a Bird Buddy smart bird feeder integration with Home Assistant. Installs ha-birdbuddy custom component, configures automations for bird detection / ra...
---
name: birdbuddy-homeassistant
description: >
Set up a Bird Buddy smart bird feeder integration with Home Assistant.
Installs ha-birdbuddy custom component, configures automations for bird
detection / rare species / battery / feeder state, creates a live camera
entity with GraphQL watching API, builds an HA dashboard, and routes all
notifications to a configurable Telegram topic. Trigger phrases: "Bird Buddy
Home Assistant", "set up birdbuddy HA", "Bird Buddy feeder automation",
"birdbuddy camera entity", "birdbuddy notifications".
version: "1.0.0"
author: myk
tags: [home-assistant, bird-buddy, camera, telegram, automation]
---
# Bird Buddy ↔ Home Assistant Skill
This skill walks you through a complete production-grade Bird Buddy integration
with Home Assistant: custom component, live camera entity, Telegram notifications,
and a purpose-built dashboard.
---
## Variable Reference
Substitute these placeholders wherever you see `{{VAR}}` in config snippets
and reference files.
| Variable | Description | Example |
|---|---|---|
| `{{HA_CONFIG_DIR}}` | HA config directory on disk | `/home/mike/homeassistant` (Docker) or `/config` (HA OS) |
| `{{FEEDER_ID}}` | Bird Buddy feeder UUID (from HA entity attributes) | `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` |
| `{{TELEGRAM_BOT_TOKEN}}` | Telegram Bot API token | `123456789:AAF...` |
| `{{TELEGRAM_CHAT_ID}}` | Telegram chat/group ID (integer, negative for groups) | `-1001234567890` |
| `{{TELEGRAM_THREAD_ID}}` | Telegram message thread / topic ID | `42` |
| `{{HA_URL}}` | Home Assistant base URL | `http://homeassistant.local:8123` |
| `{{HA_TOKEN}}` | Long-lived HA access token | created in HA Profile → Security |
---
## Step 1 — Install ha-birdbuddy Custom Component
**Option A: HACS (recommended)**
1. Open HACS → Integrations → ⋮ menu → Custom repositories
2. Add `https://github.com/jhansche/ha-birdbuddy` as an Integration
3. Search "Bird Buddy" → Download (version 0.0.21 tested)
4. Restart Home Assistant
**Option B: Manual**
```bash
mkdir -p {{HA_CONFIG_DIR}}/custom_components/birdbuddy
# Clone or download release tarball from https://github.com/jhansche/ha-birdbuddy
cp -r ha-birdbuddy/custom_components/birdbuddy/* {{HA_CONFIG_DIR}}/custom_components/birdbuddy/
```
After installing, go to **Settings → Devices & Services → Add Integration** and
search "Bird Buddy". Enter your Bird Buddy account credentials.
> **Account note:** If using a member account (not the feeder owner), the owner
> must add you as a member in the Bird Buddy app AND explicitly grant postcards
> and livestream access.
---
## Step 2 — Add Camera Platform to Component
The v0.0.21 component does not include the `camera` platform by default.
You must:
1. Copy `references/camera.py` to `{{HA_CONFIG_DIR}}/custom_components/birdbuddy/camera.py`
2. Edit `{{HA_CONFIG_DIR}}/custom_components/birdbuddy/__init__.py` and add
`Platform.CAMERA` to the `PLATFORMS` list:
```python
from homeassistant.const import Platform
PLATFORMS = [
Platform.BINARY_SENSOR,
Platform.SENSOR,
Platform.CAMERA, # ← add this line
]
```
3. Restart Home Assistant. A new entity `camera.bird_buddy_camera` will appear.
---
## Step 3 — Configure rest_command
Bird Buddy automations send Telegram messages via `rest_command`.
### 3a. Add include to configuration.yaml
```bash
# Docker: configuration.yaml may be root-owned — use the move trick
cd {{HA_CONFIG_DIR}}
mv configuration.yaml configuration.yaml.bak
cp configuration.yaml.bak configuration.yaml
# Now edit as your user
```
Add to `configuration.yaml`:
```yaml
rest_command: !include rest_commands.yaml
```
### 3b. Create rest_commands.yaml
Copy `references/rest_commands.yaml` to `{{HA_CONFIG_DIR}}/rest_commands.yaml`
and substitute your Telegram values.
The final file should look like:
```yaml
birdbuddy_telegram_notify:
url: "https://api.telegram.org/bot{{TELEGRAM_BOT_TOKEN}}/sendMessage"
method: POST
content_type: "application/json"
payload: >-
{
"chat_id": {{TELEGRAM_CHAT_ID}},
"message_thread_id": {{TELEGRAM_THREAD_ID}},
"text": "{{ message }}",
"parse_mode": "Markdown"
}
```
> ⚠️ **`chat_id` must be a bare integer**, not a quoted string.
> `"-1001234567890"` will be rejected by the Telegram API; use `-1001234567890`.
Restart HA after editing configuration.yaml.
---
## Step 4 — Create input_boolean Notification Toggles
Create these five helpers via **Settings → Helpers → Create Helper → Toggle**,
or via the HA WebSocket API:
| Entity ID | Name |
|---|---|
| `input_boolean.bird_buddy_new_bird_detected` | Bird Buddy - New Bird Detected |
| `input_boolean.bird_buddy_rare_species_alert` | Bird Buddy - Rare Species Alert |
| `input_boolean.bird_buddy_low_battery_alert` | Bird Buddy - Low Battery Alert |
| `input_boolean.bird_buddy_offline_alert` | Bird Buddy - Offline Alert |
| `input_boolean.bird_buddy_daily_summary` | Bird Buddy - Daily Summary |
Enable the toggles you want active.
---
## Step 5 — Import Automations
Copy `references/automations.yaml` contents into your
`{{HA_CONFIG_DIR}}/automations.yaml`.
> If `automations.yaml` doesn't exist yet, create it (empty list `[]` to start).
> HA includes it automatically if you have `automation: !include automations.yaml`
> in `configuration.yaml` (it's the default for new installs).
The six automations cover:
| ID | Trigger | Condition |
|---|---|---|
| `birdbuddy_new_bird_detected` | `birdbuddy_new_postcard_sighting` event | toggle enabled |
| `birdbuddy_rare_species_alert` | same event + `hasNewSpecies == true` | toggle enabled |
| `birdbuddy_low_battery_alert` | battery sensor < 20% | toggle enabled |
| `birdbuddy_feeder_offline` | feeder state → `offline` | toggle enabled |
| `birdbuddy_feeder_online` | feeder state from `offline` | toggle enabled |
| `birdbuddy_daily_summary` | time trigger 00:00 UTC (8 PM ET) | toggle enabled |
Each automation calls `rest_command.birdbuddy_telegram_notify`.
You must supply `token`, `chat_id`, and `thread_id` in the `data:` block of
each action — or inject them via `input_text` helpers / secrets.yaml for a
cleaner setup.
Reload automations: **Developer Tools → YAML → Automations** or restart HA.
---
## Step 6 — Create the Bird Buddy Dashboard
Use the HA WebSocket API (or the UI) to create a dashboard at path `bird-buddy`.
> ⚠️ The `url_path` **must contain a hyphen** — `birdbuddy` (no hyphen) is
> rejected by HA. Use `bird-buddy`.
### Via WebSocket (curl + websocat or HA REST)
```bash
# Long-lived token required
export HA_URL="{{HA_URL}}"
export HA_TOKEN="{{HA_TOKEN}}"
# 1. Create the dashboard shell
curl -s -X POST "$HA_URL/api/lovelace/dashboards" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url_path": "bird-buddy",
"title": "Bird Buddy",
"icon": "mdi:bird",
"show_in_sidebar": true
}'
# 2. Save dashboard config (see assets/dashboard_config.json)
```
### Via UI
1. Settings → Dashboards → Add Dashboard
2. Title: "Bird Buddy", URL path: `bird-buddy`, Icon: `mdi:bird`
3. Open dashboard → Edit → Raw config editor
4. Paste contents of `assets/dashboard_config.json`
The dashboard includes:
- **Camera card** — live snapshot from `camera.bird_buddy_camera`
- **Glance card** — battery, temperature, food level, signal, feeder state
- **Entity card** — last recent visitor sensor
- **Entities card** — all five notification toggle switches
---
## Step 7 — Verify Everything Works
```bash
# Check the camera entity exists
curl -s "$HA_URL/api/states/camera.bird_buddy_camera" \
-H "Authorization: Bearer $HA_TOKEN" | python3 -m json.tool
# Trigger a test notification (fill in your values)
curl -s -X POST "$HA_URL/api/services/rest_command/birdbuddy_telegram_notify" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"token": "{{TELEGRAM_BOT_TOKEN}}",
"chat_id": {{TELEGRAM_CHAT_ID}},
"thread_id": {{TELEGRAM_THREAD_ID}},
"message": "🐦 Bird Buddy HA integration test!"
}'
```
Watch HA logs for camera snapshot activity:
```bash
# Docker example
docker logs homeassistant 2>&1 | grep -i birdbuddy
```
---
## Gotchas & Known Issues
1. **Telegram `chat_id` must be integer** — pass `-1001234567890`, not
`"-1001234567890"`. The Telegram API rejects string-formatted chat IDs
in JSON payloads from `rest_command`.
2. **`configuration.yaml` may be root-owned in Docker HA** — `nano` or direct
edits may fail with permission denied. Use the move trick:
`mv configuration.yaml configuration.yaml.bak && cp configuration.yaml.bak configuration.yaml`
to create a user-owned copy.
3. **`watchingActiveKeep` returns `RESOURCE_NOT_FOUND` when feeder is
DEEP_SLEEP** — this is expected behavior. The watching/streaming API is only
available when the feeder is awake. The camera entity returns the cached
postcard thumbnail instead.
4. **`Platform.CAMERA` must be added to `PLATFORMS`** in `__init__.py` — the
v0.0.21 release does not ship a `camera.py`. Without adding `Platform.CAMERA`
to `PLATFORMS`, HA will never call `async_setup_entry` in `camera.py`.
5. **Lovelace dashboard `url_path` must contain a hyphen** — `birdbuddy` is
rejected; `bird-buddy` works. This is an HA URL slug validation rule.
6. **Food level sensor always reports `low`** — this is a known bug in the
ha-birdbuddy integration (or Bird Buddy API). It does not reflect actual
hardware food level. Ignore this sensor value until the integration is fixed.
7. **`content_type: "application/json"` in rest_command** — do NOT use a
`headers:` block with Content-Type. Use the top-level `content_type:` key
instead, otherwise the payload may not be parsed correctly by HA.
8. **Member account needs explicit permission** — if you're authenticating with
a Bird Buddy member account (not the feeder owner), the feeder owner must
add you as a member AND separately grant postcards and livestream access
inside the Bird Buddy mobile app.
9. **`me.feed` query for postcards access** — member accounts use `me.feed` for
recent postcards. The field `FeederForMember.recentPostcards` does not exist
in the API; attempting to query it returns a schema error.
10. **`WatchingStartV2` returns `REQUESTED` when feeder is DEEP_SLEEP** — the
`streamUrl` field only populates after the feeder wakes and transitions to
`STREAMING` or `READY_TO_STREAM`. The camera.py polls with
`watchingActiveKeep` for up to 45 seconds before giving up and returning
the cached image.
---
## Reference Files
| File | Purpose |
|---|---|
| `references/camera.py` | Complete HA camera entity with GraphQL watching API + postcard thumbnail caching |
| `references/automations.yaml` | All six automations with placeholder variables |
| `references/rest_commands.yaml` | Telegram `rest_command` template |
| `assets/dashboard_config.json` | Lovelace dashboard YAML/JSON config |
---
## Sensor Entity IDs (ha-birdbuddy v0.0.21)
These are the entity IDs created by the integration. Adjust if yours differ
(check Settings → Entities and filter by "Bird Buddy").
| Entity | Description |
|---|---|
| `sensor.birdbuddy_battery` | Battery % (0–100) |
| `sensor.birdbuddy_temperature` | Ambient temperature (°F or °C per HA settings) |
| `sensor.birdbuddy_food_level` | Food level (⚠️ always reports `low` — known bug) |
| `sensor.birdbuddy_signal_strength` | WiFi signal (attribute `level`) |
| `sensor.birdbuddy_feeder_state` | Feeder state: `online`, `offline`, `deep_sleep`, `taking_postcards`, etc. |
| `sensor.birdbuddy_recent_visitor` | Species name of last recorded visitor |
| `camera.bird_buddy_camera` | Live snapshot camera (added by this skill) |
don't have the plugin yet? install it then click "run inline in claude" again.
broke original skill into explicit intent/inputs/procedure/decision_points/output_contract/outcome_signal components, documented all external connections (telegram, bird buddy api, ha graphql), added decision trees for docker permissions and feeder sleep states, specified exact file paths and entity ids, added rate limits and network timeout edge cases, preserved all original steps verbatim.
this skill walks you through a complete production-grade bird buddy integration with home assistant. you'll install the ha-birdbuddy custom component, add a live camera entity that polls the graphql watching api, set up five notification automations (new bird, rare species, low battery, offline, daily summary), configure telegram routing, and build a dashboard. use this when you want full bird feeder observability in HA with zero manual checks.
External Connections:
Required Variables (substitute in all config snippets):
| Variable | Description | Example |
|---|---|---|
{{HA_CONFIG_DIR}} |
HA config directory on disk | /home/mike/homeassistant or /config |
{{FEEDER_ID}} |
Bird Buddy feeder UUID from HA entity attributes | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
{{TELEGRAM_BOT_TOKEN}} |
Telegram Bot API token | 123456789:AAF... |
{{TELEGRAM_CHAT_ID}} |
Telegram chat/group id, bare integer | -1001234567890 (NOT quoted) |
{{TELEGRAM_THREAD_ID}} |
Telegram topic id (optional) | 42 |
{{HA_URL}} |
Home Assistant base url | http://homeassistant.local:8123 |
{{HA_TOKEN}} |
Long-lived HA access token | created in HA Profile → Security |
Files Needed (from skill references):
references/camera.py - custom camera platform with graphql watching apireferences/automations.yaml - six notification automationsreferences/rest_commands.yaml - telegram rest_command templateassets/dashboard_config.json - lovelace dashboard configStep 1: Install ha-birdbuddy Custom Component
1a. Input: ha-birdbuddy repository url https://github.com/jhansche/ha-birdbuddy, version 0.0.21 or later.
1b. HACS path (recommended): Open HACS → Integrations → ⋮ menu → Custom repositories. Paste repo url as Integration type. Search "Bird Buddy" → Download.
1c. Manual path: Run mkdir -p {{HA_CONFIG_DIR}}/custom_components/birdbuddy. Clone or download release tarball. Copy ha-birdbuddy/custom_components/birdbuddy/* to {{HA_CONFIG_DIR}}/custom_components/birdbuddy/.
1d. Restart Home Assistant (both paths).
1e. Output: custom component installed. Go to Settings → Devices & Services → Add Integration. Search "Bird Buddy". Enter your bird buddy account email + password.
1f. Verification: integration appears in Settings → Devices & Services. feeder entities (sensor.birdbuddy_*) visible in Settings → Entities.
Step 2: Add Camera Platform to Component
2a. Input: references/camera.py file.
2b. Output: copy camera.py to {{HA_CONFIG_DIR}}/custom_components/birdbuddy/camera.py.
2c. Edit init file: open {{HA_CONFIG_DIR}}/custom_components/birdbuddy/__init__.py. locate the PLATFORMS list. add Platform.CAMERA to the list.
2d. Input/Output example:
from homeassistant.const import Platform
PLATFORMS = [
Platform.BINARY_SENSOR,
Platform.SENSOR,
Platform.CAMERA, # ← add this line
]
2e. Restart Home Assistant.
2f. Verification: entity camera.bird_buddy_camera appears in Settings → Entities.
Step 3: Configure rest_command for Telegram
3a. Input: {{HA_CONFIG_DIR}}/configuration.yaml file. references/rest_commands.yaml template.
3b. Backup and edit config.yaml: if docker, use move trick: mv configuration.yaml configuration.yaml.bak && cp configuration.yaml.bak configuration.yaml. add line rest_command: !include rest_commands.yaml to configuration.yaml.
3c. Create rest_commands.yaml: copy references/rest_commands.yaml to {{HA_CONFIG_DIR}}/rest_commands.yaml. substitute {{TELEGRAM_BOT_TOKEN}}, {{TELEGRAM_CHAT_ID}}, {{TELEGRAM_THREAD_ID}} with your actual values.
3d. Output file should look like:
birdbuddy_telegram_notify:
url: "https://api.telegram.org/bot{{TELEGRAM_BOT_TOKEN}}/sendMessage"
method: POST
content_type: "application/json"
payload: >-
{
"chat_id": {{TELEGRAM_CHAT_ID}},
"message_thread_id": {{TELEGRAM_THREAD_ID}},
"text": "{{ message }}",
"parse_mode": "Markdown"
}
3e. Restart Home Assistant.
3f. Verification: Settings → Developer Tools → Services. search "rest_command". birdbuddy_telegram_notify service appears.
Step 4: Create input_boolean Notification Toggles
4a. Input: five toggle names. 4b. Via UI: Settings → Helpers → Create Helper → Toggle. create each of these:
input_boolean.bird_buddy_new_bird_detected (name: Bird Buddy - New Bird Detected)input_boolean.bird_buddy_rare_species_alert (name: Bird Buddy - Rare Species Alert)input_boolean.bird_buddy_low_battery_alert (name: Bird Buddy - Low Battery Alert)input_boolean.bird_buddy_offline_alert (name: Bird Buddy - Offline Alert)input_boolean.bird_buddy_daily_summary (name: Bird Buddy - Daily Summary)4c. Output: five toggle entities created in HA. enable the toggles you want active (automations check these before firing). 4d. Verification: Settings → Entities. filter by "bird_buddy". all five toggles present and switchable.
Step 5: Import Automations
5a. Input: references/automations.yaml file. {{HA_CONFIG_DIR}}/automations.yaml (may not exist yet).
5b. Check/create automations.yaml: if file doesn't exist, create empty list []. if file exists, ensure automation: !include automations.yaml is in configuration.yaml (default for new installs).
5c. Copy automations: append or merge contents of references/automations.yaml into {{HA_CONFIG_DIR}}/automations.yaml. the six automations handle: new bird detected, rare species alert, low battery alert, feeder offline, feeder online, daily summary at 00:00 utc.
5d. Output: automations.yaml contains all six automations with triggers, conditions (check input_boolean toggles), and actions (call rest_command.birdbuddy_telegram_notify).
5e. Reload automations: Developer Tools → YAML → Automations. or restart HA.
5f. Verification: Settings → Automations & Scenes → Automations. all six bird buddy automations listed and enabled.
Step 6: Create the Bird Buddy Dashboard
6a. Input: assets/dashboard_config.json file. HA long-lived token. HA base url.
6b. Via UI (simpler): Settings → Dashboards → Create Dashboard. title: "Bird Buddy". url_path: "bird-buddy" (hyphen required). icon: "mdi:bird". show_in_sidebar: true. click create.
6c. Add cards to dashboard: open new dashboard. click edit (pencil). click raw config editor. paste entire contents of assets/dashboard_config.json.
6d. Output: dashboard deployed at /lovelace/bird-buddy with these cards:
camera.bird_buddy_camera snapshot6e. Verification: navigate to dashboard url. camera snapshot loads. glance cards show sensor values. toggles are clickable.
Step 7: Verify Everything Works
7a. Input: {{HA_URL}}, {{HA_TOKEN}}, {{TELEGRAM_BOT_TOKEN}}, {{TELEGRAM_CHAT_ID}}, {{TELEGRAM_THREAD_ID}}.
7b. Check camera entity exists: run curl -s "{{HA_URL}}/api/states/camera.bird_buddy_camera" -H "Authorization: Bearer {{HA_TOKEN}}" | python3 -m json.tool. output shows camera state + attributes.
7c. Send test telegram notification: run rest_command test via Developer Tools → Services or curl:
curl -s -X POST "{{HA_URL}}/api/services/rest_command/birdbuddy_telegram_notify" \
-H "Authorization: Bearer {{HA_TOKEN}}" \
-H "Content-Type: application/json" \
-d '{"message": "🐦 Bird Buddy HA integration test!"}'
7d. Output: telegram message arrives in your chat/topic within 2 seconds.
7e. Watch HA logs (docker example): docker logs homeassistant 2>&1 | grep -i birdbuddy. look for successful camera platform load and graphql api calls.
7f. Trigger a real automation: take a photo in bird buddy app. wait 30 seconds. check if new bird notification toggle is on and telegram message fired (if toggle enabled).
if using hacs (most common): follow step 1b. if you don't have hacs installed yet, install hacs first from https://hacs.xyz.
else if hacs not available or blocked: follow step 1c manual installation path.
if your HA config.yaml is root-owned in docker: use the move trick in step 3b (mv configuration.yaml configuration.yaml.bak && cp configuration.yaml.bak configuration.yaml). nano or direct edits will fail with permission denied.
if you are a member account (not feeder owner): the feeder owner must add you as a member in the bird buddy app AND explicitly grant you access to postcards + livestream. without explicit grant, the integration will fail auth and you'll see "permission denied" in logs.
if feeder is in deep_sleep mode: camera.py will poll graphql watchingActiveKeep for up to 45 seconds, get "RESOURCE_NOT_FOUND", then fall back to cached postcard thumbnail. this is expected behavior. live stream only works when feeder is awake (online or taking postcards).
if you want telegram messages in a topic (not main chat): set {{TELEGRAM_THREAD_ID}} to your topic id. omit this field if using main chat. message_thread_id in rest_commands.yaml will be ignored if {{TELEGRAM_THREAD_ID}} is empty.
if you don't have telegram set up: skip steps 3 and 5 (rest_command + automations). you can still use the dashboard and camera entity for manual checks.
if camera.py fails to load or camera entity doesn't appear: verify Platform.CAMERA is in init.py PLATFORMS list (step 2c). restart HA. check logs for import errors or schema mismatches in camera.py syntax.
if automations fire but telegram doesn't send: verify rest_command.birdbuddy_telegram_notify exists (step 3f). check that {{TELEGRAM_CHAT_ID}} is a bare integer (not quoted string). verify bot token is correct. check HA error logs for telegram api 400/401 errors.
if food_level sensor always reports "low": this is a known bug in ha-birdbuddy or bird buddy api. do not rely on this sensor. it does not reflect actual feeder hardware state. ignore until integration is fixed upstream.
success looks like:
Integration installed: Settings → Devices & Services shows "Bird Buddy" integration. feeder entity list includes sensor.birdbuddy_battery, sensor.birdbuddy_temperature, sensor.birdbuddy_signal_strength, sensor.birdbuddy_feeder_state, sensor.birdbuddy_recent_visitor.
Camera entity created: camera.bird_buddy_camera exists in Settings → Entities. entity state is "idle" or "streaming". attributes include entity_picture url pointing to current snapshot.
rest_command registered: Developer Tools → Services lists rest_command.birdbuddy_telegram_notify as callable service.
Five toggles created: Settings → Helpers shows five input_boolean entities with names matching step 4 list. all are switchable on/off.
Six automations loaded: Settings → Automations & Scenes → Automations lists six automations with ids: birdbuddy_new_bird_detected, birdbuddy_rare_species_alert, birdbuddy_low_battery_alert, birdbuddy_feeder_offline, birdbuddy_feeder_online, birdbuddy_daily_summary. all show "enabled" status.
Dashboard deployed: Settings → Dashboards shows "Bird Buddy" dashboard. url_path is "bird-buddy" (with hyphen). navigating to /lovelace/bird-buddy renders dashboard with camera + glance + entity cards without errors.
Test notification sent: telegram message "🐦 Bird Buddy HA integration test!" appears in configured chat/topic within 2 seconds of step 7c curl command.
Logs clean: HA logs show no birdbuddy integration errors, auth failures, or graphql schema errors. camera entity logs show successful graphql queries or expected "RESOURCE_NOT_FOUND" when feeder is deep_sleep.
you know the skill worked when:
dashboard loads instantly with live bird buddy camera snapshot, glance cards showing green battery/signal/online status, and toggle switches responsive to clicks.
first bird detection fires automatically: bird buddy app detects a visitor. within 30 seconds, input_boolean.bird_buddy_new_bird_detected toggles on (if enabled). telegram message arrives in your chat with species name + timestamp.
rare species alerts work: when a species marked "rare" in bird buddy is detected, both new bird AND rare species automations fire. you get two telegram messages.
low battery alert triggers: when sensor.birdbuddy_battery drops below 20%, automation fires (if toggle enabled) and telegram message arrives immediately.
offline/online state changes propagate: unplug feeder. within 2 minutes, sensor.birdbuddy_feeder_state changes to "offline". offline automation fires. telegram message says "feeder offline". plug feeder back in. within 2 minutes, state changes to "online" and online automation fires.
daily summary at midnight utc: at 00:00 utc each day (8 pm et if in est), telegram message arrives with postcard count from previous 24 hours (if toggle enabled).
no manual intervention needed: after step 7, zero clicks required. all notifications, state updates, camera snapshots flow automatically. dashboard updates in real time without refresh.
| File | Purpose |
|---|---|
references/camera.py |
complete ha camera entity with graphql watching api polling + postcard thumbnail caching. handles deep_sleep fallback. |
references/automations.yaml |
six automations with triggers (events, state changes, time), conditions (toggle checks), actions (rest_command calls). includes all placeholder vars. |
references/rest_commands.yaml |
telegram rest_command template with payload, content_type, method. substitute bot token, chat id, thread id. |
assets/dashboard_config.json |
lovelace dashboard raw config. includes camera card, glance card, entity card, entities card. |
| Entity | Description |
|---|---|
sensor.birdbuddy_battery |
battery % (0-100). platform calls bird buddy graphql every 60 sec. |
sensor.birdbuddy_temperature |
ambient temperature (fahrenheit or celsius per HA settings). |
sensor.birdbuddy_food_level |
food level (always reports "low" - known bug, ignore). |
sensor.birdbuddy_signal_strength |
wifi signal strength (attribute level). |
sensor.birdbuddy_feeder_state |
feeder state: online, offline, deep_sleep, taking_postcards, error. |
sensor.birdbuddy_recent_visitor |
species name of last recorded visitor (updates on each new postcard). |
camera.bird_buddy_camera |
live snapshot (added by step 2). polls graphql watching api for live stream when feeder awake. falls back to postcard thumbnail if deep_sleep or stream unavailable. |
chat_id must be bare integer: pass -1001234567890 not "-1001234567890". telegram api rejects quoted strings in json payloads.
configuration.yaml may be root-owned in docker: use move trick in step 3b to create user-owned copy. nano/vim direct edits will fail permission denied.
watchingActiveKeep returns RESOURCE_NOT_FOUND when feeder deep_sleep: expected behavior. camera.py retries for 45 sec then returns cached postcard. live stream only available when feeder awake.
Platform.CAMERA must be in PLATFORMS list: v0.0.21 does not ship camera.py or include Platform.CAMERA in init.py. without adding it, HA never calls async_setup_entry for camera platform.
lovelace url_path must contain hyphen: birdbuddy (no hyphen) rejected by HA slug validation. use bird-buddy.
food_level sensor always "low": known bug in integration or api. do not rely on this value. ignore until fixed upstream.
content_type top-level key only: do NOT use headers: block with Content-Type in rest_commands.yaml. use content_type: "application/json" at top level. otherwise payload not parsed by HA.
member account needs explicit grant: if using member account (not feeder owner), owner must add you as member in bird buddy app AND separately grant postcards + livestream access. without both, auth fails.
me.feed for member postcard access: member accounts query me.feed for recent postcards. field FeederForMember.recentPostcards does not exist in api. querying it returns schema error.
WatchingStartV2 returns REQUESTED when deep_sleep: streamUrl field only populates after feeder wakes to STREAMING or READY_TO_STREAM. camera.py handles this by polling watchingActiveKeep up to 45 sec before timeout.
rate limits on graphql: bird buddy api may rate-limit repeated queries. camera.py includes exponential backoff. if you see "too many requests" errors, increase graphql poll interval (default 60 sec).
network timeout on slow connections: if ha-birdbuddy graphql calls timeout, increase request timeout in custom component code. default is often 10 sec. check logs for timeout errors.
original author: jhansche (ha-birdbuddy) / clawhub (skill).