Even with a simple dashboard with a few tile cards to control lights… I am seeing absolutely terrible performance (click light on/off… light turns on/off but takes 5-60 seconds to update status in the UI and until it is toggleable again.) This happens on all of my Fire HD 8 and Fire HD 10 tablets, as well as a random (admittedly, crap) Chinese tablet. I don’t have problems on anyone’s laptops or phones.
This has been incredibly frustrating in trying to implement control tablets around the house. I see many other people have similar issues, with no solutions found. I don’t understand how it’s possible that a functional tablet that can browse all sorts of other web content struggle to update a few tiles on a lovelace dashboard. What is all that processing time being wasted doing? How do I profile this? It didn’t used to be this way… something degraded over time. I have tried wiping the tablets and factory resetting them, no dice.
I started looking at profiling on PC in Chrome to try to get some hints at what is going on and I might have a lead… I see hundreds of sensor updates in the web socket constantly flowing through every few seconds, even when browsed to a the dashboard with just a few light bulbs. My theory is that my setup with hundreds of sensors that are constantly updating (power monitors, mostly) overwhelm slower devices to a point of totally ruined responsiveness no matter how simple the dashboard. So… all updates for all entities are broadcast to all home assistant clients no matter what they are actually displaying? Yikes if true.
Yeah throw money and expensive hardware at the problem when the real issue is poor architecture of entity updates in HA. Cool story bro. My fire tablets all worked fine and were very responsive before my overall HA setup grew larger, but the dashboards haven’t changed. Not a problem of junk equipment.
There should be no valid reason to transmit thousands of updates of energy sensors for an entire home to a dashboard that aims to display and control a few light bulbs in the current room.
No matter how fast your hardware, it will not scale as the setup grows larger with that kind of architecture. HA definitely needs improvement there.
The only thing I can think of as an interim solution is to maybe figure out how to run a second HA instance that excludes all of the sensors and excludes everything that updates rapidly and only includes what I want to control in the dashboards. Or something like that, I dunno.
– and as a side note – I tried to run my simple dashboard on my iPad Pro. Ran great! … and consumed about 8 watts of power while doing almost absolutely nothing and drained battery very fast. Same with my laptops, CPU usage increases drastically just sitting on a dashboard with 1 tile that controls a single light bulb. Even if you have “non-junk equipment” that can “work just fine” you’re still burning tons of energy on unnecessary work due to poor architecture.
To be honest it was working fine on an old touchpad about six months ago. Then the “optimization” update happened and the tablet has been useless ever since.
It’s definitely a widespread issue, I find countless threads on various sites and forums all with this same problem and there is never a solution other than people shitposting “buy better hardware lol”
Not sure if it is the optimization update or not, did your setup increase in complexity since then? I have been adding more and more smart power strips and smart outlets, etc. and the tablets have been slowly degrading to being worse and worse to a point of compete un-usability now. I shut them all off for now.
For me, my theory is that the CPU on the tablet is max’ed out processing all the entity sensor updates. Everything is OK if the CPU can keep up with the realtime stream of updates but as soon as you cross the threshold of your CPU not being able to keep up you go from responsive to unresponsive in a snap since a backlog forms on the processing queue and it can never catch up. When I stand up my second home assistant instance and do my experiments I’ll post an update in here with my findings.
If you want to see what your flow of entity updates looks like, pull up the dashboard in Chrome or a Chrome-like on your PC, press F12, click on the Network tab, refresh the tab, find “websocket” on the list, then double click it. Mine has almost 100 updates per second at times at a rough glance. A ridiculous amount of data for a tiny little tablet to process.
Here is what my flow looks like. I just want a dashboard to control a light switch. All of this data getting flooded into the tablet is completely unnecessary.
This is the equivalent of all chats between all users of a chat platform being sent to everybody on the entire platform, and just filtering out the relevant messages to display on each client. It’s obvious that as you scale up to thousands, then millions of users and chats that this is not a good architecture.
The number of messages is n*m (n=sensors, m=clients) so it explodes exponentially as you increase sensors and clients.
This should work on some kind of sub-pub system or like MQTT topics to listen on, etc.
I mean, he’s not completely wrong though (agree that the messaging could use some work). What if we want to use a whole lot of low cost ESP based dashboard/control panels around the house. This would easily overwhelm them as well as put unnecessary stress on wifi equipment.
Each dashboard could have a dedicated websocket defined by the cards added.
That said, it’s probably only a big issue for those that have extensive power monitoring like @codicusmaximus looks to have. I only use an ESPHome converted emporia vue2 with some additional plug in devices, but I still see a pretty busy websocket. There’s definitely an opportunity here to optimize.
I don’t think ESP has enough memory or grunt for web page rendering or running JavaScript at all. There is a massive difference in compute (10x-100x) between ESP and even the lowest tier Android stuff. But our points conceptually stand. I recognize that the Fire HD isn’t a powerhouse but it’s very obvious that it should be able to display a simple dashboard to operate a few switches in a reasonably performant way.
Same situation here, lots of power and mmwave sensors. Websocket flooded with messages too. Terrible performance with an old Fire HD8. I “solved” it by launching another HA instance and using remote homeassistant from HACS to link the second HA instance to the main one, and sharing only the entites I want to display on the Fire HD8 to that second HA instance. It works but its not a solution for everyone, I have a couple NAS running so I can easily launch a second HA instance.
This is definitely something that needs to be optimized. We don’t need to buy new tablets just for this, we should be allowed to repurpose old hardware as dashboards. Isn’t sustainability one of the principals of the Home Assistant
This is surely a joke or a troll post. Not an option. They’re not even that fast I just have a lot of them. I don’t really have a mansion or a large home… it’s 1400sq ft. I do have a lot of smart home devices because I’m putting together a smart home… not a few smart bulbs in a bedroom or two. My use case isn’t even that heavy.
This reminds me of terrible performance of the history component a year or two back that thankfully got a MASSIVE performance rewrite that 10x’ed or 100x’ed the performance of that component. We need something like that but for the entity update web socket stuff. The solution is obvious – only subscribe to updates for entities used on the current dashboard page and not everything.
Back in the days before the history component rewrite i had to completely disable history tracking or reduce it to a few hours since it was killing performance of the entire HA installtion (and it made me have to migrate from a RasPi4B to a VM running on AMD Ryzen)
I just stumbled upon this idea myself as well and implemented this exact setup (it’s why I returned to this thread to post my findings but was surprised to find another person end up doing the same exact thing!). I finally have tablets working again, but very cut-down with just the bare minimums since I CBA to cherry pick the necessary sensors I want so I just kept switches, lights, and climate basically.
But as you said, running two home assistant instances and bridging them with remote-homeassistant HACS plugin is kind of a horrific mess and workaround to solve a problem with terrible optimization in HA itself. This needs a real solution and needs to be on some roadmap or at least a “to-do” item. I am not sure how to get this on the devs’ radars.
I will say remote-homeassistant itself is impressively slick and nice. Definitely a great tool in the toolbelt to have.