lucavb / homebridge-magic-blue-bulb

MagicBlue LED Lightbulb Plugin
GNU General Public License v3.0
8 stars 11 forks source link

TypeError: Invalid event target #9

Open Hil59 opened 3 years ago

Hil59 commented 3 years ago

I Installed your alpha and rebooted homebridge successfully. The log doesn't show any errors. When I add the device to the Config.json file with the correct MAC address and reboot, homebridge loads as normal, writing "Homebridge is running on port XXXXX." to the logs. Then immediately after, the following is printed twice:

TypeError: Invalid event target
    at setupSubscription (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/observable/fromEvent.ts:229:11)
    at Observable._subscribe (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/observable/fromEvent.ts:204:5)
    at Observable._trySubscribe (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/Observable.ts:238:19)
    at Observable.subscribe (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/Observable.ts:219:14)
    at SwitchMapOperator.call (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/operators/switchMap.ts:99:19)
    at Observable.subscribe (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/Observable.ts:214:25)
    at TakeUntilOperator.call (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/operators/takeUntil.ts:61:21)
    at Observable.subscribe (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/node_modules/rxjs/src/internal/Observable.ts:214:25)
    at MagicBluePlugin.findBulb (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/dist/magic-blue-plugin.js:69:14)
    at new MagicBluePlugin (/usr/local/lib/node_modules/homebridge-magic-blue-bulb/dist/magic-blue-plugin.js:58:14)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:357:50
    at Array.forEach (<anonymous>)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29)
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12)
    at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)

Homebridge then reboots and the process loops.

Here is the text for the device on Config.json. If I remove this line, homebridge boots normally.

        {
            "accessory": "magic-blue-bulb",
            "name": "MagicBlue",
            "mac": "C4:BE:84:41:AD:EF",
            "handle": 46
        },

Let me know if you need any additional information and thank you for reading this.

julioviegas commented 2 years ago

I'm exactly on the same issue, so following...