thomasloven / hass-plejd

🔹 Plejd BLE integration for Home Assistant
81 stars 10 forks source link

Spamming of log #10

Closed astrandb closed 1 year ago

astrandb commented 1 year ago

During this morning I got this sequence repeated almost 28000 times in home-assistant.log. The problem disappeared after restart of HA. I shall see if I can understand what happened, but anyway it is not very productive to have this intensive spamming of the log.

2022-10-30 11:59:48.186 DEBUG (MainThread) [custom_components.plejd.pyplejd.mesh] Trying to connect to mesh
2022-10-30 11:59:48.186 DEBUG (MainThread) [custom_components.plejd.pyplejd.mesh] Connecting to DA:1B:E8:5A:3A:05: P mesh
2022-10-30 11:59:48.187 WARNING (MainThread) [custom_components.plejd.pyplejd.mesh] Error connecting to Plejd device: plejd - DA:1B:E8:5A:3A:05: Failed to connect: No device found for address DA:1B:E8:5A:3A:05
2022-10-30 11:59:48.189 DEBUG (MainThread) [custom_components.plejd.pyplejd.mesh] Connecting to FE:FE:3D:C2:EC:E6: P mesh
2022-10-30 11:59:48.191 WARNING (MainThread) [custom_components.plejd.pyplejd.mesh] Error connecting to Plejd device: plejd - FE:FE:3D:C2:EC:E6: Failed to connect: No backend with an available connection slot that can reach address FE:FE:3D:C2:EC:E6 was found
2022-10-30 11:59:48.193 DEBUG (MainThread) [custom_components.plejd.pyplejd.mesh] Connecting to DA:1B:E8:5A:3A:05: P mesh
2022-10-30 11:59:48.196 WARNING (MainThread) [custom_components.plejd.pyplejd.mesh] Error connecting to Plejd device: plejd - DA:1B:E8:5A:3A:05: Failed to connect: No device found for address DA:1B:E8:5A:3A:05
2022-10-30 11:59:48.197 DEBUG (MainThread) [custom_components.plejd.pyplejd.mesh] Connecting to FD:66:51:6E:7D:AC: P mesh
2022-10-30 11:59:48.199 WARNING (MainThread) [custom_components.plejd.pyplejd.mesh] Error connecting to Plejd device: plejd - FD:66:51:6E:7D:AC: Failed to connect: No device found for address FD:66:51:6E:7D:AC
2022-10-30 11:59:48.201 WARNING (MainThread) [custom_components.plejd.pyplejd.mesh] Failed to connect to plejd mesh - [DA:1B:E8:5A:3A:05: P mesh, FE:FE:3D:C2:EC:E6: P mesh, DA:1B:E8:5A:3A:05: P mesh, FD:66:51:6E:7D:AC: P mesh]
2022-10-30 11:59:48.202 DEBUG (MainThread) [custom_components.plejd] Ping failed
thomasloven commented 1 year ago

The debug logs are meant for development and debugging. You shouldn't use that for daily driving.

astrandb commented 1 year ago

I am well aware that I can raise the threshold for logging. My point is that there seems to be an agressive retry scheme that generates 300 000 lines in the log in a couple of hours (if in debug mode). I dont know if the root cause is in this integration, in ESPHome or in an external lib but I will keep my eyes open if it happens again.

thomasloven commented 1 year ago

Hm... you're definitely right it's a bit too agressive. I'll see what I can do about that.