davidashman / homebridge-cync-lights

Apache License 2.0
9 stars 5 forks source link

Homebridge will start then immediately indicate not running and tries again error in logs "RangeError: The value of "value" is out of range. .." #16

Open Ketchup-24 opened 1 month ago

Ketchup-24 commented 1 month ago

Describe The Bug:

Homebridge will start then immediately indicate not running and logs report

[8/6/2024, 9:45:57 PM] RangeError: The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received

To Reproduce: Install Homebridge on MacOS Install Homebridge Cync Lights latest Config plugin

Homebridge will not start

Expected behavior: Homebridge starts

Logs:

Full Logs

OTICE TO USERS AND PLUGIN DEVELOPERS

Homebridge 2.0 is on the way and brings some breaking changes to existing plugins. Please visit the following link to learn more about the changes and how to prepare: https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[8/6/2024, 9:48:10 PM] [Cync Lights] Discovering homes... [8/6/2024, 9:48:10 PM] [Cync Lights] Checking access token expiration Wed Dec 31 1969 16:00:00 GMT-0800 (Pacific Standard Time) [8/6/2024, 9:48:10 PM] [Cync Lights] Updating access token... [8/6/2024, 9:48:10 PM] [Cync Lights] Payload: {"refresh_token":"OERBNUU1MUE1RUFDODg1QjgxMTYyRUFFQUE5QkNBQkNGM0NCMUJBQkE4ODJCNzRBODY0NTEwRTE5MTNGQjI4NQ=="} [8/6/2024, 9:48:10 PM] [Cync Lights] Response: {"access_token":"1007d2ad150c4000-2407d8cd65f91430zEyRTI2OThBQ0RGQUZFOUY0REY2NjZFRjc5NTg3NUJCN0NFNzkzNQ==","refresh_token":"OERBNUU1MUE1RUFDODg1QjgxMTYyRUFFQUE5QkNBQkNGM0NCMUJBQkE4ODJCNzRBODY0NTEwRTE5MTNGQjI4NQ==","expire_in":604800} [8/6/2024, 9:48:10 PM] [Cync Lights] New access token expires in 604800 seconds. [8/6/2024, 9:48:10 PM] [Cync Lights] Expiration date set to Tue Aug 06 2024 21:56:49 GMT-0700 (Pacific Daylight Time). [8/6/2024, 9:48:10 PM] [Cync Lights] Got packet header with type 1, header 1800000002, length 2 [8/6/2024, 9:48:10 PM] [Cync Lights] Cync server connected. [8/6/2024, 9:48:10 PM] [Cync Lights] Processing queue of 0 packets. [8/6/2024, 9:48:10 PM] [Cync Lights] Received home response: [{"subscribe_date":"2024-08-07T04:33:31.413Z","is_active":true,"role":0,"last_login":"2024-08-06T23:36:07.955Z","firmware_mod":"1","active_code":"162a3e320040ba59ea144b734746617d","active_date":"2021-02-09T14:30:03.336Z","groups":"","mcu_version":1,"firmware_version":15632,"source":1,"mac":"786DEB30B42C","mcu_mod":"1","product_id":"160042baac4403e9160042baac448801","access_key":777,"name":"No Name","authorize_code":"1e07d4bee637bc7f","id":453336889,"is_online":true},{"subscribe_date":"2024-08-07T04:31:43.185Z","is_active":true,"role":0,"last_login":"","active_code":"14de43eeedfe77a11243ed34362778ac","active_date":"2024-08-07T04:31:43.182Z","groups":"","mcu_version":0,"firmware_version":0,"source":5,"mac":"6AD7747E0B8E","product_id":"1607d2ad150cb2001607d2ad150cb201","access_key":101447,"name":"Home test","authorize_code":"1e07d2cd65f15e0b","id":1188523433,"is_online":false}] [8/6/2024, 9:48:10 PM] [Cync Lights] Loading home information from https://api.gelighting.com/v2/product/160042baac4403e9160042baac448801/device/453336889/property. [8/6/2024, 9:48:11 PM] [Cync Lights] Received device response: {"bulbsArray":[{"displayName":"dining room dinner","showOnHome":false,"deviceType":55,"switchID":453336889017,"deviceID":453336889017}]} [8/6/2024, 9:48:11 PM] [Cync Lights] Registering device: {"displayName":"dining room dinner","showOnHome":false,"deviceType":55,"switchID":453336889017,"deviceID":453336889017} [8/6/2024, 9:48:11 PM] [homebridge-cync-lights] This plugin generated a warning from the characteristic 'Firmware Revision': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info. [8/6/2024, 9:48:11 PM] [homebridge-cync-lights] This plugin generated a warning from the characteristic 'Serial Number': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info. [8/6/2024, 9:48:11 PM] RangeError: The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received 453_336_889_017 at new NodeError (node:internal/errors:406:5) 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:///usr/local/lib/node_modules/homebridge-cync-lights/src/hub.ts:227:10) at CyncHub.registerDevice (file:///usr/local/lib/node_modules/homebridge-cync-lights/src/hub.ts:318:12) at file:///usr/local/lib/node_modules/homebridge-cync-lights/src/platform.ts:86:16 at CyncApi.forEachDevice (file:///usr/local/lib/node_modules/homebridge-cync-lights/src/api.ts:143:13) at processTicksAndRejections (node:internal/process/task_queues:95:5) at CyncLightsPlatform.discoverDevices (file:///usr/local/lib/node_modules/homebridge-cync-lights/src/platform.ts:69:5) [8/6/2024, 9:48:11 PM] Got SIGTERM, shutting down Homebridge... [8/6/2024, 9:48:16 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [8/6/2024, 9:48:21 PM] [HB Supervisor] Restarting Homebridge... [8/6/2024, 9:48:21 PM] [HB Supervisor] Starting Homebridge with extra flags: -I [8/6/2024, 9:48:21 PM] [HB Supervisor] Started Homebridge v1.8.4 with PID: 18833 [8/6/2024, 9:48:21 PM] Loaded config.json with 0 accessories and 2 platforms. [8/6/2024, 9:48:21 PM] Loaded 1 cached accessories from cachedAccessories. [8/6/2024, 9:48:21 PM] --- [8/6/2024, 9:48:21 PM] Loaded plugin: homebridge-config-ui-x@4.56.4 [8/6/2024, 9:48:21 PM] Registering platform 'homebridge-config-ui-x.config' [8/6/2024, 9:48:21 PM] --- [8/6/2024, 9:48:21 PM] Loaded plugin: homebridge-cync-lights@1.8.12 [8/6/2024, 9:48:21 PM] Registering platform 'homebridge-cync-lights.CyncLights' [8/6/2024, 9:48:21 PM] --- [8/6/2024, 9:48:21 PM] Loading 2 platforms... [8/6/2024, 9:48:21 PM] [Cync Lights] Initializing CyncLights platform... [8/6/2024, 9:48:21 PM] [Cync Lights] Identity file: /Users/martineskes/.homebridge/cync.json [8/6/2024, 9:48:21 PM] [Cync Lights] Returning contents of /Users/martineskes/.homebridge/cync.json [8/6/2024, 9:48:21 PM] [Cync Lights] Identity: {"access_token":"1007d2ad150c4000-2407d2cd65f3ea34jAwQTRBOUVDRDdFNzZERDVDODQ3M0FFRkExMkU0OTM0N0VCM0Y4Mg==","refresh_token":"OERBNUU1MUE1RUFDODg1QjgxMTYyRUFFQUE5QkNBQkNGM0NCMUJBQkE4ODJCNzRBODY0NTEwRTE5MTNGQjI4NQ==","user_id":1188521382,"expire_in":604800,"authorize":"2207d2cd65f07226"} [8/6/2024, 9:48:21 PM] [Cync Lights] Loading accessory from cache: dining room dinner [8/6/2024, 9:48:21 PM] [Cync Lights] Connecting to Cync server... [8/6/2024, 9:48:21 PM] [Cync Lights] Authenticating with Cync server... [8/6/2024, 9:48:21 PM] [Cync Lights] Authenticating with packet: 130000001a0346d765a60010323230376432636436356630373232360000b4 Setup Payload: X-HM://00249Z4C0D915 Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 487-81-744 │     
└────────────┘     

[8/6/2024, 9:48:21 PM] Homebridge v1.8.4 (HAP v0.12.2) (Homebridge 3238) is running on port 51633. [8/6/2024, 9:48:21 PM]

588282","id":202359175,"is_online":false},{"subscribe_date":"2021-01-27T06:30:58.123Z","is_active":true, Plugin Config:

All confidential info

Screenshots:

Environment:

No other plugins are installed

Ketchup-24 commented 1 month ago

It sound a lot like this other reported bug "Cync Lights Plugin in Child Bridge Continuously Restarting and Crashing #14"