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
242 stars 53 forks source link

Garage door always displays « opening » status #1036

Closed bxlouis closed 3 weeks ago

bxlouis commented 2 months ago

Describe the Bug

I set up a bot as garage door on iOS 18.0 latest dev beta. Homebridge v1.8.4 - Plugin v3.7.0

The bot is correctly configured in Homebridge and I see no error in the debug log. The accessory shows up as closed in Homebridge UI.

But in Home app, the garage door is displayed as « opening » and does not work.

To Reproduce

Configure bot and observe in Home App.

Expected Behavior

Garage door shows up as closed in Home app.

Relevant Log Output

[8/31/2024, 5:48:43 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[8/31/2024, 5:48:43 PM] [HB Supervisor] Started Homebridge v1.8.4 with PID: 8836
[8/31/2024, 5:48:45 PM] Loaded config.json with 0 accessories and 6 platforms.
[8/31/2024, 5:48:45 PM] Loaded 1 cached accessories from cachedAccessories.
[8/31/2024, 5:48:45 PM] ---
[8/31/2024, 5:48:45 PM] Disabled plugin: homebridge-homeconnect@0.42.4
[8/31/2024, 5:48:45 PM] ---
[8/31/2024, 5:48:45 PM] Loaded plugin: homebridge-people-guest-mode@0.9.9
[8/31/2024, 5:48:45 PM] Registering platform 'homebridge-people-guest-mode.People'
[8/31/2024, 5:48:45 PM] Registering accessory 'homebridge-people-guest-mode.PeopleAccessory'
[8/31/2024, 5:48:45 PM] Registering accessory 'homebridge-people-guest-mode.PeopleAllAccessory'
[8/31/2024, 5:48:45 PM] Registering accessory 'homebridge-people-guest-mode.GuestModeSwitch'
[8/31/2024, 5:48:45 PM] ---
[8/31/2024, 5:48:46 PM] Disabled plugin: homebridge-tado-ac@4.1.2
[8/31/2024, 5:48:46 PM] ---
[8/31/2024, 5:48:46 PM] Loaded plugin: homebridge-tahoma@2.2.56
[8/31/2024, 5:48:46 PM] Registering platform 'homebridge-tahoma.Tahoma'
[8/31/2024, 5:48:46 PM] ---
[8/31/2024, 5:48:46 PM] Disabled plugin: @coxhome/homebridge-aldes-connect@1.0.1
[8/31/2024, 5:48:46 PM] ---
[8/31/2024, 5:48:46 PM] Disabled plugin: @jpgouin-org/homebridge-aldes@1.0.3-rc3
[8/31/2024, 5:48:46 PM] ---
[8/31/2024, 5:48:49 PM] Loaded plugin: @switchbot/homebridge-switchbot@3.7.0
[8/31/2024, 5:48:49 PM] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[8/31/2024, 5:48:49 PM] ---
[8/31/2024, 5:48:49 PM] Loading 6 platforms...
[8/31/2024, 5:48:49 PM] [Cozytouch] Initializing Tahoma platform...
[8/31/2024, 5:48:49 PM] [Cozytouch] Initializing child bridge 0E:8E:03:53:33:29
[8/31/2024, 5:48:49 PM] Ignoring config for the platform "HomeConnect" in your config.json as the plugin "homebridge-homeconnect" has been disabled.
[8/31/2024, 5:48:49 PM] Ignoring config for the platform "TadoAC" in your config.json as the plugin "homebridge-tado-ac" has been disabled.
[8/31/2024, 5:48:49 PM] [Homebridge People Guest Mode] Initializing People platform...
[8/31/2024, 5:48:49 PM] Initializing platform accessory 'XXX'...
[8/31/2024, 5:48:49 PM] Initializing platform accessory 'XXX'...
[8/31/2024, 5:48:49 PM] Initializing platform accessory 'Guest Mode'...
[8/31/2024, 5:48:49 PM] Initializing platform accessory 'Anyone'...
[8/31/2024, 5:48:49 PM] [Homebridge People Guest Mode] WebHook: Started server on port '51828'.
[8/31/2024, 5:48:49 PM] [SwitchBot] Initializing SwitchBot platform...
Setup Payload:
X-HM://0024I6K0QCWCQ
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ XXX-XX-XXX │     
    └────────────┘     

[8/31/2024, 5:48:49 PM] Homebridge v1.8.4 (HAP v0.12.2) (Homebridge B3B1) is running on port 51813.
[8/31/2024, 5:48:49 PM] 

NOTICE 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/31/2024, 5:48:50 PM] [Cozytouch] Launched child bridge with PID 8852
[8/31/2024, 5:48:50 PM] Registering platform 'homebridge-tahoma.Tahoma'
[8/31/2024, 5:48:50 PM] [Cozytouch] Loaded homebridge-tahoma v2.2.56 child bridge successfully
[8/31/2024, 5:48:50 PM] Loaded 2 cached accessories from cachedAccessories.0E8E03533329.
[8/31/2024, 5:48:50 PM] [SwitchBot] Total SwitchBot Devices Found: 2
[8/31/2024, 5:48:51 PM] [SwitchBot] Restoring existing accessory from cache: Portail deviceId: XXX
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Device Config Logging: debug
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Platform Config refreshRate: 120, Default updateRate: 5, Platform Config pushRate: 0.1
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Default Max Retries: 5, Default Delay Between Retries: 3000
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Model: SwitchBot S1, BLE Model: H, BLE Model Name: WoHand, BLE Model Friendly Name: Bot
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Default MQTT URL: , Default mqttOptions: {}, Default mqttPubOptions: {}
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Displaying as Garage Door Opener
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Fan Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Lock Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Door Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Faucet Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Outlet Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Switch Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Window Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Window Covering Service
[8/31/2024, 5:48:51 PM] [SwitchBot] Bot: Portail Removing any leftover Stateful Programmable Switch Service
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Retrieve initial values and update Homekit
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIRefreshStatus
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Registering Webhook Event Handler
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail is not listening webhook.
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Config: {"logging":"debug","connectionType":"OpenAPI","mode":"press","deviceType":"garagedoor"}
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Device Type: garagedoor, from Accessory Cache.
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Firmware Version: 3.7.0
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail version: 3.7.0
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Bot Mode: press, from Accessory Cache.
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Double Press: 1, from Accessory Cache.
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Using Push Rate Press: 15, from Accessory Cache.
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail No Allow Push Set, Using default Allow Push: false
[8/31/2024, 5:48:51 PM] [SwitchBot] [DEBUG] Bot: Portail Multi Press Count: 0
[8/31/2024, 5:48:50 PM] [Cozytouch] WARNING: Setting pollingPeriod higher than 60 seconds can generate session timeout errors.
[8/31/2024, 5:48:51 PM] Homebridge v1.8.4 (HAP v0.12.2) (Cozytouch) is running on port 50522.
[8/31/2024, 5:48:51 PM] 

NOTICE 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/31/2024, 5:48:51 PM] [Cozytouch] Configure device Chauffe-eau
[8/31/2024, 5:48:51 PM] [Cozytouch]   WaterHeatingSystem > DomesticHotWaterProduction
[8/31/2024, 5:48:51 PM] [Cozytouch] Configure device MODBUSLINK (1#2)
[8/31/2024, 5:48:51 PM] [Cozytouch]   ElectricitySensor > CumulativeElectricPowerConsumptionSensor
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"XXXXXX","deviceType":"Bot","hubDeviceId":"EA9B61FEFEB4","version":"V6.6","power":"on","battery":99,"deviceMode":"pressMode"},"message":"success"}
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"XXXXXX","deviceType":"Bot","hubDeviceId":"EA9B61FEFEB4","version":"V6.6","power":"on","battery":99,"deviceMode":"pressMode"},"message":"success"}
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIparseStatus
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail (power, battery, deviceMode) = API:(on, 99, press), current:(false, 99, press)
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail On: false
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail BatteryLevel: 99
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail StatusLowBattery: 0
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail Firmware Version: 6.6
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail version: 6.6
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail updateHomeKitCharacteristics
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic BatteryLevel: 99
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic StatusLowBattery: 0
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristicc TargetDoorState: Closed, CurrentDoorState: Closed (false)
[8/31/2024, 5:48:52 PM] [SwitchBot] [DEBUG] Bot: Portail Garage Door On: false

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "xxxx",
                "secret": "xxxx",
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "xxxxx",
                        "configDeviceType": "Bot",
                        "connectionType": "OpenAPI",
                        "bot": {
                            "mode": "press",
                            "deviceType": "garagedoor"
                        },
                        "logging": "debug"
                    }
                ],
                "logging": "standard"
            },
            "platform": "SwitchBot"
        }

Screenshots

No response

Device and Model

Raspberry Pi docker

Node.js Version

20.17.0

NPM Version

10.8.2

Homebridge Version

1.8.4

Homebridge Switchbot Plugin Version

3.7.0

Homebridge Config UI X Plugin Version

No response

Operating System

Raspbian

donavanbecker commented 1 month ago

Can you try the latest beta:

![npm version](https://badgen.net/badge/homebridge-switchbot@beta/>= 3.7.1-beta.18/orange)

Click here to find out how to install Beta

bxlouis commented 1 month ago

Just installed v3.7.1 beta 18 and I don’t observe any change in the behavior. The gate is still displayed as « opening » and I see no difference in the logs.

donavanbecker commented 1 month ago

Can you try the latest beta:

npm version

Click here to find out how to install Beta

bxlouis commented 1 month ago

@donavanbecker tried with beta 19 and 23 which was out when I saw your message. Behaviour remains quite the same unfortunately. The gate shows as "opening" and when I tap the button it then shows briefly "No response" before getting back to "Opening".

[9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus: {"statusCode":100,"body":{"deviceId":"D43533351320","deviceType":"Bot","hubDeviceId":"EA9B61FEFEB4","version":"V6.6","power":"on","battery":99,"deviceMode":"pressMode"},"message":"success"} [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus statusCode: 100 [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 & deviceStatus StatusCode: 100 [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIparseStatus [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail On: false [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail BatteryLevel: 99, StatusLowBattery: 0 [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic TargetDoorState: Open, CurrentDoorState: Open [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail Garage Door On: false [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic BatteryLevel: 99 [9/11/2024, 1:40:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic StatusLowBattery: 0 [9/11/2024, 1:42:07 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIRefreshStatus [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus: {"statusCode":100,"body":{"deviceId":"D43533351320","deviceType":"Bot","hubDeviceId":"EA9B61FEFEB4","version":"V6.6","power":"on","battery":99,"deviceMode":"pressMode"},"message":"success"} [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus statusCode: 100 [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 & deviceStatus StatusCode: 100 [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIparseStatus [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail On: false [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail BatteryLevel: 99, StatusLowBattery: 0 [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic TargetDoorState: Open, CurrentDoorState: Open [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail Garage Door On: false [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic BatteryLevel: 99 [9/11/2024, 1:42:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic StatusLowBattery: 0 [9/11/2024, 1:44:07 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIRefreshStatus [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus: {"statusCode":100,"body":{"deviceId":"D43533351320","deviceType":"Bot","hubDeviceId":"EA9B61FEFEB4","version":"V6.6","power":"on","battery":99,"deviceMode":"pressMode"},"message":"success"} [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus statusCode: 100 [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 & deviceStatus StatusCode: 100 [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIparseStatus [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail On: false [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail BatteryLevel: 99, StatusLowBattery: 0 [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic TargetDoorState: Open, CurrentDoorState: Open [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail Garage Door On: false [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic BatteryLevel: 99 [9/11/2024, 1:44:08 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic StatusLowBattery: 0 [9/11/2024, 1:44:15 PM] [SwitchBot] Bot: Portail Set TargetDoorState: 0 [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIpushChanges [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail Press Mode [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail Sending request to SwitchBot API, body: {"command":"press","parameter":"default","commandType":"command"}, [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus: {"statusCode":100,"body":{"items":[{"deviceID":"D43533351320","code":100,"status":{"battery":99,"online":"on","power":"on"},"message":"success"}]},"message":"success"} [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus body: {"items":[{"deviceID":"D43533351320","code":100,"status":{"battery":99,"online":"on","power":"on"},"message":"success"}]} [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus statusCode: 100 [9/11/2024, 1:44:15 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 & deviceStatus StatusCode: 100 [9/11/2024, 1:44:30 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIRefreshStatus [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus: {"statusCode":100,"body":{"deviceId":"D43533351320","deviceType":"Bot","hubDeviceId":"EA9B61FEFEB4","version":"V6.6","power":"on","battery":99,"deviceMode":"pressMode"},"message":"success"} [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail deviceStatus statusCode: 100 [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail statusCode: 200 & deviceStatus StatusCode: 100 [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail openAPIparseStatus [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail On: false [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail BatteryLevel: 99, StatusLowBattery: 0 [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic TargetDoorState: Open, CurrentDoorState: Open [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail Garage Door On: false [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic BatteryLevel: 99 [9/11/2024, 1:44:31 PM] [SwitchBot] [DEBUG] Bot: Portail updateCharacteristic StatusLowBattery: 0

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bxlouis commented 1 month ago

Commenting to avoid closure.

donavanbecker commented 3 weeks ago

Closing all issues now that v4.0.0 is out. If you are still having an issue after trying v4.0.0, please open a new issue. Keep in mind v4.0.0 has some breaking changes with the config. You will need to re set your config up, however there are some nice added bonuses since you can set settings at a deviceType level or individual level.