Closed Mariusthvdb closed 1 year ago
What hardware are you running on, and what version of AD? (not the add-on version). If you are running on 4.2.1, that hasn't changed in a year so I don't see how this can be an AppDaemon issue - at a minimum it is a change in behavior in HASS that is causing AD issues. I am not up to date with the new API - what is it doing? Is it a breaking change?
Also, there is still support for ARM, we didn't change that, we were just unable to create the Docker Hub multi arch build with ARM images. Manual builds continue to work fine,
I'm not aware of any changes in 4.2.2 that would affect this area either, so I'll upgrade HASS when the new version comes out and see what happens.
Also, I just checked with @frenck and the add-on is built with a custom docker images so is not in any way affected by the removal of ARM support from the docker hub images.
yeah, I was surprised as well, but have not deeper knowledge than what I passed along above.
my hardware is a MIniPC and has been for 2 years now. so no changes there. the AD version I wouldn't know how to tell, all I can say is I am using HA OS 2023.3.0b and indeed the community add-on (by Frenck)
https://github.com/hassio-addons/addon-appdaemon/blob/main/appdaemon/requirements.txt states 4.2.1 as you already suspected
For listening to entity updates, use subscribe_entities
instead of listening to all events. It's highly compressed and only sends deltas. Listening to all events is way too much data, as each state changed event includes fully both old + new state.
Thanks for the heads up Paulus, I'll look into this. I'm not convinced that this is a general problem for AD users as nothing significant seems to have changed in either HASS or AD, but it would make a very nice optimization, albeit its a huge change to the way AD works.
The relevant change in 2023.3.x beta is that we now report the name of the client and some more details about the client. Previously we received quite a few of these reports but it was non obvious about the source which lead to the improved logging.
Ok well after a quick look at the API I don’t think I have what I need to make the proposed change yet - AD makes available all HASS events and that is important for a lot of applications. I understand the potential in optimizing the state changes as I am sure they are by far the largest piece, and I can write code to subscribe to specific entities that users are listening to no problem, but I would need a way to also sub to all events that aren’t state changes - I don’t see an easy way to do that although I could be wrong, I’m not aware of a definitive list of events, and there doesn’t seem to be a filtering option that would allow this although I’ll keep digging. I might need to get some changes into HASS to support this which is a job in itself. Happy to be proved wrong on this piece as I like the idea of the changes - would appreciate a second opinion after my hasty reading of the WS commands module in the hass code.
The current frontend design uses subscribe_entities and than subscribes to a list of specific events. If you need everything that's always going to be a bit slow.
There are two wins that may help quite a bit in that case:
Longer term I think we would have to add a way to subscribe to all events except state changes if there is no way around needing all events.
We currently effectively only have an include filter but not an exclude filter option afaict
Great information thanks - I’ll put some thought into maybe requiring the user to list the events they care about - they should know. And I’ll look into those other suggestions too. I don’t see this as a huge problem or I would have heard about it from other users but the WS API has evolved significantly since I wrote AD and I should make changes to benefit - I’m actually still using REST calls which are no longer shown in the docs so I assume they have been deprecated- for that reason alone I should probably rewrite the AD code that integrates with HASS.
That would be desirable, but now I think about it, it shouldn’t be too much of a stretch to require my users to list the events they need. I’ll think about it some more but that will be my working assumption, since most users won’t need anything but state changes. I’ll ask around and see what the users think.
And as a further thought, I could have AD automate the process, so it would be pretty seamless in fact. If they care about an event and listen for it, AD will subscribe to it in hass automatically.
@Mariusthvdb How big is your system in terms of numbers of devices/sensors etc.? I am adding some perf measurements into AD so we can get a better idea of what is going on, and my system has a fair number of sensors, but is peaking at less than 10K/s as a 10 second average. Most of the time it is at zero. I'm still interested in building a more efficient plugin for HASS, but I don't see this as a huge pending problem for the average user, and I am curious what setup you have that is overrunning AD, or if perhaps the latest version has some different characteristics. When I release the next version can you have a look at the admin screen plugin section to let me know what kind of numbers you are seeing? It's available now in the dev build if you are able to use that, if not we can wait until the next version is released.
just t give you an idea (couldn't get it all in 1 screenshot):
and HA keeps creating new entities from attributes ;-) without kidding, it has been quite large since I started out with AD some years ago, and havent touched those apps really. They are really tiny btw, and only take care of some basic logging on binary motion sensors. So their own workload couldn't be it.....
I'll try and have a go add that add-on, but not sure I ever did that for add-ons, run a non release version.
OK, I will relate a small version in the next few days to test our new CI pipeline, so you will get it then anyway.
This issue is stale because it has been open for 45 days with no activity. Remove stale label or comment or this will be closed in 15 days.
Please feel free re-open this issue if you have new information available
as of Home Assistant 2023.3.0b we are seeing this in the add-on logs:
and, new to this version, we can see it registering to all services in HA:
consider the above to be a small snippet.
Ive reported this in the beta channel on Discord, and Paulus replies
Ive linked to your community post https://community.home-assistant.io/t/announcement-appdaemon-4-2-3/541010 and get notified that if Appdeamon
so, in a bit if a catch22 now...
please have a look, and let me know what to do.