kpsuperplane / homebridge-wiz-lan

Control Wiz lights over LAN
Apache License 2.0
116 stars 37 forks source link

Plugin not loading #1

Closed MrJeff01 closed 4 years ago

MrJeff01 commented 4 years ago

Fresh install of HomeBridge on Ubuntu Server 19.10

Trying to load the plugin gives the following error in logs:

[2/20/2020, 12:08:20 AM] ==================== [2/20/2020, 12:08:20 AM] ERROR LOADING PLUGIN homebridge-wiz-lan: [2/20/2020, 12:08:20 AM] /usr/lib/node_modules/homebridge-wiz-lan/lib/client/index.js:256 setPilot = (host, state) => { ^

SyntaxError: Unexpected token = at new Script (vm.js:79:7) at createScript (vm.js:251:10) at Object.runInThisContext (vm.js:303:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) [2/20/2020, 12:08:20 AM] ====================

I do have other plugins working so either I am missing a dependency or something is wrong? I'm new to HomeBridge.

newt10 commented 4 years ago

which node/npm version are you using? I am getting the same error

kpsuperplane commented 4 years ago

Hey @MrJeff01, please try updating to 2.0.4. Thank you for reporting this!!

npm install -g homebridge-wiz-lan@2.0.4
MrJeff01 commented 4 years ago

Thanks! That seemed to make it load like it should. Its still not detecting my one bulb but it might not be getting the broadcast traffic (its a VM running on VMWare) I have enabled promiscuous mode on the virtual switch but still not seeing the bulb. Node.js Version - v10.15.2 NPM Version v6.13.7

I tried manually adding the bulb's IP address, still not showing. (it is on the same subnet). Bulb type is A19 Warm White Dimmable (not RGB).

    {
        "platform": "WizSmarthome",
        "name": "WizSmarthome",
        "devices": [
            {
                "host": "192.168.20.162"
            }
        ]
    }

I also somehow seem to have two versions of Homebridge installed.. I probably have to get rid of one.. [3/2/2020, 11:49:14 AM] [Config] /usr/lib/node_modules/homebridge [3/2/2020, 11:49:14 AM] [Config] /usr/local/lib/node_modules/homebridge [3/2/2020, 11:49:19 AM] [Config] Multiple Instances Of Homebridge Found Installed

kpsuperplane commented 4 years ago

@MrJeff01, unfortunately this plugin only supports RGB at the moment. I unfortunately do not have any White Dimmable bulbs so I wouldn't know how their communication protocols work :(

However, I encourage you to tinker with the code if you like and to submit a PR!