Skip to content

Update speciesid.py#46

Open
rw377 wants to merge 1 commit intommcc-xx:masterfrom
rw377:patch-1
Open

Update speciesid.py#46
rw377 wants to merge 1 commit intommcc-xx:masterfrom
rw377:patch-1

Conversation

@rw377
Copy link
Copy Markdown

@rw377 rw377 commented May 5, 2024

Adds a line to publish an MQQT topic identifying the common name of the species found (credit to alfista2600)

Adds a line to publish an MQQT topic identifying the common name of the species found (credit to alfista2600)
@wilkinnh
Copy link
Copy Markdown

I recently starting playing with this branch and it's pretty cool to get MQTT messages when the bird species is identified. That being said, I forked your branch and made a few modifications which made it even better. I basically used a JSON payload instead of just the string for the common name which gives me a lot more info when listening to updates. This is what the code ended up looking like. Also, I'm not a python developer so I'm sure this is rough, but it works for me.

mqtt_payload = "{\"id\": \"" + frigate_event + "\", \"camera\": \"" + after_data['camera'] + "\", \"common_name\": \"" + get_common_name(display_name) + "\"}"
client.publish( 'whosatmyfeeder/detections', mqtt_payload, qos=0, retain=False)
cursor = conn.cursor()

I created an MQTT entity in Home Assistant that captures the data, then set up an automation to send me a push notification with the name of the bird, along with a photo and the name of the camera that caught it. You could create an automation to directly listen to the MQTT topic, but I found that I got a lot of repeats and only wanted to know when there was a new bird (which is handled with the to_state and from_state of the entity state change).

I've got these changes posted at https://github.com/wilkinnh/WhosAtMyFeeder/tree/patch-1 is anyone wants to try it out.

k1n6b0b added a commit to k1n6b0b/WhosAtMyFeeder that referenced this pull request Mar 9, 2026
Cherry-picked from upstream PR mmcc-xx#46 by @rw377
(mmcc-xx#46)

When a bird is identified above the confidence threshold, publishes
the common name to the 'whosatmyfeeder/detections' MQTT topic.
Useful for Home Assistant automations and alerts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k1n6b0b added a commit to k1n6b0b/WhosAtMyFeeder that referenced this pull request Mar 9, 2026
Cherry-picked from upstream PR mmcc-xx#46 by @rw377
(mmcc-xx#46)

When a bird is identified above the confidence threshold, publishes
the common name to the 'whosatmyfeeder/detections' MQTT topic.
Useful for Home Assistant automations and alerts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k1n6b0b added a commit to k1n6b0b/WhosAtMyFeeder that referenced this pull request Mar 9, 2026
Cherry-picked from upstream PR mmcc-xx#46 by @rw377
(mmcc-xx#46)

When a bird is identified above the confidence threshold, publishes
the common name to the 'whosatmyfeeder/detections' MQTT topic.
Useful for Home Assistant automations and alerts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k1n6b0b added a commit to k1n6b0b/WhosAtMyFeeder that referenced this pull request Mar 9, 2026
Cherry-picked from upstream PR mmcc-xx#46 by @rw377
(mmcc-xx#46)

When a bird is identified above the confidence threshold, publishes
the common name to the 'whosatmyfeeder/detections' MQTT topic.
Useful for Home Assistant automations and alerts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k1n6b0b added a commit to k1n6b0b/WhosAtMyFeeder that referenced this pull request Mar 9, 2026
- Fix threshold in config.yml.example: 0.55 → 0.7 (matches upstream default)
- Add MQTT TLS config options to example (from merged feat/mqtt-tls)
- Rewrite README: cleaner structure, accurate feature list, calls out
  cherry-picked PRs (mmcc-xx#30 MQTT TLS, mmcc-xx#46 MQTT publish) with attribution,
  removes stale upstream "What's New" notes, adds Development section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants