Filter Websocket Subscriptions (NSPanel Requirement)

I’ve got a 10 or so NSPanel Pros working pretty successfully, they have a separate dashboard setup which is pretty minimalist, however the performance can be sluggish and sometimes they don’t receive updates or even icons.

I tracked this down to loads of errors in the logs like 'Client unable to keep up with pending messages. Stayed over 1024 for 10 seconds. The system’s load is too high or an integration is misbehaving; ’

This is caused by all state updates being sent to all clients, the vast majority of which the NSPanels don’t need.

Is there anyway I can in someway restrict the states/events that go to a given client/user/dashboard.

I’ve dealt with the problem temporarily by reducing the update rate of some particularly noisy integrations, however this isn’t a long term solution.

Actually the same is true of just the standard app — the server sends ALL entity updates, regardless of whether the entities in question are visible in the dashboard. This wreaks havoc on mobile devices’ battery. Lovelace ought to set a serverside filter that’s appropriate for what is being displayed.

Just the follow up on this, for anyone else with the same problem, I found a work around/solution.

I installed a second instance of HA, with Remote HomeAssistant ([Remote HomeAssistant]) installed.

I then configured that to replicate the entities I needed for my NSPanels, effectively creating a lightweight proxy of my main HA.

The results are light and day, now my NSPanels are super responsive, no lag.

However, ideally the underlying problem of all state changes going to all clients probably needs resolving.

2 Likes

I’m right there with you and discovered this via another thread. My biggest driver of the sluggishness was a BLE scanner pumping out a few messages a second constantly. MQTT does this, I’m unsure why HA was architected this way.

How do I see these messages in real time? Assume I am on a browser with web dev console open.

Same here, collecting some values from my victron system via MQTT like Grid Voltage - and this runs on a frequency of 100ms. Adds a lot stress to WiFi connected systems that should for example show live video as well. Would be great if only these devices get updates that they should show at the end of the day - and not everything.

1 Like

I’d be content with HA Lovelace requesting data update subscription only for entitis currently shown in the active dashboard. Thist let me collect data arbitrarily often while saving bandwidth and battery on my phone.