Problem when running homebridge after installing homebridge-yeelight plugin


#1

I intsalled homebridge-yeelight (npm install -g homebridge-yeelight) on my raspberry pi 3, but after running homebridge, it showed an error. Did I do something wrong?

[28/04/2018, 13:56:47] ====================
[28/04/2018, 13:56:47] ERROR LOADING PLUGIN homebridge-yeelight:
[28/04/2018, 13:56:47] ReferenceError: Invalid left-hand side in assignment
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 Object. (/usr/local/lib/node_modules/homebridge-yeelight/index.js:1:78)
at Module._compile (module.js:409:26)
at Object.Module._extensions…js (module.js:416:10)
[28/04/2018, 13:56:47] ====================
[28/04/2018, 13:56:47] No plugins found. See the README for information on installing plugins.
[28/04/2018, 13:56:47] Loaded config.json with 0 accessories and 1 platforms.
[28/04/2018, 13:56:47] —
[28/04/2018, 13:56:47] Loading 1 platforms…
/usr/local/lib/node_modules/homebridge/lib/api.js:122
throw new Error(“The requested platform '” + name + “’ was not registered by any plugin.”);
^

Error: The requested platform ‘yeelight’ was not registered by any plugin.
at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:122:13)
at Server.str.replace.Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:294:45)
at Server.str.replace.Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36)
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: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)


#2

Maybe you need to check your configuration file: config.json.


#3

I checked my config.json with jsonlint

{
“bridge”: {
“name”: “Homebridge Hub”,
“username”: “CC:22:3D:E3:CE:30”,
“port”: 51826,
“pin”: “031-45-154”
},

“platforms”: [
{
“platform”: “yeelight”,
“name”: “yeelight”
}
],
“accessories”: [
]
}


#4

Do you have any other accessories in homebridge? It seems that homebridge or yeelight plugin isn’t correctly installed.


#5

I installed Yeelight like this

npm install -g homebridge-yeelight

Maybe I’m missing “sudo” at the beginning?