Giter Club home page Giter Club logo

Comments (9)

AlexGustafsson avatar AlexGustafsson commented on June 14, 2024

Are you running the server on a Rasperry Pi or similar? The error seems to be that node-gyp (the build tool that compiles native modules) hasn't been run correctly on install. This is not your fault and can happen for various reasons. One of which is that node-gyp isn't installed on your system. Sometimes Rasperry Pis can be a tricky target for a Node environment.

What you could try is to install the beta which has no need for node-gyp usage since it has no native modules. This also removes the need for sudo / raw socket abilities.

To install the beta, go over here and follow the instructions.

from homebridge-wol.

AlexGustafsson avatar AlexGustafsson commented on June 14, 2024

The beta has now been merged, so try the latest version of the package.

from homebridge-wol.

nicknicknickos avatar nicknicknickos commented on June 14, 2024

Having the same issue running on macOS.

This happened after I updated to the latest version of nom (version 5.2.4). Here's the output from terminal:

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

Error: The requested accessory 'Computer' was not registered by any plugin.
at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:254:42)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:81:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:504:3`

Here's module in the config.json (just that part of the json file):

{
"accessory": "Computer",
"name": "PC",
"mac": "XX: XX: XX: XX: XX: XX",
"ip": "192.168.1.72",
"pingInterval": "0"
}

Also, I'm running the latest version of the wol plugin.

from homebridge-wol.

AlexGustafsson avatar AlexGustafsson commented on June 14, 2024

The error suggests that you haven't installed homebridge-wol correctly. Please run npm ls -g homebridge-wol on your mac.

from homebridge-wol.

nicknicknickos avatar nicknicknickos commented on June 14, 2024

Nick$ npm ls -g homebridge-wol
/usr/local/lib
└── [email protected]

from homebridge-wol.

AlexGustafsson avatar AlexGustafsson commented on June 14, 2024

@nicknicknickos I have reason to believe your issue differ from this one. Please open a new issue and follow the template provided.

from homebridge-wol.

nicknicknickos avatar nicknicknickos commented on June 14, 2024

@AlexGustafsson - I figured it out. Turns out when I updated your plugin, I didn't change the "accessory" name to "NetworkDevice". That was breaking it in homebridge.

Thanks for taking a look!!

from homebridge-wol.

AlexGustafsson avatar AlexGustafsson commented on June 14, 2024

@nicknicknickos I should've spotted that. Great thing you solved it. Do you think I could clarify the breaking change even more somehow?

from homebridge-wol.

nicknicknickos avatar nicknicknickos commented on June 14, 2024

@AlexGustafsson No worries :)

I think this will only affect users who have an older version of the plugin, and then update with npm install -g homebridge-wol. New installers won't have this problem - and it was my fault for not reading the 'readme.md' file properly. Only when I looked at the stack trace a little closer did I figure it out.

Maybe you could add a section like:

'If you're updating from an older version of this plugin, be sure to follow these steps:
1- Run npm ls -g homebridge-wol
2- If version is older than VERSION BEFORE NETWORKDEVICE ADDED, please change your accessory name to 'NetworkDevice'.
3- Install the latest version of wol with npm install -g homebridge-wol

from homebridge-wol.

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.