-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation would benefit from example configurations #64
Comments
Lots of questions here, I'll try to address them all.
That's a good idea to document it, perhaps as a cookbook recipe or something. Likewise for using Downloader to save or archive the most recent media (or all media if you have a need for that). I had started to toy around with the idea of adding our own camera entity that just shows the last seen photo, or even last N photos as a slideshow, or the videoMedia from the most recent visit. But it feels like anything more than just the last photo is a lot of complexity for something that is really a matter of preference and choice, which causes complexity to increase dramatically. That leaves us with a few options for the implementation:
Due to all of these possibilities, and the fact that there are multiple ways it could be implemented depending on the user's preference, I've been hesitant to actually add official support for any of it, or as you're suggesting, even to add documentation advocating for one option over another. Even the (2) scenario doesn't really make sense for us to recreate the "slideshow" capability here, when there are already multiple implementations of this available in the community. Recreating it would just create Yet Another implementation that won't have all the support necessary to please everyone. The one scenario that could be most universally useful would be the (1) scenario of a single image file, because that's simple to implement and doesn't raise all the other questions and options; plus the "Recent Visitor" entity already gets us just about the whole way there. Which brings me to: we do already have the "Recent Visitor" entity, which adds the most recent media as its
and enable the "Limit refetch to URL change" setting. Then you can get a large version of the image appearing using the type: picture-entity
show_state: true
show_name: false
camera_view: auto
# The "Generic Camera" entity
camera_image: camera.bird_buddy_recent_visitor
# Your "Recent Visitor" Bird Buddy entity.
# This is used to show the bird species name at the bottom of the card.
entity: sensor.my_bird_buddy_recent_visitor
aspect_ratio: 5x6 The "Recent Visitor" entity has its own challenges, because the URL we get from the Bird Buddy API is an AWS link which has an expiring access token. Once the image is downloaded for that URL, the expiration doesn't affect it anymore because the image bytes will remain in memory in most cases - but there are scenarios where the URL expires and we don't have the image bytes in memory anymore, and in that case the image will fail to load.
The collect postcard service effectively removes (or replaces) the need to manually open the BB app and save the media for a new postcard. It is not very useful by itself, because you can't really call it with manual inputs, unless you rebuild the majority of the JSON payload that it needs in order to emulate the BB app in this process. It is really only usable in conjunction with the "new_postcard" event or device trigger. To remove that confusion, I recently added a Blueprint that combines that trigger with the service call, using the UI to configure the Blueprint. If all you want to do is automate the opening/saving of new postcards, this is probably the best way to do that, because it removes the need to manually configure the automation yaml, because you can use the Blueprint UI to configure it.
When you use this blueprint or combine the new_postcard trigger with the collect_postcard service, then you do not have to use or open the BB app at all. Based on how you configured the Blueprint or service inputs, it will behave as documented for the service, which means it will either accept the BB identification for the species if the BB AI is confident in its selection, accept the highest-confidence best guess identification for it, or fall back to mystery visitor. Be aware that if you select
If you do not configure an automation that combines the trigger and service call, or the Blueprint, then the effect is simply that the integration will not attempt to automatically process a new postcard. The postcard remains unopened in the BB app, and will not appear in the Media Browser in HA -- unless/until you manually open the postcard from the BB app.
You're right. There are 10 entities (per feeder) exposed by the integration. We document 6 of them. Of the remaining 4, 3 of them are disabled or hidden by default, because they are effectively "incubating", meaning either their function is unknown, or they do not function properly because Bird Buddy has not enabled those features yet. Those 3 disabled entities are Food Level (not functional on BB API yet), Temperature (not functional on BB API yet), and Frequency (functional as far as the API is concerned, but actual effect is dubious, or has no known effect). That leaves the "Recent VIsitor" entity that has not been documented. Thanks for pointing that out.
Sorry but I haven't actually seen a question in your description that points to something that is not working? As far as I can tell, your confusion is about documentation, or possibly not knowing what to expect from the integration? If you're actually having trouble getting the integration to work, then please reframe that specific question. It sounds like maybe you have it working, but don't know what to do with it next? And that's not really something I can answer for you - it has to be the other way around: determine what you want from the integration, and reframe your question to ask if that is possible or how to achieve it.
Again, getting mixed signals here. This implies that you do not have a working integration? If that's the case, I need more information. |
I'm sorry for the confusion. The biggest thing I was missing here was the camera. When adding the integration in the UI I was not allowed to put the template in and in de configuration I made some small (but alas important) mistakes in the beginning. When I got the camera working I could easily create a card. I did not have any visits yet since but I hope the downloading will also work and I'll be able to try using https://github.com/jodur/imagesdirectory-camera#camera-entity What I was actually missing was an example of the camera config (and I find a lot of places where such example would have helped me) Something like:
Another thing I noticed is that the |
Do you mind sharing what those small/important mistakes were? Maybe I can make changes to prevent those kinds of mistakes in the future.
Unfortunately HA is moving away from requiring (or even allowing) manual configuration.yaml entries for many integrations like this. Your example generic camera configuration might work for now, but it will likely generate a warning in HA logs, as things like that should be converted to being configured from the UI rather than from YAML. Your code block does make a good, easy to understand way of just copy/pasting a config; but I would rather not propose a configuration that is ultimately deprecated and may be removed in the future. The Generic Camera documentation (linked above) does not even list manual YAML configuration as an option. I agree that documenting the "Generic Camera + Recent Visitor + Picture Entity card" recipe would be useful. You should not have to sift through the entire HA community thread to find several examples of things that didn't work, and ultimately one hard-to-find example of something that did work. I updated the README to add some points of clarification, and to add the missing documentation for things like Recent Visitor. And I will work on surfacing those other common example ideas as cookbook recipe ideas - perhaps linking to the Github wiki. There were several examples in that thread of things that other community users accomplished, that could be useful to surface here.
I'm seeing this named correctly in my integration: my Feeder is named "Elm Bird Buddy", and my entities are named:
When viewing the Device Info page, it automatically drops the redundant device name from the entity name (so it appears there as "Battery", "Charging", etc). Depending on when you first installed the integration, you may very well have had an early version where that naming was not done following current best practices, so it might have been named differently at that time. That naming convention was updated to match best practices in And another possibility is you may have manually updated the name of the entity. If you open the entity, and then click the ⚙️ cog, do you see a value in the "Name" field? If so, that will override the name provided by the integration. Just remove the name override and it will go back to default HA behavior described above. |
I installed the integration last Saturday. And I did not change any of the names. At least not knowingly, and there is now override on the name. Regarding the camera. I could not add When I had that setting up a card was some work to get it as I wanted, but it was kinda straightforward from there. The only thing I can't seem to find is how to get the translated values of the state. They are visible in the details and the history. But I can't seem to get them on a card :) |
Also not sure why this would happen. Mine is named When creating the entity, we set
I ask because if you used an invitation code, there is a possible half-state where Bird Buddy tells us that we have access to a Feeder, but it is in a "pending approval" state, and we can't really access any of the data until the owner confirms the invitation. We should still have access to "FeederForMemberPending.name" though, even in this case, so it still should have created the entity with the correct name. |
I don't know why, but the Generic Camera config flow is specifically written this way. The "Limit refetch" checkbox is present only when you reconfigure after adding, but not present when adding it initially.
Yeah, that's what it sounds like, but I don't see how - since it's all written using coroutines, there really isn't a way for it to hit a race condition. The entities cannot be added until the authentication flow completes the initial refresh request, which will then include all the feeders on your account. Then the entities are added, all the same way, using the same list of feeders. I don't see any path where one entity would get no name but the rest do. Did you ever delete the integration and re-add it for any reason?
I haven't tried any custom cards for this, so it's possible that some cards might try to display the state values instead of the translated states. But I'm not sure how the frontend handles that. I would be surprised if the built-in lovelace cards can do it but something as popular as mushroom cards can't - that doesn't seem to make any sense. But if you're seeing that the built-in cards work correctly, but mushroom cards don't, then that sounds like there's a bug in mushroom. |
I did not change or delete the integration. 🤔 |
Do you have also issues with entity_picture ? The methods with sympke camera was working upmto recently but now not anymore and of a check the recent visitor entity there is no more the attribute entity_picture within |
False alarm ...was something transitiory, pictures are now back |
Hi,
I found the discussion in the HA community. Although it is a great resource it is also more of a log of things people tried instead a clear how-to.
Things that could for example be added:
Maybe even:
Furthermore, I think there are some entities missing from the documentation.
I'm currently struggling to get it working in my HA. If I have a working configuration I'm happy to help with a PR.
The text was updated successfully, but these errors were encountered: