Replies: 13 comments 92 replies
-
I've just started looking into getting some data from BirdNET into my home assistant too, thinking mqtt from apprise is probably the best bet. |
Beta Was this translation helpful? Give feedback.
-
Hey, I've been looking into this aswell. Via apprise it's probs not possible to parse data out of notifications, but via mqtt I think that it would be poss with a template sensor. Couldn't get the mqtt version of apprise to work though.Tad busy with work atm (night shifts) but I'm looking into making a docker version of this project. Currently got it installed in a debian container, I just need to sort out getting the services started, then start separating out each service into it's own container. My end goal is for it to become a home assistant add-on. It would open up this project to a very vast community. |
Beta Was this translation helpful? Give feedback.
-
You can make this slightly easier like this: setup apprise like this (not my real details) for every detection
Set the apprise title as empty and the body as this
setup an mqtt sensor:
I also setup a 'camera' for the image:
I have a mushroom card setup like this (you'll need mushroom and stack-in cards to copy directly):
(EDIT: Added missing mqtt sensor) |
Beta Was this translation helpful? Give feedback.
-
It's also prettier than my monstrosity, however, in my defence, I did this quite some time ago AND was only concerned with consuming data internally to an LCD display, so I hadn't tarted it up like @phillprice has. I must implement this in the front-of-house so to speak and leave the monster running for the back-end as I'm sure there was another thing I wanted to get out of the database that I couldn't have natively. I should probably re-visit it and see if I can roll it all into one. |
Beta Was this translation helpful? Give feedback.
-
Apologies my actual MQTT sensors are setup as a separate file so the indentation might differ in what I typed. I'm also on the latest HA - the mqtt setup changed recently. With that in mind here's my actual mqtt sensor setup: config/configuration.yaml
config/mqtt.yaml
No worries @lloydbayley I apprise is quite new in the repo |
Beta Was this translation helpful? Give feedback.
-
I'm not sure if anyone is still watching this thread, but after some trials and tribulations (not really understanding how MQTT works) and all the help here especially @phillprice great codes, I've managed to get this integrated nicely into HA! Thank you so much! I have one problem left, much like @nbanderso my sensor goes to 'sleep' until a new bird is detected so I end up with the code rather than the last bird (roughly 20 mins) in the description fields of the card. Is there a way to poll my Birdnet install from HA to keep the sensor 'awake' so to speak? I saw @lloydbayley talking about setting up a cron job on the server but that might be past my expertise. |
Beta Was this translation helpful? Give feedback.
-
Interesting idea about storing it on disk. Of course, you could roll your own MQTT output with mosquitto_pub which allows the retain flag specifically for this purpose but that presumes one has the knowledge required so to do. I raised a suggestion with Apprise about having retain flag availability and apparently it is something they are working on: caronc/apprise#799 (comment) (see the link the chap posted in response to my question). If they DO get this done, it would be a matter of updating Apprise to encompass this. I suppose without 'rolling your own' we shall have to wait and see. |
Beta Was this translation helpful? Give feedback.
-
I recently (this weekend) migrated to the new analyser (3k) and notifications seem to have stopped. They work if I do a test from BirdNET but not independently. Has anyone else noticed this? |
Beta Was this translation helpful? Give feedback.
-
@lloydbayley I would like to pull in a the detection data i.e. last hour, today, etc. I think you have detailed that but I would be lying if I said I understood what you said! Would you mind breaking it down to me? |
Beta Was this translation helpful? Give feedback.
-
I'm having a strange issue where when I set the Apprise body and test it works fine, but when I click Update Settings to save it the text disappears. This has been going on for a while. Running the latest update and yes, this time I did turn it off an on again lol. Many times! ANy ideas what might be causing this would be greatly appricated. Running MacOS and tested in Chrome, Safari and more recently Arc |
Beta Was this translation helpful? Give feedback.
-
Strange thing is happening, my MQTT message seems to come through with an escape character This seems to be causing HA to not be able to read the dictionary |
Beta Was this translation helpful? Give feedback.
-
I try to save the code in body: |
Beta Was this translation helpful? Give feedback.
-
I am getting this error in Home Assistant. Any ideas? I can see everything else is working with the data showing in the logs from mqtt. Template variable error: 'value_json' is undefined when rendering '{{ value_json.Common_Name }}'` Erroneous JSON: {"Common_Name": "Carolina Wren", "Scientific_Name": "Thryothorus ludovicianus", "Confidence_Score": "0.89786017", "link": "http://birdnetpi.local/\?filename=Carolina_Wren-90-2024-03-06-birdnet-14:28:48.mp3", "Date": "2024-03-06", "Time": "14:28:48", "Week": "9", "Latitude": "39.8207", "Longitude": "-82.8191", "Minimum_Confidence": "0.7", "Sigmoid_Sensitivity": "1.25", "Overlap": "0", "Image": "https://live.staticflickr.com/7430/27545810581_8bfa8289a3_c.jpg"\} |
Beta Was this translation helpful? Give feedback.
-
Hello,
I managed to get birdnet-pi up and running and am now trying to figure out a way to trigger an action based on a bird species being detected. For example "When Species X is identified, flash bedroom lamp twice."
Ideally this would be done via Home Assistant but I'm not quite sure how to pull/store the information into Home Assistant. I setup Home Assistant messages using Apprise but it seems that it only sends the notification and I can't trigger an action off of that.
Has anyone be able to accomplish this? If so, whats your secret?
thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions