davidashman / homebridge-cync-lights

Apache License 2.0
8 stars 4 forks source link

RangeError The value of "value" is out of range failed to parse devices #13

Open jasompi opened 1 week ago

jasompi commented 1 week ago

Describe The Bug: Failed to parse the response.

To Reproduce: Sign in to the account, see errors in the log, Child bridge process ended.

Expected behavior: plugin work

Logs:

[6/22/2024, 10:52:57 PM] [Cync Lights] Registering device: {"occupancyDeactivationPeriod":0,"lightRingBrightness":0,"displayName":"Fireplace Light","showOnHome":false,"loadSelection":0,"mac":"XXXXXXXX","lightRingColor":0,"ambientLightEnable":false,"firmwareVersion":"1.0.276","occupancySensitivity":0,"occupancyEnable":false,"followTheSun":false,"deviceType":128,"wifiDisconnectIndicatorEnable":false,"fadeOff":0,"switchID":1804883571,"wifiSsid":"XXXXXXXX","allowOTAUpdates":true,"deviceID":1597649113029,"commissionedDate":"2023-11-12T04:12:14Z","fadeOn":0,"defaultBrightness":0,"wifiMac":"XXXXXXXX","lightRingMode":0,"ambientLightSensitivity":0,"simpleModeEnabled":false,"occupancyTimeoutPeriod":0}
[6/22/2024, 10:52:57 PM] [Cync Lights] Queuing 10 packet #2.
[6/22/2024, 10:52:57 PM] [Cync Lights] Processing queue of 1 packets.
[6/22/2024, 10:52:57 PM] [Cync Lights] Sending 10 packet #2.
[6/22/2024, 10:52:57 PM] [Cync Lights] Loading home information from https://api.gelighting.com/v2/product/1607d2bc852800011607d2bc85283801/device/1804883571/property.
[6/22/2024, 10:52:57 PM] [Cync Lights] Received device response: {"bulbsArray":[{"deviceType":128,"switchID":1804883571001,"displayName":"Fireplace light","deviceID":1804883571001}]}
[6/22/2024, 10:52:57 PM] [Cync Lights] Registering device: {"deviceType":128,"switchID":1804883571001,"displayName":"Fireplace light","deviceID":1804883571001}
[6/22/2024, 10:52:57 PM] [Cync Lights] Child bridge process ended
[6/22/2024, 10:52:57 PM] [Cync Lights] Process Ended. Code: 1, Signal: null
RangeError: The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received 1_804_883_571_001
    at checkInt (node:internal/buffer:74:11)
    at writeU_Int32BE (node:internal/buffer:804:3)
    at Buffer.writeUInt32BE (node:internal/buffer:817:10)
    at CyncHub.updateConection (file:///var/lib/homebridge/node_modules/homebridge-cync-lights/src/hub.ts:227:10)
    at CyncHub.registerDevice (file:///var/lib/homebridge/node_modules/homebridge-cync-lights/src/hub.ts:318:12)
    at file:///var/lib/homebridge/node_modules/homebridge-cync-lights/src/platform.ts:86:16
    at CyncApi.forEachDevice (file:///var/lib/homebridge/node_modules/homebridge-cync-lights/src/api.ts:143:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)```

**Plugin Config:**

```json
Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment: