Coder Social home page Coder Social logo

Comments (4)

arendruni avatar arendruni commented on August 11, 2024

Hi @snetwork-dev,
I understand the problem you're having, but by looking at the issue you referenced I don't think it's a good thing invoking the callback before the request has a received a response.

If you want to try and integrate this change you can open a PR and I will review it, so for now I'm leaving this issue open to see if other users have the same issue.

from homebridge-pihole.

arendruni avatar arendruni commented on August 11, 2024

Hey @snetwork-dev
I just released a new beta version of the plugin that should fix this issue (from #29), I skipped passing the value received from the http response to the Homebridge callback which does no longer need to wait for a value and shouldn’t block the entire Homebridge.
To test it you just need to add beta tag to the package name: npm install homebridge-pihole@beta. Please let me now if this does fix this "bug".

from homebridge-pihole.

snetwork-dev avatar snetwork-dev commented on August 11, 2024

I just released a new beta version of the plugin that should fix this issue (from #29), I skipped passing the value received from the http response to the Homebridge callback which does no longer need to wait for a value and shouldn’t block the entire Homebridge.

I installed the beta version. Unfortunately, when the iOS / macOS home app is restarted, all devices are still displayed with "no answer" if the PiHole server cannot be reached.
As soon as you click on an individual device, however, it updates its status and can also be switched. Unfortunately this is not the right solution yet ...

from homebridge-pihole.

arendruni avatar arendruni commented on August 11, 2024

I tested the plugin with a slowed down mock server and I could reproduce the same scenario: Homebridge will hang till the plugin has received a status and all devices are displayed with "no answer". So, the main pain in this case is the callback on the GET status, which in this case must wait for a value, this is a protocol limitation of HAP, which only allows one concurrent request per connection and the request is blocking.

from homebridge-pihole.

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.