Giter VIP home page Giter VIP logo

Comments (9)

oribafi avatar oribafi commented on July 1, 2024 1

Thanks for giving it another try!

I just made a fix for this unavailable behavior and the upstream maintainer was so kind to develop an improvement for exception handling for disconnected devices in mmarquezs/My.Jdownloader-API-Python-Library#42 which I am already using in my dev environment.

I'll let you know once it's released and update the package version in the manifest.json.

from homeassistant-myjdownloader.

doudz avatar doudz commented on July 1, 2024 1

Works good for me , you did a good work ! 👏

from homeassistant-myjdownloader.

doudz avatar doudz commented on July 1, 2024

I gave a try and :

  • config flow works good !
  • maybe my fault but when I added the integration my jdownloader was down, and when I start it I was expected sensor creation, etc, but nothing happens
    I can't call service myjdwonloader.run_update_check or myjdwonloader.restart_and_update since no device is available (because of previous reason)

Restarting HA fix entities creation but in my case, my jdownloader is only when I need it so it could be a problem

But you did a very good work ! 👏

from homeassistant-myjdownloader.

doudz avatar doudz commented on July 1, 2024

Same problem when I shut down my jdownloader, every sensors become unavailable (which is good) but if I start JDownloader again, components are still unavailable
image

from homeassistant-myjdownloader.

oribafi avatar oribafi commented on July 1, 2024

Great thanks for testing and good catch! We probably need to regularly update the list of available devices and dynamically create the corresponding devices. The former is straightforward, but for the latter, I need to search for examples where integrations do that.

When you shutdown and startup your JDownloader again, is there anything in the log, which mentions for example, that updates for this device are not possible anymore? Maybe HA stops us from updating our entities if we throw exceptions (due to missing device) too often?

from homeassistant-myjdownloader.

oribafi avatar oribafi commented on July 1, 2024

I just pushed a new version which enables the integration to reconnect to temporarily offline devices as long as they have been online during the last HA restart.

I still have to figure out, how to create new entities after setup of the integration or HA restarts.

from homeassistant-myjdownloader.

oribafi avatar oribafi commented on July 1, 2024

@doudz I just pushed a new version which is able to add JDownloader devices as soon as they become online.

from homeassistant-myjdownloader.

doudz avatar doudz commented on July 1, 2024

Looks very good !
Maybe you could make it "unavailable" when JDownloader goes down again ?
image

Good work !
If you're ok make a PR and I publish it !

from homeassistant-myjdownloader.

oribafi avatar oribafi commented on July 1, 2024

myjdapi 1.1.0 just got released and I updated the branch. Could you test it once again?

If this works well for you, I'll draft the pr.

from homeassistant-myjdownloader.

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.