rxseger / homebridge-camera-motion

Motion detector camera plugin for Homebridge
MIT License
48 stars 9 forks source link

Plugin gets not registered #1

Closed sholzmayer closed 7 years ago

sholzmayer commented 7 years ago

Hi,

I just installed, but I get the following error while starting it:

==> /var/log/homebridge.err <==
/opt/homebridge/node_modules/homebridge/lib/api.js:106
      throw new Error("The requested platform '" + name + "' was not registered by any plugin.");
      ^

Error: The requested platform 'CameraMotion' was not registered by any plugin.
    at API.platform (/opt/homebridge/node_modules/homebridge/lib/api.js:106:13)
    at Server._loadPlatforms (/opt/homebridge/node_modules/homebridge/lib/server.js:263:45)
    at Server.run (/opt/homebridge/node_modules/homebridge/lib/server.js:71:36)
    at module.exports (/opt/homebridge/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/opt/homebridge/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)

My first thought was that it is not installed correctly, but it seems to because it is in the node_modules directory.

The platform-entry in the config.json is:

{
        "platform": "CameraMotion",
        "name": "Camera",
        "name_motion": "Motion Sensor",
        "motion_pipe": "/tmp/motion-pipe",
        "motion_timeout": 2000,
        "snapshot_path": "/tmp/lastsnap.jpg"
     }

Do you have an idea?

sholzmayer commented 7 years ago

I also get this error before:

[2016-10-27 19:12:40] ERROR LOADING PLUGIN homebridge-camera-motion:
[2016-10-27 19:12:40] SyntaxError: Unexpected token [
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Plugin.load (/opt/homebridge/node_modules/homebridge/lib/plugin.js:65:22)
    at Server.<anonymous> (/opt/homebridge/node_modules/homebridge/lib/server.js:112:14)
    at Array.forEach (native)
rxseger commented 7 years ago

@sholzmayer What version of Node.js are you using (check with node -v), if not the latest can you try upgrading to Node v6+ or later?

sholzmayer commented 7 years ago

Thank you, this solved the problem 👍
Now I can use the camera in homekit!