andersevenrud / ha-nexa-bridge-x

Home Assistant - Nexa Bridge X Integration
Other
9 stars 3 forks source link

Hidden devices #41

Closed sonite closed 7 months ago

sonite commented 7 months ago

The underlying reason for the timeout problems in the HAC Nexa integration could stem from hidden devices within the Nexa bridge. Whether this is a longstanding issue or impacts all bridges remains uncertain. To test this, if your integration is functional, generate a virtual device and hide it. Then, reload the integration after a few minutes to observe if it encounters any failures. I did this last night and it failed, but I have an older device and will try some other scenarios.

andersevenrud commented 7 months ago

could stem from hidden devices within the Nexa bridge

I kinda doubt this.

As mentioned earlier, the timeouts are more likely to be because of the amount of nodes and that the integration polls these simultaneously.

I highly suspect that this somehow drains resources or causes some kind of stalling og HTTP requests. Especially because when looking at logs the responses are fairly random if they succeed or not. You can see this in the logs you provided... some say 200 (OK) others null:

2024-03-30 00:09:45.529 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] GET http://192.168.1.2/v1/nodes/1011: null

[...]

2024-03-30 00:09:46.357 DEBUG (MainThread) [custom_components.nexa_bridge_x.nexa] GET http://192.168.1.2/v1/nodes/1011: 200

If this was a node specific issue then it would be consistent.

andersevenrud commented 7 months ago

the timeouts are more likely to be because of the amount of nodes and that the integration polls these simultaneously.

Speaking of, I have a possible solution of this summarised in the other issue you opened:

https://github.com/andersevenrud/ha-nexa-bridge-x/issues/34#issuecomment-2033106872

I'm closing this since I'm fairly confident about the underlying cause of this issue. Might just have jinxed myself here 😂

... if my PR does not take care of the symptoms then this should be re-opened.