OpenWonderLabs / homebridge-switchbot

The Homebridge SwitchBot plugin allows you to access your SwitchBot Device(s) from HomeKit. Homebridge.
https://openwonderlabs.github.io/homebridge-switchbot/
ISC License
236 stars 47 forks source link

Bug: Switchbot Bot not reacting and reporting wrong status #1002

Open yotis1982 opened 3 weeks ago

yotis1982 commented 3 weeks ago

Describe the Bug

Let me start by saying that the Bot works fine via the Switchbot app (turn on / turn off).

When I use it via Apple Homekit or directly from the Homebridge Web GUI (from Accessories menu) it doesn't react and nothing appear in the logs. Also the status is wrong, it shows ON (even though is OFF in the Switchbot app).

The plugin logs doesn't show any logs related to the Bot.

Was not working in homebridge-switchbot v3.5.1; Today I've upgraded to v3.6.0 but still doesn't work.

Thank you!

To Reproduce

Turn Switch ON / Turn OFF, no reaction, no logs, no change of status (in Homebridge or Homekit)

Expected Behavior

Change the position of the Bot when turn ON / OFF via Homebridge or Homekit.

Relevant Log Output

[7/2/2024, 7:42:52 AM] [SwitchBot] Initializing SwitchBot platform...
[7/2/2024, 7:42:52 AM] [SwitchBot] Initializing child bridge 0E:9A:6B:XX:XX:XX
[7/2/2024, 7:42:52 AM] Ignoring config for the platform "CameraUI" in your config.json as the plugin "homebridge-camera-ui" has been disabled.
[7/2/2024, 7:42:56 AM] [SwitchBot] Launched child bridge with PID 172
[7/2/2024, 7:43:07 AM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.5.1 child bridge successfully
[7/2/2024, 7:43:07 AM] Loaded 3 cached accessories from cachedAccessories.0E9A6BXXXXXX.
[7/2/2024, 7:43:07 AM] Homebridge v1.8.3 (HAP v0.12.2) (SwitchBot) is running on port 30918.
[7/2/2024, 7:43:08 AM] [SwitchBot] Total SwitchBot Devices Found: 4
[7/2/2024, 7:43:08 AM] [SwitchBot] Restoring existing accessory from cache: Living Room Light deviceId: C37D0CXXXXX
[7/2/2024, 7:43:08 AM] [SwitchBot] Restoring existing accessory from cache: Bedroom Meter Plus deviceId: E59B00XXXXX
[7/2/2024, 7:43:08 AM] [SwitchBot] Restoring existing accessory from cache: Living Room Meter Plus deviceId: EB8021XXXXX
[7/8/2024, 7:36:02 PM] [SwitchBot] Restarting child bridge...
[7/8/2024, 7:36:02 PM] Got SIGTERM, shutting down child bridge process...
[7/8/2024, 7:36:07 PM] [SwitchBot] Child bridge process ended
[7/8/2024, 7:36:07 PM] [SwitchBot] Process Ended. Code: 143, Signal: null
[7/8/2024, 7:36:14 PM] [SwitchBot] Restarting Process...
[7/8/2024, 7:36:16 PM] [SwitchBot] Launched child bridge with PID 7371
[7/8/2024, 7:36:18 PM] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[7/8/2024, 7:36:18 PM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.6.0 child bridge successfully
[7/8/2024, 7:36:18 PM] Loaded 3 cached accessories from cachedAccessories.0E9A6BXXXXXX.
[7/8/2024, 7:36:20 PM] Homebridge v1.8.3 (HAP v0.12.2) (SwitchBot) is running on port 30918.
[7/8/2024, 7:36:20 PM] [SwitchBot] Total SwitchBot Devices Found: 4
[7/8/2024, 7:36:21 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Light deviceId: C37D0CXXXXX
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Fan Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Lock Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Door Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Faucet Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Outlet Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Garage Door Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Covering Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Stateful Programmable Switch Service
[7/8/2024, 7:36:21 PM] [SwitchBot] Restoring existing accessory from cache: Bedroom Meter Plus deviceId: E59B00XXXXX
[7/8/2024, 7:36:21 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Meter Plus deviceId: EB8021XXXXX
[7/8/2024, 7:41:39 PM] [SwitchBot] Initializing SwitchBot platform...
[7/8/2024, 7:41:39 PM] [SwitchBot] Initializing child bridge 0E:9A:6B:XX:XX:XX
[7/8/2024, 7:41:39 PM] Ignoring config for the platform "CameraUI" in your config.json as the plugin "homebridge-camera-ui" has been disabled.
[7/8/2024, 7:41:40 PM] [SwitchBot] Launched child bridge with PID 8180
[7/8/2024, 7:41:44 PM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.6.0 child bridge successfully
[7/8/2024, 7:41:44 PM] Loaded 3 cached accessories from cachedAccessories.0E9A6BXXXXXX.
[7/8/2024, 7:41:44 PM] Homebridge v1.8.3 (HAP v0.12.2) (SwitchBot) is running on port 30918.
[7/8/2024, 7:41:44 PM] [SwitchBot] Total SwitchBot Devices Found: 4
[7/8/2024, 7:41:45 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Light deviceId: C37D0CXXXXX
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Fan Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Lock Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Door Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Faucet Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Outlet Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Garage Door Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Covering Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Stateful Programmable Switch Service
[7/8/2024, 7:41:45 PM] [SwitchBot] Restoring existing accessory from cache: Bedroom Meter Plus deviceId: E59B00XXXXX
[7/8/2024, 7:41:45 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Meter Plus deviceId: EB8021XXXXX
[7/8/2024, 7:53:38 PM] [SwitchBot] Restarting child bridge...
[7/8/2024, 7:53:38 PM] Got SIGTERM, shutting down child bridge process...
[7/8/2024, 7:53:43 PM] [SwitchBot] Child bridge process ended
[7/8/2024, 7:53:43 PM] [SwitchBot] Process Ended. Code: 143, Signal: null
[7/8/2024, 7:53:50 PM] [SwitchBot] Restarting Process...
[7/8/2024, 7:53:51 PM] [SwitchBot] Launched child bridge with PID 9338
[7/8/2024, 7:53:53 PM] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[7/8/2024, 7:53:53 PM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.6.0 child bridge successfully
[7/8/2024, 7:53:53 PM] Loaded 3 cached accessories from cachedAccessories.0E9A6BXXXXXX.
[7/8/2024, 7:53:54 PM] Homebridge v1.8.3 (HAP v0.12.2) (SwitchBot) is running on port 30918.
[7/8/2024, 7:53:54 PM] [SwitchBot] Total SwitchBot Devices Found: 4
[7/8/2024, 7:53:54 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Light deviceId: C37D0CXXXXX
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Fan Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Lock Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Door Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Faucet Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Outlet Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Garage Door Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Covering Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Stateful Programmable Switch Service
[7/8/2024, 7:53:54 PM] [SwitchBot] Restoring existing accessory from cache: Bedroom Meter Plus deviceId: E59B00XXXXX
[7/8/2024, 7:53:54 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Meter Plus deviceId: EB8021XXXXX

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "token": "removed",
        "secret": "removed",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "devices": [
            {
                "deviceId": "C37D0CXXXXXX",
                "configDeviceName": "Living Room Light",
                "configDeviceType": "Bot",
                "connectionType": "OpenAPI",
                "bot": {
                    "mode": "switch",
                    "deviceType": "switch",
                    "doublePress": 1
                },
                "logging": "standard"
            }
        ]
    },
    "platform": "SwitchBot",
    "_bridge": {
        "username": "0E:9A:6B:XX:XX:XX",
        "port": 30918
    }
}

Screenshots

No response

Device and Model

Switchbot Bot Switch

Node.js Version

v20.15.1

NPM Version

v10.7.0

Homebridge Version

v1.8.3

Homebridge Switchbot Plugin Version

v3.6.0

Homebridge Config UI X Plugin Version

v4.56.4

Operating System

Docker

yotis1982 commented 3 weeks ago

I've enabled "debug logging" and got some more details...

[7/8/2024, 8:24:44 PM] [SwitchBot] Restarting child bridge...
[7/8/2024, 8:24:44 PM] Got SIGTERM, shutting down child bridge process...
[7/8/2024, 8:24:49 PM] [SwitchBot] Child bridge process ended
[7/8/2024, 8:24:49 PM] [SwitchBot] Process Ended. Code: 143, Signal: null
[7/8/2024, 8:24:56 PM] [SwitchBot] Restarting Process...
[7/8/2024, 8:24:57 PM] [SwitchBot] Launched child bridge with PID 11278
[7/8/2024, 8:25:00 PM] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[7/8/2024, 8:25:00 PM] [SwitchBot] Loaded @switchbot/homebridge-switchbot v3.6.0 child bridge successfully
[7/8/2024, 8:25:00 PM] Loaded 3 cached accessories from cachedAccessories.0E9A6BXXXXXX.
[7/8/2024, 8:25:00 PM] Homebridge v1.8.3 (HAP v0.12.2) (SwitchBot) is running on port 30918.
[7/8/2024, 8:25:01 PM] [SwitchBot] Total SwitchBot Devices Found: 4
[7/8/2024, 8:25:01 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Light deviceId: C37D0CXXXXXX
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Device Config Logging: debug
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Platform Config refreshRate: 120, Default updateRate: 5, Platform Config pushRate: 0.1
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Default Max Retries: 5, Default Delay Between Retries: 3000
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Config: {"logging":"debug","connectionType":"OpenAPI","mode":"switch","deviceType":"switch","allowPush":true,"doublePress":1}
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Model: SwitchBot S1, BLE Model: H, BLE Model Name: WoHand, BLE Model Friendly Name: Bot
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Default MQTT URL: , Default mqttOptions: {}, Default mqttPubOptions: {}
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Device Type: switch, from Accessory Cache.
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Displaying as Switch
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Fan Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Lock Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Door Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Faucet Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Outlet Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Garage Door Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Window Covering Service
[7/8/2024, 8:25:01 PM] [SwitchBot] Bot: Living Room Light Removing any leftover Stateful Programmable Switch Service
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Retrieve initial values and update Homekit
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIRefreshStatus
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Registering Webhook Event Handler
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light is not listening webhook.
[7/8/2024, 8:25:01 PM] [SwitchBot] Restoring existing accessory from cache: Bedroom Meter Plus deviceId: E59B005XXXXXX
[7/8/2024, 8:25:01 PM] [SwitchBot] Restoring existing accessory from cache: Living Room Meter Plus deviceId: EB8021XXXXXX
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Firmware Version: 3.6.0
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light version: 3.6.0
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Bot Mode: switch, from Accessory Cache.
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Double Press: 1, from Accessory Cache.
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Push Rate Press: 15, from Accessory Cache.
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Using Allow Push: false
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Multi Press Count: 0
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"C37D0CXXXXXX","deviceType":"Bot","hubDeviceId":"D3D003XXXXXX","version":"V6.3","power":"off","battery":78,"deviceMode":"switchMode"},"message":"success"}
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"C37D0CXXXXXX","deviceType":"Bot","hubDeviceId":"D3D003XXXXXX","version":"V6.3","power":"off","battery":78,"deviceMode":"switchMode"},"message":"success"}
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIparseStatus
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light (power, battery, deviceMode) = API:(off, 78, switch), current:(true, 78, switch)
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light On: true
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light BatteryLevel: 78
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light StatusLowBattery: 0
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Firmware Version: 6.3
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light version: 6.3
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic On: true
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic BatteryLevel: 78
[7/8/2024, 8:25:01 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic StatusLowBattery: 0
[7/8/2024, 8:25:12 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Set ProgrammableSwitchOutputState: false
[7/8/2024, 8:25:12 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIpushChanges
[7/8/2024, 8:25:12 PM] [SwitchBot] [DEBUG] Bot: Living Room Light No Changes (openAPIpushChanges), On: true OnCached: true
[7/8/2024, 8:25:21 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Set ProgrammableSwitchOutputState: true
[7/8/2024, 8:25:21 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIpushChanges
[7/8/2024, 8:25:21 PM] [SwitchBot] [DEBUG] Bot: Living Room Light No Changes (openAPIpushChanges), On: true OnCached: true
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIRefreshStatus
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"C37D0CXXXXXX","deviceType":"Bot","hubDeviceId":"D3D003XXXXXX","version":"V6.3","power":"off","battery":78,"deviceMode":"switchMode"},"message":"success"}
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"C37D0CXXXXXX","deviceType":"Bot","hubDeviceId":"D3D003XXXXXX","version":"V6.3","power":"off","battery":78,"deviceMode":"switchMode"},"message":"success"}
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIparseStatus
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light (power, battery, deviceMode) = API:(off, 78, switch), current:(true, 78, switch)
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light On: true
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light BatteryLevel: 78
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light StatusLowBattery: 0
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Firmware Version: 6.3
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light version: 6.3
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic On: true
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic BatteryLevel: 78
[7/8/2024, 8:25:27 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic StatusLowBattery: 0
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIRefreshStatus
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"C37D0CXXXXXX","deviceType":"Bot","hubDeviceId":"D3D003XXXXXX","version":"V6.3","power":"off","battery":78,"deviceMode":"switchMode"},"message":"success"}
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"C37D0CXXXXXX","deviceType":"Bot","hubDeviceId":"D3D003XXXXXX","version":"V6.3","power":"off","battery":78,"deviceMode":"switchMode"},"message":"success"}
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIparseStatus
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light (power, battery, deviceMode) = API:(off, 78, switch), current:(true, 78, switch)
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light On: true
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light BatteryLevel: 78
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light StatusLowBattery: 0
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Firmware Version: 6.3
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light version: 6.3
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic On: true
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic BatteryLevel: 78
[7/8/2024, 8:25:36 PM] [SwitchBot] [DEBUG] Bot: Living Room Light updateCharacteristic StatusLowBattery: 0
keithemyers commented 3 weeks ago

I'm seeing the same behavior. In the Home app, the status is ON. When I attempt to turn it off via the Home app, the on-screen slider returns to ON. The Switchbot remains in the ON position. I hear the Switchbot mechanism doing something, but it's not turning the switch off. When I turn it off via the Switchbot app, it turns the light off as it should. Same versions as the OP.

[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance openAPIparseStatus
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance (power, battery, deviceMode) = API:(on, 77, switch), current:(true, 77, switch)
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance On: true
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance BatteryLevel: 77
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance StatusLowBattery: 0
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance Firmware Version: 4.9
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance version: 4.9
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance updateCharacteristic On: true
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance updateCharacteristic BatteryLevel: 77
[7/9/2024, 9:31:38 PM] [SwitchBot] Bot: Entrance updateCharacteristic StatusLowBattery: 0
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight openAPIRefreshStatus
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance openAPIRefreshStatus
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"DE1F768568CF","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.9","power":"on","battery":77,"deviceMode":"switchMode"},"message":"success"}
[7/9/2024, 9:33:38 PM] [SwitchBot] [DEBUG] Bot: Entrance statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"DE1F768568CF","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.9","power":"on","battery":77,"deviceMode":"switchMode"},"message":"success"}
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance openAPIparseStatus
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance (power, battery, deviceMode) = API:(on, 77, switch), current:(true, 77, switch)
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance On: true
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance BatteryLevel: 77
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance StatusLowBattery: 0
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance Firmware Version: 4.9
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance version: 4.9
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance updateCharacteristic On: true
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance updateCharacteristic BatteryLevel: 77
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: Entrance updateCharacteristic StatusLowBattery: 0
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"CA5F191EEA5D","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.9","power":"off","battery":23,"deviceMode":"switchMode"},"message":"success"}
[7/9/2024, 9:33:38 PM] [SwitchBot] [DEBUG] Bot: GLight statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"CA5F191EEA5D","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.9","power":"off","battery":23,"deviceMode":"switchMode"},"message":"success"}
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight openAPIparseStatus
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight (power, battery, deviceMode) = API:(off, 23, switch), current:(true, 23, switch)
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight On: true
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight BatteryLevel: 23
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight StatusLowBattery: 0
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight Firmware Version: 4.9
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight version: 4.9
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight updateCharacteristic On: true
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight updateCharacteristic BatteryLevel: 23
[7/9/2024, 9:33:38 PM] [SwitchBot] Bot: GLight updateCharacteristic StatusLowBattery: 0
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Set ProgrammableSwitchOutputState: false
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Set ProgrammableSwitchOutputState: false
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Set ProgrammableSwitchOutputState: false
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Set ProgrammableSwitchOutputState: false
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Set ProgrammableSwitchOutputState: false
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance openAPIpushChanges
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Switch Mode, Turning true
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance Sending request to SwitchBot API, body: {"command":"turnOn","parameter":"default","commandType":"command"},
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance statusCode: 200, deviceStatus: {"statusCode":100,"body":{"items":[{"deviceID":"DE1F768568CF","code":100,"status":{"battery":77,"power":"on"},"message":"success"}]},"message":"success"}
[7/9/2024, 9:33:54 PM] [SwitchBot] [DEBUG] Bot: Entrance statusCode: 200, deviceStatus: {"statusCode":100,"body":{"items":[{"deviceID":"DE1F768568CF","code":100,"status":{"battery":77,"power":"on"},"message":"success"}]},"message":"success"}
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance updateCharacteristic On: true
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance updateCharacteristic BatteryLevel: 77
[7/9/2024, 9:33:54 PM] [SwitchBot] Bot: Entrance updateCharacteristic StatusLowBattery: 0
[7/9/2024, 9:34:09 PM] [SwitchBot] Bot: Entrance openAPIRefreshStatus
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"DE1F768568CF","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.9","power":"on","battery":77,"deviceMode":"switchMode"},"message":"success"}
[7/9/2024, 9:34:10 PM] [SwitchBot] [DEBUG] Bot: Entrance statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"DE1F768568CF","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.9","power":"on","battery":77,"deviceMode":"switchMode"},"message":"success"}
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance openAPIparseStatus
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance (power, battery, deviceMode) = API:(on, 77, switch), current:(true, 77, switch)
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance On: true
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance BatteryLevel: 77
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance StatusLowBattery: 0
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance Firmware Version: 4.9
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance version: 4.9
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance updateCharacteristic On: true
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance updateCharacteristic BatteryLevel: 77
[7/9/2024, 9:34:10 PM] [SwitchBot] Bot: Entrance updateCharacteristic StatusLowBattery: 0
donavanbecker commented 3 weeks ago

Can you try the latest beta:

npm version

Click here to find out how to install Beta

yotis1982 commented 3 weeks ago

Thanks for suggestion.

I installed the beta. I worked once and stopped working. I see this in the debug when I try to activate the trigger ON / OFF:

[7/10/2024, 5:08:28 PM] [SwitchBot] [DEBUG] Bot: Living Room Light Set ProgrammableSwitchOutputState: false [7/10/2024, 5:08:28 PM] [SwitchBot] [DEBUG] Bot: Living Room Light openAPIpushChanges [7/10/2024, 5:08:28 PM] [SwitchBot] [DEBUG] Bot: Living Room Light No Changes (openAPIpushChanges), On: true OnCached: true

yotis1982 commented 3 weeks ago

I went back one by one version, the v3.4.0 is working.

The only following looks different in the debug output on the 3.4.0 vs the rest (especially the italic market line which is in red)

[7/10/2024, 5:22:50 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200 [7/10/2024, 5:22:50 PM] [SwitchBot] [DEBUG] Bot: Living Room Light deviceStatus: {"statusCode":100,"body":{"items":[{"deviceID":"C37D0CC817F0","code":100,"status":{"battery":77,"power":"on"},"message":"success"}]},"message":"success"} [7/10/2024, 5:22:50 PM] [SwitchBot] [DEBUG] Bot: Living Room Light deviceStatus body: {"items":[{"deviceID":"C37D0CC817F0","code":100,"status":{"battery":77,"power":"on"},"message":"success"}]} [7/10/2024, 5:22:50 PM] [SwitchBot] [DEBUG] Bot: Living Room Light deviceStatus statusCode: 100 [7/10/2024, 5:22:50 PM] [SwitchBot] [DEBUG] Bot: Living Room Light statusCode: 200 & deviceStatus StatusCode: 100

donavanbecker commented 3 weeks ago

Can you try the latest beta:

npm version

Click here to find out how to install Beta

lc808 commented 3 weeks ago

Hi, I am facing the same issue and just tried the 3.6.1-beta.2 -> not working for me I followed yotis1982 approach and changed back to 3.4.0 -> working

drheck commented 1 week ago

Hi, I have the same problem with my SwitchBot: Smart Lock with all versions > 3.4.0. I can't open or close the smart lock with the home app. So i am still using 3.4.0 and tried every update -> today 3.7.0 - still not working. How can i support you in order to find the problem? kind regards, Peter