GithubHelp home page GithubHelp logo

Comments (5)

pavoni avatar pavoni commented on September 22, 2024

I've steadily been adding to the list of exceptions that I catch and then try and restart the connection.

Afraid I'm tied up for the next couple of weeks - but if you want to try a fix take a look here and perhaps add the exception. https://github.com/pavoni/pyloopenergy/blob/master/pyloopenergy/loop_energy.py#L168

If it works please send a PR!

I'm running my setup on Python 3 - which perhaps behaves very slightly differently as I don't see this.

from pyloopenergy.

BenWoodford avatar BenWoodford commented on September 22, 2024

This appears to be 3.5/3.6 related, and handling that exception will just cause a loop.

I'm working on a fix and will PR shortly.

EDIT: Or not, tried using the socketIO-client-nexus without luck. Not sure how to resolve this now. That exception simply causes a loop though, so is not advisable.

from pyloopenergy.

pavoni avatar pavoni commented on September 22, 2024

Catching the exception and setting self.reconnect_needed = True should just close the socket and try to re-connect.

If you turn up the log level you should see some messages about trying to reconnect.

If it's looping it may be worth seeing if the connect is returning some sort of useful error.

from pyloopenergy.

BenWoodford avatar BenWoodford commented on September 22, 2024

Yeah, it just looped reconnecting when I tried it.

If you’d like a replicated environment, I’m doing this within the latest dev tag of the Home Assistant docker container, and running the code found here: home-assistant/core#8137 (comment)

from pyloopenergy.

pavoni avatar pavoni commented on September 22, 2024

Should be fixed by #28

from pyloopenergy.

Related Issues (19)

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.