Giter VIP home page Giter VIP logo

Comments (6)

shenxn avatar shenxn commented on July 19, 2024

Thanks for the information! I'll look into it and try to find a fix.

from ha-dyson.

shenxn avatar shenxn commented on July 19, 2024

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.

graham33 avatar graham33 commented on July 19, 2024

I'll give it a try, thanks!!

from ha-dyson.

graham33 avatar graham33 commented on July 19, 2024

Unfortunately the issue still persists. I'll try to debug it further.

from ha-dyson.

graham33 avatar graham33 commented on July 19, 2024

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.

graham33 avatar graham33 commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.