my Python script is reading records (using client.get_all_records()) every few minutes/hours from the device and after some time the connection fails and the system log says
dbus-daemon[244]: [system] The maximum number of active connections for UID 1000 has been reached (max_connections_per_user=256)
Looking into the code I noticed, that the connection established with Aranet4.connect() is never closed, therefore I assume that after the above mentioned 256 connections the script fails.
Therefore my questions:
why does the client.get_all_records() does not use BleakClient.disconnect()? Or do I miss something?
is there another way to repeatedly read records without establishing a new connection every time?
You can't read history without connecting, but you can , but you can read current values using advertisement scanner, if smart home integrations are enabled.
Hi,
my Python script is reading records (using
client.get_all_records()
) every few minutes/hours from the device and after some time the connection fails and the system log saysLooking into the code I noticed, that the connection established with
Aranet4.connect()
is never closed, therefore I assume that after the above mentioned 256 connections the script fails.Therefore my questions:
client.get_all_records()
does not useBleakClient.disconnect()
? Or do I miss something?