jhansche/ha-birdbuddy

Install via HACS?

Snille opened this issue · 8 comments

Hi! Just got my BirdBuddy today! :)
So, even before I have set it up, I look for a HA-Integration, thank you! :)
Will you be adding the integration to HACS in the near future?

Just got my BirdBuddy today!

Congrats, and welcome!

Will you be adding the integration to HACS in the near future?

It can be added manually to HACS, I just haven't updated the readme to show how. But it's just like other manual HACS repos: add this repo as a custom repo (check the beta checkbox for the latest prerelease versions), add the new repo to let it download, restart, then add the integration, where you'll input your BB email and password in the config flow (it doesn't support SSO).

I have not considered adding it to the official HACS repos, at least not yet. I have a lot more ideas to add before then. For now the most you can really get is battery states, and browsing the bird collections in the media browser (v0.0.4).

It will almost certainly never be available as a "camera" entity, because of how the BB works (that would drain the battery, requires the owner account, and would prevent taking postcards automatically, so really a no-go).

Adding as a manual repo is just required for getting it into HACS to track. From then on, any version updates will be picked up and installed automatically just like other HACS integrations.

I've updated the README to show how to add it to HACS as a custom repo: https://github.com/jhansche/ha-birdbuddy/blob/main/README.md#with-hacs

At least until the project matures a bit more or starts getting more usage, I don't plan to add it to the official HACS repo list at this time.

Great!! Thank you! I should have tested that of course. :) It's now installed. However, I know I've seen the "beta" tag somewhere on the integrations... But now I cant find it? Have I disabled something?

Anyway, what I really would want is a "sensor" that holds the latest picture (not interested in the camera livestream). I just want to "post" the latest visitor on my "MagicMirror" for the family to see. :)

Thank you for doing this! :)

I just noticed the "beta" checkbox is not available in the initial add-repo screen 🤷 But you can find it in the "Redownload" screen:

  • Go to HACS
  • Find "Bird Buddy" -> 3-dots overflow menu on the right side
  • "Redownload"
  • In this dialog, check "Show beta versions"

The current latest pre-release version is v0.0.4.

Latest picture is an awesome idea :) And once you get updated to v0.0.4, you can browse your current collections in the Media Browser. There's probably also a way to do this programmatically or with a template of some sort, but I don't know it myself off hand. Once you have the media id, it should be possible to show it in any picture entity card or similar (or even send it as a notification attachment for example).

Unfortunately we can only get media collections of postcards that have already been collected, which is done via the mobile app. I'm currently working on a way to automatically collect new postcards based on some criteria - especially if the bird is already recognized by BB's AI (which is not super great, but relatively decent).

Part of that work also includes adding an Event (birdbuddy_new_postcard_sighting), which will include the postcard feed id and the converted "Sighting" report, which includes media thumbnail URLs, and so forth. That event data can then be used to "collect" the photos from that sighting into your bird collection (but incidentally, it can also be used outside of the collection, in order to for example download that URL or set the URL to some other text sensor, or whatever). I believe the URLs are time-sensitive and will expire at some point, but I don't know how long they're good for. If you can get it from the Media collection, that would be best, because it would always get a valid image URL.

I could also consider having it always download the most recent sighting cover image to a single file path that is always accessible, and then you can have a single picture entity card like what you're suggesting, which will always show the last seen image.

Thank you again! :) I looks like I have the latest version now (got the media-gallery)... Still strange that I can´t get/see the "beta" toggle?...
Why

I do have the Media-Gallery option. No pictures yet (of course), I just installed my BirdBuddy and it's dark here. I hope I will see some birds tomorrow. :) I will see if there is a way to pickup the "last" entry from the Media.

I think the last option you describe is a great idea! You can also set it as the "entity"-Image. Then it's a very easy think to get it out (to what ever place you (I) want). :)

Hmm, yeah, I don't know why beta doesn't show up there 🤔 I see it, and obviously you see it for other repos. Possibly because all versions are currently marked as prerelease, so the only option is beta? At one time I had v0.0.1 marked as release, so that might explain how I was able to enable it at the time. Maybe once I promote another version as a full release, the beta checkbox will appear again.

I did notice that your BB repo info page is showing you have a commit hash as the installed version, which I believe means you chose the main branch to install. I just don't know how HACS will surface new versions to you in this state 🤔

If you're seeing the BB logo in your media browser, then you have the latest prerelease, I'm just not sure if you'll also get newer betas as well, as they happen. I do commit to the main branch before the library is available on pypi, so it's possible you might start getting updates that aren't usable. If that happens you might want to consider switching to a tagged release (v0.0.4) instead of the main branch.

#2 adds the new event and service, along with a sample automation yaml that can be used to auto-collect new postcards.

This will not be available in HACS yet until https://github.com/jhansche/pybirdbuddy is released with the updates, unless you know how to make a local install of a pypi library. I will try to do that later today or tomorrow.