-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
No entities displayed in /config/entities, and severe lag #21001
Comments
ok so current.ly running HA 2024.6.3, and I did discover something I hadn't tested before: I can see all of my entities in the iOS companion app. But, ONLY there. Any browser on the Desktop remains empty. Including the Mac Desktop app. |
Hi I'm having exactly the same issues. Only seems to be with 1 out of the 2 installations I have. Has this been sorted yet? It's quite frustrating. |
can you check which integrations/custom cards etc differ between the 2 installs? and what size installs (number of entities) are you talking about? |
The two setups are really different the one that is working running the latest version 2024.6.3 has 592 entities and 15 integrations. The broken setup was working on version 2024.5.5 entities 2637 integrations 34. I'm just going through some more backups to see when the issue first occurred. I assume you still have this same problem, looking on the web not many of us have this issue. |
yep, currently investigating..... They did change something in the new filter engines of the entities dashboard, the data tables, which was widely announced, and to me, that is the only possible reason that stands out. I havent changed anything in my custom cards during that period. I could roll back to 2024.5 but fear the issues the setup (production) would suffer .... |
I can confirm all was well with; Core With this restored from backup file I see no issue with config/entities I ugraded to ; Core The non display of config/entities returns. Sometimes the page does populate (Very rarely) also sometimes the page seems to lock up stopping me from navigating away to another page (Quite Often). Is there anything you would like me to try before I install my latest backup so I can get back to a functioning system without "config/entities" |
glad I am not alone, that's all I can say... It would be useful if you could state wether or not you added custom cards/integrations between 2024.5 and 2024.6, to rule out any custom problem. I believe to have proven with the Safe mode restart above that cant be the source of the issue at hand, but always better to positively identify.
100% my experience. Hope this will get some attention of the core Frontend devs soon. |
OK I tried running in safemode really no joy on my PC ....... however when running in safe mode if I use my S21 (Android) + Home Assistant App the config/entities seems to perform ok much more reliable on the PC very little delay less than 2 seconds |
Screen_Recording_20240617_105833_Edge.mp4Hope this is it |
just downgraded to 2024.5.5 and see all entities like before... so definitely a HA 2024.6 thing i had to update to 2024.6 though, because of the File integration migration....
yes, as reported in the OP, my iOS companion app is showing the entities correctly. Only device though.. back on 2024.6 entities are gone again |
Sorry to eger and missed that bit. |
some new discovery: with the Inspector local storage tab open, I noticed the earlier reported ha-filter-floor-areas being empty, and that made me think if it simply didnt cause a Non selection of all entities..... so I tried to + a few areas, floor areas to be precise, and they were ticked and immediately un-ticked. I did notice the line in the right panel being edited with some of the entities belonging to the areas I selected. what's more, I noticed entities being listed in the entities list! Finally! Apparently we need to select floor areas for any entity to be listed. This can not be can it? I have a lot of areas in the house, which are grouped in floors (several floors per actual physical floor). Wouldnt it be 'normal behavior' if one does not select a floor, that all floors are selected and the entities of those floors would be listed? ofc it would, just like in the Status filter. Select nothing, show all. The Helpers view does work like that, why the different behavior? another anomaly here is, that when adding a top level floor, none of the areas are auto ticked: which makes it even more difficult to understand what is selected and what not. besides that, the lag is now very visible, and understandable, if it actually adds all of these entities to the list in the local storage, and does so each and every time it changes. causing this: and making that non-manipulable. need to reload there to be able to get to the tick boxes again. the fact this is a per browser setting, meaning if I have different panes open on the same machine (1 for editing, 1 for browsing, 1 for finding entities) and accidentally navigate in the wrong pane, I am in trouble all over.... @RMMTSLLP please check if you can confirm this? |
OK I've done some more testing and I think I can confirm what you are saying is correct. However I have to be in "safe mode to really make sense. I agree in config/helpers it defaults to display ALL helpers. You can then go on to search as required. In config/entities it defaults to show NO entity data. If you select an area (the tickbox briefly shows and dissappears) after a period entities for that area are displayed. When HA is NOT in "safe mode" I get no sense whatsoever. The screen freezes sometimes on a refresh it displays entity data, more often not. It certainly is not usable unlike config/helpers. |
I can make a guess of what is happening here, my guess is that your system may be just overloading the data table. In frontend most components are updated every time the With the entities data table, it seems that anytime that happens (any state changed), we attempt to re-sort and re-filter all the entities in the table. As the amount of entities in the system grows, the sorting time takes longer and longer. As the frequency of updates increases, the rate at which we are asked to sort and re-sort grows more and more frequent. I suspect eventually this will hit some critical threshold where we are repeatedly asked to reupdate the sort order before we're able to finish sorting. I don't know what happens exactly in this case, but it seems like when this happen the system breaks down and it just appears to hang and become completely unresponsive. That may be why it seems to behave erratically, sometimes appearing to work for only a moment, and when it does work it is exhibiting very slow performance. I can observe such by just creating an automation that toggles a boolean every 5ms. Anytime this automation is enabled, I cannot get my entities table to do anything, it just says "no data" until I disable the automation. Maybe you can try running the performance profiler in your browser devtools, and see if its spending 100% time in the render/update process. |
Thanks for chiming in! we're desperate... ;-)
could this be happening in 2024.6, and Not in 2024.5? Because thats when this started happening, 100% reproducible.
dont think there is such a heavy updating going on in my system, but I do have a few that are quite active... most of those are related to the power metering of the smart meter, and some templates based off of those. that however has never bitten the Frontend in the least. which makes me suggest this change to the data_tables is simply not up to par with modern requirements. and should be reverted really. I mean, the fact that 2 posters here are suffering this, does not mean nobody else is. Seems highly unlikely given the exact same experience we notice. Most users will probably never go to that view, so might never notice.
I'll do anything you want me to, but please be clear what exactly you need me to do. I can run profiler without issue, it's my main correspondence with BDraco ;-) or are you looking for some other tab in Inspector? btw, the fact this does Not happen on iOS companion app would seem to indicate this is not a system backend issue, but a Desktop Frontend issue? How else can my mobile phone show the entities without a sigh |
As far as I know what I'm describing is not a recent change, it's always been that way. If something changed in 2024.6 I have no idea what that could be. Maybe something subtle changed that just pushed it over the edge. |
It was the announced change to the data tables probably https://www.home-assistant.io/blog/2024/06/05/release-20246/#data-tables-improvements without those, in 2024.5 all was super smooth unless ofc there would have been other backend changes that could cause heavy lifting. |
let me just keep this alive in 2024.7.1, still not getting a solid response on the entities pages |
I can confirm the issue still remains the same in 2024.7.1 is there anything we can do to bring this higher up the priority list? |
Could this be related? I can't recall seeing this before but the message seems related ?
then again, maybe not, this is 'exposed' to the Assistant.. |
where I said this in the Opening post:
this is now no longer the case, and mobile stopped being reliably responsive on entities view also in beta 2024.8.0. Here too now do I have to re-navigate to the dashboard a few times to get the list populated. Not yet as bad as on desktop, but starting to worsen for sure it seems clear that the new options in the search filters keep making these pages heavier for the more fleshed out instances. As mentioned in the issue now also for helpers #21530 |
separate post here too: see #21530 (comment) main difference in the Helpers page in 2024.8 is the addition of the Yaml entities. In my case, only template entities (and 1 group...) Given the fact these templates are constantly being evaluated, as that is what templates do, maybe there is something written in local cache/storage all the time, and blowing up because of that?? could it be this after all then #21001 (comment) |
I think at one point you were going to try disabling some of your most noisy entities, to see if that helps? Did anything ever come of that? If you want help profiling which entities are updating most heavily, I can try give you a javascript to count updates. I'll mention that I setup an instance with 15,000 random sensors (roughly the max expected entities), and an automation that toggles once a second, and while sluggish a bit I didn't have any problem getting the table to functionally display. So I still feel like maybe you've got just too many entities doing too many updates for the table to keep up, or some kind of bad infinite circular loop in templating or something, causing a very high rate of entity update. |
Hi Guys, just to confirm that I still have the original issue which was introduced by HA 2024.6 and is still present in 2024.7.4 from what I see and do not understand if we had systems with high device and entity count why was this not taken into account with subsequent updates. The system was capable of displaying the high number of entities then alas not now . This seems to be a breaking change and should be given some importance. It seems we/you are chasing a symptom and not the cause. If the system cannot handle high entity/device counts surely this should be restricted/flagged when devices are added or when upgrades are implemented or fixed so the system behaves as per before 2024.6 . But more importantly the changes made at HA 2024.6 should be sorted. To my mind trying to reduce devices/entities and their subsequent reporting is totally the wrong approach. If there is any testing you require I am happy to help I must add my in depth knowledge of HA is limited. This is in no way intending to upset anyone and the work you are doing I just think maybe we're missing the point here. Regards, Roger Morris |
No nothing. Ive done it all: test in safe mode, factually disabling all of the custom integrations entities, and frontend stuff. No change. I dont see any abnormal percentages in any of the sensors that indicate either the backend or the frontend is doing overtime. So, I fear there is just nothing to be done on my part in the config. I did try to disable the template entities in the Helper dashboard, and not select the integration in Entities, but that is practically impossible given the tools we have.
I would appreciate anything that could help me solve the Home Assistant issue is creating here, please yes.
As said, I stooped believing it has anything to do with the number of entities. Why else would 2024.5 have had no issue at all, at either of these pages.
I could still be the way the frontend is now programmed indeed, Its the only thing at this time I can figure it to be. It was not until 2024.6 introduced the new filter options, and, maybe even more importantly, started writing the preferences and the states to the cache, that these troubles started. And again, after new features were introduced in 2024.8 beta right now, the Helpers page becoming completely unreliable. seems a 1-1 relationship, and anything I can doing to reduce the number or the frequency has not helped. |
In my case, I have over 1000 entities. Of these, about 50 update every second, with then a number of template sensors and automations triggering off that. I can definitely see this being a possible cause for the issues.
Could you up the frequency for 50-100 of those to once per second? |
Hi Guys, Correct me if I'm wrong does not "/developer-tools/state" display the same table as "/config/entities" if it is why does developer-tools display correctly and not config? Also why was it working before 2024.6 and not after, my entity count has changed much, I bet if I downgraded to 2024.5.5 all would be well again. Looking to upgrade to 2024.8.0 ..........maybe :-) |
I have a rather small setup with ~3000 entities. It was speculated earlier that may be recently added "modified_at" property may affect some lags. |
Ok @Mariusthvdb lets try a little experiment (or anyone else who's having same issue who wants to participate) Open your entities page in Chrome browser, and open the web developer tools ( In the developer tools console, paste the following:
After you paste that (and hit enter), then type: You should start to see a flood of console logs of data table being updated. I put a timestamp counter in there to track how fast it is updating. On my table it's fairly sleepy, often going 5-10 seconds between updates. I'm guessing that you're going to get a firehose of events every few milliseconds, maybe even so much it can't keep up rendering them. But would be interesting to see what happens. Should look something like this: Let me know what you see as the output (screenshots good) |
Hi. Thanks for this. My results below. Seeing updates every 100ms to 200ms on average. No entities display (as per this issue). My setup: HA 2024.7.4, with 4.7K entities. I have a power monitor that updates every 3 to 5 seconds, but its been doing that for over two years. No other integrations or templates that I am aware of that update super-fast (although it seems there must be something?). |
Updated patch function for debugging that will print the entities that changed on each hass update:
|
btw, as were now also seeing the degradation on the helpers page, I edited it to run in helper:
but apparently not good..... getting a type error on the path.. Could you please check that ? |
Thanks for the captures.
I don't think anything is going to be reverted, (I wouldn't even know what to revert if I wanted to), but I'm somewhat confident this is just a small bug that maybe needs a slight change in how the asynchronous sort worker interacts with the data changes. But for now this is still in a data gathering stage to really understand the problem. I have suspicions, but I can't say I understand it 100% yet. |
Ofc I didnt mean the new functionality! I like the way that is going. I meant the troubles were seeing ;-) Please have look at the script for Helpers too? |
Helpers is mainly the same deal but the context path is just different. You can replace with this line if you want:
|
Most calls to websocket are throttled or debounced, seems like the states aren't making it render pages multiple times per second. I think a throttled needs to be added. |
This definitely needs to be throttled. The increase in traffic has hung several of my pages and views in home assistant. The increase in data transfer between home assistant and my phone has actually been so huge that my very small 1 gig of monthly transfer has now been consumed on the 8th of the month. |
I don't believe the throttling proposed here has anything to do with actual data transfer between client and server, but just the redraw rate of the lit components. If you want to discuss client data usage that's probably something for different thread. There is no known "increase in traffic" as far as I'm aware. The server has always sent a firehose of all state updates to any active clients. |
@teskanoo would you open that separate Issue/discussion please, as you brought it up here? |
If it doesn't increase or slightly increase anymore since 2024.8.0 it should be fixed. During beta, the service worker was malfunctioning which may resulted in higher downloads during that period. Also, please remain on topic in this thread. |
now that I think of it, Ive noticed the same regression in performance using Aware this is custom, but, could this now identified issue also have affected auto-entities, and, more importantly, could the throttler PR also fix it there? Or, should we point Thomas Loven to that PR, to maybe include that into his custom card? |
I've locked this conversation since you keep going off-topic and pulling things in here that don't belong to it. |
Checklist
Describe the issue you are experiencing
no entities are displayed, and the filter box really lags, in any Desktop browser, iOS app shows fine.
navigating away after trying to load the entities is also suffering the lag, and I need to reload the browser view, to be able to browse the instance again on other views
Describe the behavior you expected
show all entities when nothing is filtered, and show filtered entities when a filter is actually entered
Steps to reproduce the issue
...
What version of Home Assistant Core has the issue?
2024.6.0b8
What was the last working version of Home Assistant Core?
2024.5
went super fast and smooth
could it be https://www.home-assistant.io/blog/2024/06/05/release-20246/#data-tables-improvements is acting up?
In which browser are you experiencing the issue with?
Any: Safari, Edge, Chrome, Firefox dont show
iOS companion app shows fine (which also suggests this is not about the number of entities?)
Which operating system are you using to run this browser?
Sonoma 14.5
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
Seems to be mainly an issue on entities, not on devices or helpers. Although on those 2, the lag is also very noticeable compared to 2024.5
Inspector on local storage shows:
The text was updated successfully, but these errors were encountered: