vvpossible / homebridge_yeelight

Yeelight plugin for homebridge
303 stars 59 forks source link

ERROR LOADING PLUGIN homebridge-yeelight -Any idea ? #46

Open prbreezy opened 6 years ago

prbreezy commented 6 years ago

Hello,

After few months of not doing any home automation due to family purpose I'm back into it and facing this error with the pluging:

ERROR LOADING PLUGIN homebridge-yeelight: ReferenceError: Invalid left-hand side in assignment

I do reinstall the pluging completly - clean up my accessories folder, persitant folder but nothing help..

Someone have an idea ? My config.json is below the stack as well.

pi@raspberrypi3:~ $ npm install -g homebridge-yeelight /usr/lib └── homebridge-yeelight@0.0.18

pi@raspberrypi3:~ $ DEBUG=* homebridge
*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
[2/15/2018, 2:25:48 PM] Loaded plugin: homebridge-harmonyhub
[2/15/2018, 2:25:51 PM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[2/15/2018, 2:25:51 PM] ---
[2/15/2018, 2:25:51 PM] Loaded plugin: homebridge-mi-aqara
[2/15/2018, 2:25:51 PM] Registering platform 'homebridge-mi-aqara.MiAqaraPlatform'
[2/15/2018, 2:25:51 PM] ---
[2/15/2018, 2:25:51 PM] ====================
[2/15/2018, 2:25:51 PM] ERROR LOADING PLUGIN homebridge-yeelight:
[2/15/2018, 2:25:51 PM] ReferenceError: Invalid left-hand side in assignment
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:387:25)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-yeelight/index.js:1:78)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:72:22)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:142:14)
[2/15/2018, 2:25:51 PM] ====================
[2/15/2018, 2:25:51 PM] Loaded config.json with 0 accessories and 3 platforms.
[2/15/2018, 2:25:51 PM] ---
[2/15/2018, 2:25:51 PM] Loading 3 platforms...
[2/15/2018, 2:25:51 PM] [Harmony Hub] Initializing HarmonyHub platform...
  harmonyhubjs:discover:explorer Explorer(61991) +0ms
  harmonyhubjs:discover:ping Ping(61991) +9ms
  harmonyhubjs:discover:explorer start() +22ms
  harmonyhubjs:discover:responsecollector ResponseCollector(61991) +4ms
  harmonyhubjs:discover:responsecollector start() +11ms
  harmonyhubjs:discover:ping start() +34ms
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] Initializing MiAqaraPlatform platform...
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] [MiAqaraPlatform][INFO]**************************************************************
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] [MiAqaraPlatform][INFO]           MiAqaraPlatform v0.5.3 By YinHang
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] [MiAqaraPlatform][INFO]  GitHub: https://github.com/YinHangCode/homebridge-mi-aqara
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] [MiAqaraPlatform][INFO]                                         QQ Group: 107927710
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] [MiAqaraPlatform][INFO]**************************************************************
[2/15/2018, 2:25:51 PM] [MiAqaraPlatform] [MiAqaraPlatform][INFO]start success...
/usr/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 'homebridge-yeelight' was not registered by any plugin.
    at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:122:13)
    at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:294:45)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:85:36)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)
    at node.js:405:3
pi@raspberrypi3:~ $

**Config.json extract**
    "platforms": [
    {
        "platform": "HarmonyHub",
        "name": "Harmony Hub"
    },
    {
         "platform": "MiAqaraPlatform",
         "sid": ["34ce0085430b"],
         "password": ["XXXXXXXXXXXXXXX"]
        },
    {
         "platform": "homebridge-yeelight",
         "name": "homebridge-yeelight" 
        }

Thanks for your help !

linvis commented 6 years ago

Can you check the version of yeelight plugin? Is it the latest from github?

linvis commented 6 years ago

Please update nodejs to 8.x or later, then reinstall homebridge.