Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set up Wyze Color Bulbs #238

Closed
RitwikGupta opened this issue Mar 19, 2024 · 4 comments · Fixed by #239
Closed

Cannot set up Wyze Color Bulbs #238

RitwikGupta opened this issue Mar 19, 2024 · 4 comments · Fixed by #239
Labels
bug Something isn't working question Further information is requested

Comments

@RitwikGupta
Copy link
Contributor

RitwikGupta commented Mar 19, 2024

Describe The Bug:
This is my first time setting up the plugin. When the plugin turns out, it boot loops with the following errors:

TypeError: Cannot read properties of null (reading 'r')
    at Object.colorsys.hex2Hsv (/homebridge/node_modules/homebridge-wyze-smart-home/node_modules/colorsys/colorsys.js:197:31)
    at WyzeMeshLight.updateColor (/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeMeshLight.js:104:31)
    at WyzeMeshLight.updateCharacteristics (/homebridge/node_modules/homebridge-wyze-smart-home/src/accessories/WyzeMeshLight.js:69:46)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

and

AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
    at Bridge.Accessory.setupURI (/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
    at Server.setServerStatus (/homebridge/node_modules/homebridge/src/server.ts:155:45)
    at Server.teardown (/homebridge/node_modules/homebridge/src/server.ts:199:10)
    at signalHandler (/homebridge/node_modules/homebridge/src/cli.ts:93:12)
    at process.emit (node:events:518:28)
    at process.emit (/homebridge/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)

I followed the advice in #198 and excluded the Color Bulbs by MAC address and that let the plug in boot up. When I re-enabled the devices, the problem started occurring again.

To Reproduce:
Start the plugin for the first time with color bulbs already added to the Wyze app.

Expected behavior:
The devices are published to Homebridge

Plugin Config:

{
    "name": "Wyze",
    "username": "XXX",
    "password": "XXX",
    "keyId": "XXX",
    "apiKey": "XXX",
    "refreshInterval": 60000,
    "hms": false,
    "showAdvancedOptions": true,
    "apiLogEnabled": false,
    "pluginLoggingEnabled": false,
    "lowBatteryPercentage": 30,
    "excludeMacAddress": false,
    "excludedeviceType": false,
    "platform": "WyzeSmartHome"
}

Environment:

  • Plugin Version: v0.5.46
  • Homebridge Version: 1.7.0
  • Node.js Version: v20.11.1
  • NPM Version: 10.2.4
  • Operating System: Ubuntu 22.04.02 LTS
@RitwikGupta RitwikGupta added bug Something isn't working question Further information is requested labels Mar 19, 2024
Copy link

Message that will be displayed on users' first issue

@RitwikGupta
Copy link
Contributor Author

Worth nothing that the plugin logs show that the plugin never really initializes?

[3/18/2024, 11:11:12 PM] [Wyze] Initializing WyzeSmartHome platform...
[3/18/2024, 11:11:50 PM] [Wyze] Initializing WyzeSmartHome platform...
[3/18/2024, 11:12:35 PM] [Wyze] Initializing WyzeSmartHome platform...

@RitwikGupta
Copy link
Contributor Author

This seems related to #232. I have "Lamp 1" and "Lamp 2" set up in the Wyze app. If I exclude Lamp 2 by MAC (and Lamp 2 only), everything works. Is the issue with having more than one MeshLight or could the the issue be in the underlying Wyze API?

RitwikGupta added a commit to RitwikGupta/homebridge-wyze-smart-home that referenced this issue Mar 19, 2024
@RitwikGupta
Copy link
Contributor Author

The above PR fixes the issue. Both lamps are added correctly and all operations work as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant