Open ibriannguyen opened 6 months ago
Describe The Bug: After adding Wifi Plugs, Plugin "discovers" an unknown device, and crashes.
Logs:
[03/05/2024, 17:05:58] [Cync Lights] Child bridge process ended [03/05/2024, 17:05:58] [Cync Lights] Process Ended. Code: 1, Signal: null [03/05/2024, 17:06:05] [Cync Lights] Restarting Process... [03/05/2024, 17:06:16] [Cync Lights] Launched child bridge with PID 2677 [03/05/2024, 17:06:18] Registering platform 'homebridge-cync-lights.CyncLights' [03/05/2024, 17:06:19] [Cync Lights] Loaded homebridge-cync-lights v1.8.12 child bridge successfully [03/05/2024, 17:06:19] Loaded 1 cached accessories from cachedAccessories.MACADDRESS. [03/05/2024, 17:06:19] [Cync Lights] Identity file: /var/lib/homebridge/cync.json [03/05/2024, 17:06:19] [Cync Lights] Returning contents of /var/lib/homebridge/cync.json [03/05/2024, 17:06:19] [Cync Lights] Identity: {"access_token":"TOKEN","refresh_token":"TOKEN","user_id":USER,"expire_in":604800,"authorize":"AUTHORIZE"} [03/05/2024, 17:06:19] [Cync Lights] Loading accessory from cache: Patio [03/05/2024, 17:06:20] [Cync Lights] Connecting to Cync server... [03/05/2024, 17:06:20] [Cync Lights] Authenticating with Cync server... [03/05/2024, 17:06:20] [Cync Lights] Authenticating with packet: 130000001a0343591d350010323230376434633436396333613230380000b4 [03/05/2024, 17:06:20] Homebridge v1.8.1 (HAP v0.12.0) (Cync Lights) is running on port 37504. [03/05/2024, 17:06:20] [Cync Lights] Discovering homes... [03/05/2024, 17:06:20] [Cync Lights] Checking access token expiration Wed Dec 31 1969 18:00:00 GMT-0600 (Central Standard Time) [03/05/2024, 17:06:20] [Cync Lights] Updating access token... [03/05/2024, 17:06:20] [Cync Lights] Payload: {"refresh_token":"TOKEN"} [03/05/2024, 17:06:22] [Cync Lights] Got packet header with type 1, header 1800000002, length 2 [03/05/2024, 17:06:22] [Cync Lights] Cync server connected. [03/05/2024, 17:06:22] [Cync Lights] Processing queue of 0 packets. [03/05/2024, 17:06:23] [Cync Lights] Response: {"access_token":"TOKEN","refresh_token":"TOKEN","expire_in":604800} [03/05/2024, 17:06:23] [Cync Lights] New access token expires in 604800 seconds. [03/05/2024, 17:06:23] [Cync Lights] Expiration date set to Fri May 03 2024 17:15:01 GMT-0500 (Central Daylight Time). [03/05/2024, 17:06:23] [Cync Lights] Received home response: [{"subscribe_date":"2024-05-03T21:05:09.351Z","is_active":true,"role":1,"last_login":"2024-05-03T16:05:00.525Z","firmware_mod":"WIFI Plug","active_code":"b0c53a464da049b369337d0551e33a67","active_date":"2020-12-27T22:53:14.411Z","groups":"","mcu_version":10038,"firmware_version":10103,"source":2,"mac":"MAC","mcu_mod":"1","product_id":"160fa2b7b2a403e9160fa2b7b2a4fc01","access_key":888,"authority":"RW","name":"No Name","authorize_code":"1e0042ba854922c1","id":503032893,"is_online":true},{"subscribe_date":"2024-05-03T20:57:47.981Z","is_active":true,"role":1,"last_login":"2024-05-03T16:02:29.764Z","firmware_mod":"WIFI Plug","active_code":"2f7e39f14c99ac465618bbc772e50e1f","active_date":"2021-10-09T20:31:12.143Z","groups":"","mcu_version":10038,"firmware_version":10110,"source":2,"mac":"MAC","mcu_mod":"1","product_id":"160fa2b7b2a403e9160fa2b7b2a4fc01","access_key":888,"authority":"RW","name":"","authorize_code":"CODE","id":503039728,"is_online":true},{"subscribe_date":"2024-05-01T11:19:01.932Z","is_active":true,"role":1,"last_login":"","active_code":"61e3a5e27d1fe388e2186cab598725f1","active_date":"2024-04-21T23:01:07.874Z","groups":"","mcu_version":0,"firmware_version":0,"source":2,"mac":"0CF8C7AB96E4","product_id":"1607d2ad150cb2001607d2ad150cb201","access_key":284422,"authority":"RW","name":"Home","authorize_code":"1e07d2cc4b356641","id":1454657023,"is_online":false}] [03/05/2024, 17:06:23] [Cync Lights] Loading home information from https://api.gelighting.com/v2/product/160fa2b7b2a403e9160fa2b7b2a4fc01/device/503032893/property. [03/05/2024, 17:06:23] [Cync Lights] Received device response: {"bulbsArray":[{"displayName":"Patio","showOnHome":false,"deviceType":64,"switchID":503032893001,"deviceID":503032893001}]} [03/05/2024, 17:06:23] [Cync Lights] Registering device: {"displayName":"Patio","showOnHome":false,"deviceType":64,"switchID":503032893001,"deviceID":503032893001} [03/05/2024, 17:06:25] [Cync Lights] Child bridge process ended [03/05/2024, 17:06:25] [Cync Lights] Process Ended. Code: 1, Signal: null [03/05/2024, 17:06:32] [Cync Lights] Restarting Process... Plugin Config:
{ "platform": "CyncLights", "name": "Cync Lights", "emailAddress": "email@address.com", "_bridge": { "username": "MA:CA:DD:RE:SS", "port": 37504 } }
Environment:
Describe The Bug: After adding Wifi Plugs, Plugin "discovers" an unknown device, and crashes.
Logs:
[03/05/2024, 17:05:58] [Cync Lights] Child bridge process ended [03/05/2024, 17:05:58] [Cync Lights] Process Ended. Code: 1, Signal: null [03/05/2024, 17:06:05] [Cync Lights] Restarting Process... [03/05/2024, 17:06:16] [Cync Lights] Launched child bridge with PID 2677 [03/05/2024, 17:06:18] Registering platform 'homebridge-cync-lights.CyncLights' [03/05/2024, 17:06:19] [Cync Lights] Loaded homebridge-cync-lights v1.8.12 child bridge successfully [03/05/2024, 17:06:19] Loaded 1 cached accessories from cachedAccessories.MACADDRESS. [03/05/2024, 17:06:19] [Cync Lights] Identity file: /var/lib/homebridge/cync.json [03/05/2024, 17:06:19] [Cync Lights] Returning contents of /var/lib/homebridge/cync.json [03/05/2024, 17:06:19] [Cync Lights] Identity: {"access_token":"TOKEN","refresh_token":"TOKEN","user_id":USER,"expire_in":604800,"authorize":"AUTHORIZE"} [03/05/2024, 17:06:19] [Cync Lights] Loading accessory from cache: Patio [03/05/2024, 17:06:20] [Cync Lights] Connecting to Cync server... [03/05/2024, 17:06:20] [Cync Lights] Authenticating with Cync server... [03/05/2024, 17:06:20] [Cync Lights] Authenticating with packet: 130000001a0343591d350010323230376434633436396333613230380000b4 [03/05/2024, 17:06:20] Homebridge v1.8.1 (HAP v0.12.0) (Cync Lights) is running on port 37504. [03/05/2024, 17:06:20] [Cync Lights] Discovering homes... [03/05/2024, 17:06:20] [Cync Lights] Checking access token expiration Wed Dec 31 1969 18:00:00 GMT-0600 (Central Standard Time) [03/05/2024, 17:06:20] [Cync Lights] Updating access token... [03/05/2024, 17:06:20] [Cync Lights] Payload: {"refresh_token":"TOKEN"} [03/05/2024, 17:06:22] [Cync Lights] Got packet header with type 1, header 1800000002, length 2 [03/05/2024, 17:06:22] [Cync Lights] Cync server connected. [03/05/2024, 17:06:22] [Cync Lights] Processing queue of 0 packets. [03/05/2024, 17:06:23] [Cync Lights] Response: {"access_token":"TOKEN","refresh_token":"TOKEN","expire_in":604800} [03/05/2024, 17:06:23] [Cync Lights] New access token expires in 604800 seconds. [03/05/2024, 17:06:23] [Cync Lights] Expiration date set to Fri May 03 2024 17:15:01 GMT-0500 (Central Daylight Time). [03/05/2024, 17:06:23] [Cync Lights] Received home response: [{"subscribe_date":"2024-05-03T21:05:09.351Z","is_active":true,"role":1,"last_login":"2024-05-03T16:05:00.525Z","firmware_mod":"WIFI Plug","active_code":"b0c53a464da049b369337d0551e33a67","active_date":"2020-12-27T22:53:14.411Z","groups":"","mcu_version":10038,"firmware_version":10103,"source":2,"mac":"MAC","mcu_mod":"1","product_id":"160fa2b7b2a403e9160fa2b7b2a4fc01","access_key":888,"authority":"RW","name":"No Name","authorize_code":"1e0042ba854922c1","id":503032893,"is_online":true},{"subscribe_date":"2024-05-03T20:57:47.981Z","is_active":true,"role":1,"last_login":"2024-05-03T16:02:29.764Z","firmware_mod":"WIFI Plug","active_code":"2f7e39f14c99ac465618bbc772e50e1f","active_date":"2021-10-09T20:31:12.143Z","groups":"","mcu_version":10038,"firmware_version":10110,"source":2,"mac":"MAC","mcu_mod":"1","product_id":"160fa2b7b2a403e9160fa2b7b2a4fc01","access_key":888,"authority":"RW","name":"","authorize_code":"CODE","id":503039728,"is_online":true},{"subscribe_date":"2024-05-01T11:19:01.932Z","is_active":true,"role":1,"last_login":"","active_code":"61e3a5e27d1fe388e2186cab598725f1","active_date":"2024-04-21T23:01:07.874Z","groups":"","mcu_version":0,"firmware_version":0,"source":2,"mac":"0CF8C7AB96E4","product_id":"1607d2ad150cb2001607d2ad150cb201","access_key":284422,"authority":"RW","name":"Home","authorize_code":"1e07d2cc4b356641","id":1454657023,"is_online":false}] [03/05/2024, 17:06:23] [Cync Lights] Loading home information from https://api.gelighting.com/v2/product/160fa2b7b2a403e9160fa2b7b2a4fc01/device/503032893/property. [03/05/2024, 17:06:23] [Cync Lights] Received device response: {"bulbsArray":[{"displayName":"Patio","showOnHome":false,"deviceType":64,"switchID":503032893001,"deviceID":503032893001}]} [03/05/2024, 17:06:23] [Cync Lights] Registering device: {"displayName":"Patio","showOnHome":false,"deviceType":64,"switchID":503032893001,"deviceID":503032893001} [03/05/2024, 17:06:25] [Cync Lights] Child bridge process ended [03/05/2024, 17:06:25] [Cync Lights] Process Ended. Code: 1, Signal: null [03/05/2024, 17:06:32] [Cync Lights] Restarting Process... Plugin Config:
{ "platform": "CyncLights", "name": "Cync Lights", "emailAddress": "email@address.com", "_bridge": { "username": "MA:CA:DD:RE:SS", "port": 37504 } }
Environment: