Anrijs / Aranet4-Python

Aranet4, Aranet2 and Aranet Radiation Python client
MIT License
219 stars 19 forks source link

The maximum number of active connections has been reached #38

Closed elcombato closed 7 months ago

elcombato commented 8 months ago

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 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:

Anrijs commented 7 months ago

I have now added disconnect on object deletion.

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.