Code Monkey home page Code Monkey logo

Comments (5)

metbosch avatar metbosch commented on September 17, 2024 1

Hi,
Some time ago I had the same need, so I developed two simplified versions using this repo as a base.
You can find them searching for homebridge-http-temperature and homebridge-http-humidity.
The readme of each repo needs to be updated, but You can find an example of how to configure the accessory in the sample-config.json files.

from homebridge-http-temperature-humidity.

matej-cupka avatar matej-cupka commented on September 17, 2024

Hi,
Thanks, just what I needed.

from homebridge-http-temperature-humidity.

matej-cupka avatar matej-cupka commented on September 17, 2024

I got this error when I tried to use your plugin after installing

/usr/local/lib/node_modules/homebridge/lib/api.js:60
      throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
      ^

Error: The requested accessory 'HttpTemperatureSensor' was not registered by any plugin.
    at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:60:13)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:233:42)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:72:38)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)

My accessory in config.json looks like this:

{
    "accessory":        "HttpTemperatureSensor",
    "name":             "Outside Temperature Sensor",
    "url":              "http://127.0.0.1/temperature.php?id=2",
    "http_method":      "GET"
}

from homebridge-http-temperature-humidity.

metbosch avatar metbosch commented on September 17, 2024

Try HttpTemperature instead of HttpTemperatureSensor. The sample-config.json is wrong.
Thanks for reporting the error.

from homebridge-http-temperature-humidity.

matej-cupka avatar matej-cupka commented on September 17, 2024

Now it works
Thanks

from homebridge-http-temperature-humidity.

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.