iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
150 stars 52 forks source link

Started getting restart of homebridge every couple minutes #194

Closed roger-richards closed 4 months ago

roger-richards commented 11 months ago

Describe Your Problem: Been using homebridge-smartthings-ik successfully for months. Recently I decided to update homebridge (because Node.js was out of date. It continued to work fine. Yesterday (perhaps after a plugin update) my homebridge setup started endlessly restart by itself. The error in the log right before it restarts: Homebridge Process Ended. Code: 143 I was unsuccessful in debugging so I decided to rebuild my homebridge from scratch. From a fresh container install of homebridge with only plugins "Homebridge UI" and "SmartThings Plugin" (both latest version) Same symptom. Homebridge is in a restart loop Turned on debug log and excerpt of before restart below:

Logs: [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Updated status for Garage Smoke-main: {"powerMeter":{"power":{"value":null}},"contactSensor":{"contact":{"value":"closed","timestamp":"2023-07-26T21:08:33.119Z"}},"smokeDetector":{"smoke":{"value":"clear","timestamp":"2022-04-25T00:27:47.053Z"}},"relativeHumidityMeasurement":{"humidity":{"value":null}},"refresh":{},"motionSensor":{"motion":{"value":null}},"atmosphericPressureMeasurement":{"atmosphericPressure":{"value":null}},"illuminanceMeasurement":{"illuminance":{"value":null}},"battery":{"battery":{"value":58,"unit":"%","timestamp":"2023-07-27T15:46:44.201Z"}},"bodyWeightMeasurement":{"bodyWeightMeasurement":{"value":null}},"voltageMeasurement":{"voltage":{"value":null}},"waterSensor":{"water":{"value":null}},"energyMeter":{"energy":{"value":null}},"temperatureMeasurement":{"temperature":{"value":null}},"tamperAlert":{"tamper":{"value":null}}} [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] State for Garage Smoke: 0 [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Garage Smoke value updated. [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Washing Machine Leak polling... [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Received getSensorState() event for Washing Machine Leak [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Refreshing status for Washing Machine Leak - current timestamp is 1690476143344 [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Calling Smartthings to get an update for Washing Machine Leak [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Kitchen Water Leak polling... [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Received getBatteryLevel() event for Kitchen Water Leak [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Refreshing status for Kitchen Water Leak - current timestamp is 1690476144771 [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Battery value from Kitchen Water Leak: 71 [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Kitchen Water Leak value updated. [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Entry arlo cam polling... [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Received getSensorState() event for Entry arlo cam [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Refreshing status for Entry arlo cam - current timestamp is 1690476143510 [7/27/2023, 9:42:28 AM] [Smartthings Plug (IK)] Calling Smartthings to get an update for Entry arlo cam [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Bed Button polling... [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Received getBatteryLevel() event for Bed Button [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Refreshing status for Bed Button - current timestamp is 1690476143400 [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Calling Smartthings to get an update for Bed Button [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Bathroom Multisensor polling... [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Received getSensorState() event for Bathroom Multisensor [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Refreshing status for Bathroom Multisensor - current timestamp is 1690476146265 [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] State for Bathroom Multisensor: 57 [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Bathroom Multisensor value updated. [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] D2 iPhone polling... [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Received getSensorState() event for D2 iPhone [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Refreshing status for D2 iPhone - current timestamp is 1690476143832 [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Calling Smartthings to get an update for D2 iPhone [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Updated status for Washing Machine Leak-main: {"waterSensor":{"water":{"value":"dry","timestamp":"2022-09-30T00:24:05.124Z"}},"refresh":{},"battery":{"battery":{"value":45,"unit":"%","timestamp":"2022-12-12T14:37:40.641Z"}}} [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] State for Washing Machine Leak: 0 [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Washing Machine Leak value updated. [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Tree polling... [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Received getSwitchState() event for Tree [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Refreshing status for Tree - current timestamp is 1690476144623 [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Switch value from Tree: off [7/27/2023, 9:42:29 AM] [Smartthings Plug (IK)] Tree value updated. [7/27/2023, 9:42:29 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [7/27/2023, 9:42:34 AM] [HB Supervisor] Restarting Homebridge... [7/27/2023, 9:42:34 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules -D --strict-plugin-resolution [7/27/2023, 9:42:34 AM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 3692 [7/27/2023, 9:42:35 AM] Loaded config.json with 0 accessories and 2 platforms. [7/27/2023, 9:42:35 AM] Loaded 39 cached accessories from cachedAccessories. [7/27/2023, 9:42:35 AM] --- [7/27/2023, 9:42:35 AM] Loaded plugin: homebridge-smartthings-ik@1.5.12 [7/27/2023, 9:42:35 AM] Registering platform 'homebridge-smartthings-ik.HomeBridgeSmartThings' [7/27/2023, 9:42:35 AM] --- [7/27/2023, 9:42:35 AM] Loading 2 platforms... [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Initializing HomeBridgeSmartThings platform... [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Finished initializing platform: Smartthings Plug (IK) [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tower Fan [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Main Spots [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bathroom Lights [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Washing Machine Leak [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bedroom Spots [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Water Heater Leak [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bed Button [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: D2 iPhone [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: HVAC Water Leak [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Foyer Water Sensor [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Kitchen Spots [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Window Fan [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Range Light [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Laundry CO2 Smoke [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: iPhone [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Stairwell lights [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Switched Outlet Monitor [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Balcony [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Front Door [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Entry arlo cam [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Minimote [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bathroom Multisensor [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tower Light [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bathroom Indirect [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Zoos Alarm [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: She Cave Spots [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: iPhone [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Kitchen Water Leak [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bedroom indirect bot [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Dining Indirect [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Dining lights [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Bed Mood [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Foyer Motion Sensor [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Garage Smoke [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Kitchen Indirect [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Balcony temp [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tree [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: Z-Wave Device Multichannel 5 [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading accessory from cache: wine cellar [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Executed didFinishLaunching callback [7/27/2023, 9:42:35 AM] [Smartthings Plug (IK)] Loading locations for exclusion [7/27/2023, 9:42:35 AM] Publishing bridge accessory (name: Homebridge 4ED4, publishInfo: { username: '0E:78:94:B5:4E:D4', port: 51417, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'bonjour-hap' }). Setup Payload: X-HM://0024CUSMJ40GF Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 536-18-795 │     
└────────────┘     

[7/27/2023, 9:42:35 AM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge 4ED4) is running on port 51417. [7/27/2023, 9:42:36 AM] [Smartthings Plug (IK)] Found 1 locations to ignore [7/27/2023, 9:42:36 AM] [Smartthings Plug (IK)] Discovering devices...

Plugin Config: { "bridge": { "name": "Homebridge 4ED4", "username": "0E:78:94:B5:4E:D4", "port": 51417, "pin": "536-18-795", "advertiser": "bonjour-hap" }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "Smartthings Plug (IK)", "BaseURL": "https://api.smartthings.com/v1/", "AccessToken": "xxxxxxxxx-6786-46f5-807b-27cb8a71def9", "GarageDoorMaxPoll": 40, "PollLocksSeconds": 10, "PollDoorsSeconds": 10, "PollSensorsSeconds": 5, "PollSwitchesAndLightsSeconds": 10, "PollWindowShadesSeconds": 20, "ExposeHumiditySensorForAirConditioners": false, "IgnoreLocations": [ "B8" ], "platform": "HomeBridgeSmartThings" } ] } Screenshots:

Environment: Container on QNAP x86 system. image: homebridge/homebridge:ubuntu

iklein99 commented 11 months ago

I don't see any errors being thrown by the plugin, and I don't see any errors from Homebridge. Not sure. Try disabling the plugin and restarting. What happens?

roger-richards commented 11 months ago

Disabled plugin. Restart homebridge and get the following log. The log is idle after this as the only plugin is UI.

log [7/27/2023, 10:17:38 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules -D --strict-plugin-resolution [7/27/2023, 10:17:38 AM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 443 [7/27/2023, 10:17:39 AM] Loaded config.json with 0 accessories and 2 platforms. [7/27/2023, 10:17:39 AM] Loaded 39 cached accessories from cachedAccessories. [7/27/2023, 10:17:39 AM] --- [7/27/2023, 10:17:39 AM] Disabled plugin: homebridge-smartthings-ik@1.5.12 [7/27/2023, 10:17:39 AM] --- [7/27/2023, 10:17:39 AM] Loading 2 platforms... [7/27/2023, 10:17:39 AM] Ignoring config for the platform "HomeBridgeSmartThings" in your config.json as the plugin "homebridge-smartthings-ik" has been disabled. [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Tower Fan [7/27/2023, 10:17:39 AM] Removing orphaned accessory Tower Fan [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Main Spots [7/27/2023, 10:17:39 AM] Removing orphaned accessory Main Spots [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bathroom Lights [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bathroom Lights [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Washing Machine Leak [7/27/2023, 10:17:39 AM] Removing orphaned accessory Washing Machine Leak [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bedroom Spots [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bedroom Spots [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Water Heater Leak [7/27/2023, 10:17:39 AM] Removing orphaned accessory Water Heater Leak [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bed Button [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bed Button [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory D2 iPhone [7/27/2023, 10:17:39 AM] Removing orphaned accessory D2 iPhone [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory HVAC Water Leak [7/27/2023, 10:17:39 AM] Removing orphaned accessory HVAC Water Leak [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Foyer Water Sensor [7/27/2023, 10:17:39 AM] Removing orphaned accessory Foyer Water Sensor [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Kitchen Spots [7/27/2023, 10:17:39 AM] Removing orphaned accessory Kitchen Spots [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Window Fan [7/27/2023, 10:17:39 AM] Removing orphaned accessory Window Fan [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Range Light [7/27/2023, 10:17:39 AM] Removing orphaned accessory Range Light [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Laundry CO2 Smoke [7/27/2023, 10:17:39 AM] Removing orphaned accessory Laundry CO2 Smoke [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory iPhone [7/27/2023, 10:17:39 AM] Removing orphaned accessory iPhone [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Stairwell lights [7/27/2023, 10:17:39 AM] Removing orphaned accessory Stairwell lights [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Switched Outlet Monitor [7/27/2023, 10:17:39 AM] Removing orphaned accessory Switched Outlet Monitor [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Balcony [7/27/2023, 10:17:39 AM] Removing orphaned accessory Balcony [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Front Door [7/27/2023, 10:17:39 AM] Removing orphaned accessory Front Door [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Entry arlo cam [7/27/2023, 10:17:39 AM] Removing orphaned accessory Entry arlo cam [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Minimote [7/27/2023, 10:17:39 AM] Removing orphaned accessory Minimote [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bathroom Multisensor [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bathroom Multisensor [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Tower Light [7/27/2023, 10:17:39 AM] Removing orphaned accessory Tower Light [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bathroom Indirect [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bathroom Indirect [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Zoos Alarm [7/27/2023, 10:17:39 AM] Removing orphaned accessory Zoos Alarm [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory She Cave Spots [7/27/2023, 10:17:39 AM] Removing orphaned accessory She Cave Spots [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory iPhone [7/27/2023, 10:17:39 AM] Removing orphaned accessory iPhone [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Kitchen Water Leak [7/27/2023, 10:17:39 AM] Removing orphaned accessory Kitchen Water Leak [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bedroom indirect bot [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bedroom indirect bot [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Dining Indirect [7/27/2023, 10:17:39 AM] Removing orphaned accessory Dining Indirect [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Dining lights [7/27/2023, 10:17:39 AM] Removing orphaned accessory Dining lights [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Bed Mood [7/27/2023, 10:17:39 AM] Removing orphaned accessory Bed Mood [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Foyer Motion Sensor [7/27/2023, 10:17:39 AM] Removing orphaned accessory Foyer Motion Sensor [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Garage Smoke [7/27/2023, 10:17:39 AM] Removing orphaned accessory Garage Smoke [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Kitchen Indirect [7/27/2023, 10:17:39 AM] Removing orphaned accessory Kitchen Indirect [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Balcony temp [7/27/2023, 10:17:39 AM] Removing orphaned accessory Balcony temp [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Tree [7/27/2023, 10:17:39 AM] Removing orphaned accessory Tree [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory Z-Wave Device Multichannel 5 [7/27/2023, 10:17:39 AM] Removing orphaned accessory Z-Wave Device Multichannel 5 [7/27/2023, 10:17:39 AM] Failed to find plugin to handle accessory wine cellar [7/27/2023, 10:17:39 AM] Removing orphaned accessory wine cellar [7/27/2023, 10:17:39 AM] Publishing bridge accessory (name: Homebridge 4ED4, publishInfo: { username: '0E:78:94:B5:4E:D4', port: 51417, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'bonjour-hap' }). Setup Payload: X-HM://0024CUSMJ40GF Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 536-18-795 │     
└────────────┘     

[7/27/2023, 10:17:39 AM] Homebridge v1.6.1 (HAP v0.11.1) (Homebridge 4ED4) is running on port 51417.

roger-richards commented 11 months ago

I tried installing V1.5.10 of homebridge-smartthings-ik -- same symptom...

[7/27/2023, 11:03:33 AM] [Smartthings Plug (IK)] Missing button status from Bed Mood [7/27/2023, 11:03:33 AM] [Smartthings Plug (IK)] Water Heater Leak battery level LOW [7/27/2023, 11:03:33 AM] [homebridge-smartthings-ik] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://homebridge.io/w/JtMGR for more info. [7/27/2023, 11:03:35 AM] [homebridge-smartthings-ik] This plugin slows down Homebridge. The read handler for the characteristic 'Brightness' was slow to respond! See https://homebridge.io/w/JtMGR for more info. [7/27/2023, 11:03:38 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [7/27/2023, 11:03:43 AM] [HB Supervisor] Restarting Homebridge... [7/27/2023, 11:03:43 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution [7/27/2023, 11:03:43 AM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 2441

roger-richards commented 11 months ago

Tried V1.5.9 -- same symptom, different error proceeding... (will try 1.5.8)

[7/27/2023, 11:18:03 AM] [Smartthings Plug (IK)] Water Heater Leak battery level LOW [7/27/2023, 11:18:03 AM] [homebridge-smartthings-ik] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics. See https://homebridge.io/w/JtMGR for more info. [7/27/2023, 11:18:03 AM] TypeError: Cannot read properties of undefined (reading 'level') at /homebridge/node_modules/homebridge-smartthings-ik/src/services/lightService.ts:152:50 at processTicksAndRejections (node:internal/process/task_queues:95:5) [7/27/2023, 11:18:03 AM] Got SIGTERM, shutting down Homebridge... [7/27/2023, 11:18:06 AM] [homebridge-smartthings-ik] This plugin slows down Homebridge. The read handler for the characteristic 'Brightness' was slow to respond! See https://homebridge.io/w/JtMGR for more info. [7/27/2023, 11:18:06 AM] [Smartthings Plug (IK)] Missing button status from Bathroom Lights [7/27/2023, 11:18:07 AM] [Smartthings Plug (IK)] Missing button status from Bed Mood [7/27/2023, 11:18:08 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [7/27/2023, 11:18:13 AM] [HB Supervisor] Restarting Homebridge...

iklein99 commented 11 months ago

Ok. THat gives me something to look at. I'll let you know.

roger-richards commented 11 months ago

Since I rebuilt my homebridge from scratch yesterday, no Smartthings accessories show up in the homebridge "Acessories" page. Not sure why they are not because the logs show references to my Smartthings devices. CORRECTION: They do eventually show up and then they disappear again. Not sure but when accessories finally show up, soon after homebridge restarts.

roger-richards commented 11 months ago

I have a new theory. The change I made that might be the problem was adding an Edge driver for a Zooz RGB LED controller that had stopped working (probably due to groovy sunset.) I removed that device from Smartthings and now the homebridge Accessories page loads quickly. The edge driver I loaded is here: https://api.smartthings.com/invitation-web/accept?id=6b68563b-1905-4654-8d2b-e677a2997424 Channel Information Name Mariano Shared Beta Driver Description Beta Edge Drivers Shared

roger-richards commented 11 months ago

Confirmed. My homebridge is stable. This is the Zooz device that is the cause of my problem: https://www.support.getzooz.com/kb/article/351-how-to-access-advanced-settings-for-my-zen31-rgbw-dimmer-on-smartthings/

iklein99 commented 11 months ago

Thanks.

iklein99 commented 11 months ago

So, the issue is that for some reason, the response back from the SmartThings - presumably from the driver - was invalid for switch level. It returned an invalid value for that value, and the code expected at least something there. I'll put out a patch to better handle it, but the device won't function properly of it won't return a valid value. I'd report the issue to Zooz.

@roger-richards , can you update to version 1.5.13 and restore that driver and try again for me? You may still see an error as the response coming back from the driver is invalid, but it should not restart homebridge. Let me know.

roger-richards commented 11 months ago

I updated to your latest driver and added the Zooz device. Does not crash homebridge and device does function via the Smartthings app. (although it is sluggish.) Thanks for investigating. I will send a support ticket to Zooz.