Comments (6)
Thanks for the information! I'll look into it and try to find a fix.
from ha-dyson.
I released version 0.9.1 that tries to fix this. Can you test that? Currently I don't have access to any Dyson device to test with.
from ha-dyson.
I'll give it a try, thanks!!
from ha-dyson.
Unfortunately the issue still persists. I'll try to debug it further.
from ha-dyson.
Just to add a bit more: calling disconnect
on the libdyson device object disconnects the MQTT client and stops the loop, but the MQTT client doesn't clean up its local sockets in that case. This only seems to happen on reconnect or when the paho.mqtt.client.Client object is destroyed or reinitialised (https://github.com/eclipse/paho.mqtt.python/blob/master/src/paho/mqtt/client.py#L660). So something is holding on to a reference to the client object (presumably via the libdyson device object) even when the connection fails.
I haven't had time to debug further, but ideally these objects would not be referenced after the failed connection attempt and get cleaned up. If that can't be fixed, the libdyson device disconnect function could drop its reference to the MQTT client object, or reinitialise it.
from ha-dyson.
It just occurred to me that there is likely a cyclic dependency between the MQTT client and the libdyson device, perhaps that is getting in the way of the __del__
function being called.
from ha-dyson.
Related Issues (20)
- Dyson Purifier Humidify Cool Formaldehyde (358K) not supported HOT 10
- Dyson Cloud never worked, using Dyson Local only now HOT 7
- Type 438K Fails to Connect HOT 3
- Stopped working? HOT 20
- Core 2022.2.0: Sensor has device class temperature, state class measurement and unit °C with non-numeric value: off
- Support Request - Add Device - Dyson HP07 Purifier Hot and Cool - Device Type 527k HOT 12
- No Formaldehyde Value HOT 2
- New device type Dyson purifier cool formaldehyde HOT 4
- New actively maintained integration! Collaborators welcome! Details inside. HOT 8
- Wifi-less "Dyson Pure Humidity+Cool" is not supported
- state class measurement and unit °C thus indicating it has a numeric value; however, it has the non-numeric value: off HOT 4
- Failed to find the device using discovery
- Not working on Home Assistant v2023.6 HOT 1
- ha-dyson failing with "cannot import name 'DysonPurifierHumidifyCoolFormaldehyde' from 'libdyson'" HOT 3
- Oscillation/angle setting
- Deactivate preset mode, or preset mode none
- Planned deprecation of direction, oscillate, preset_mode and set_speed HOT 1
- Local integration stopped working in HA 2024.1 HOT 4
- Depreciation warning in logs HOT 1
- ValueError: invalid literal for int() with base 10: 'off'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-dyson.