Closed Aladin2310 closed 1 week ago
I just found v3.6.1-beta.15 to install but it still doesn´t work. Do you need any logs?
Logs are always helpful. Especially debug.
Setup Payload:
X-HM://002528UVCDNIK
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ XXXXXXXXXX │
└────────────┘
[15/07/2024, 12:16:59] Homebridge v1.8.4-beta.25 (HAP v0.12.2) (Homebridge 32CD) is running on port 51528.
[15/07/2024, 12:16:59]
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
[15/07/2024, 12:17:06] [SwitchBot] Total SwitchBot Devices Found: 2
[15/07/2024, 12:17:06] [SwitchBot] Total IR Devices Found: 2
[15/07/2024, 12:17:06] [SwitchBot] Loading external accessory: TV deviceId: XXXXXXXXXX
[15/07/2024, 12:17:06] [SwitchBot] Loading external accessory: Lautsprecher deviceId: XXXXXXXXXX
[15/07/2024, 12:17:06] [SwitchBot] Restoring existing accessory from cache: PC deviceId: XXXXXXXXXX
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Device Config Logging: debug
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Platform Config refreshRate: 120, Default updateRate: 5, Platform Config pushRate: 0.1
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Default Max Retries: 5, Default Delay Between Retries: 3000
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Config: {"logging":"debug","connectionType":"OpenAPI","mode":"press","deviceType":"switch","allowPush":true,"doublePress":2}
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Model: SwitchBot S1, BLE Model: H, BLE Model Name: WoHand, BLE Model Friendly Name: Bot
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Default MQTT URL: , Default mqttOptions: {}, Default mqttPubOptions: {}
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Device Type: switch, from Accessory Cache.
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Displaying as Switch
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Fan Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Lock Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Door Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Faucet Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Outlet Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Window Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Garage Door Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Window Covering Service
[15/07/2024, 12:17:06] [SwitchBot] Bot: PC Removing any leftover Stateful Programmable Switch Service
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Retrieve initial values and update Homekit
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC openAPIRefreshStatus
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Registering Webhook Event Handler
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC is not listening webhook.
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Firmware Version: 3.6.1
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC version: 3.6.1
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Bot Mode: switch, from Accessory Cache.
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Double Press: 1, from Accessory Cache.
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Push Rate Press: 15, from Accessory Cache.
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Using Allow Push: false
[15/07/2024, 12:17:06] [SwitchBot] [DEBUG] Bot: PC Multi Press Count: 0
[15/07/2024, 12:17:08] TV 807A is running on port 37133.
[15/07/2024, 12:17:08] Please add [TV 807A] manually in Home app. Setup Code: XXXXXXXXXX
[15/07/2024, 12:17:08] Lautsprecher 2D9C is running on port 39479.
[15/07/2024, 12:17:08] Please add [Lautsprecher 2D9C] manually in Home app. Setup Code: XXXXXXXXXX
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"XXXXXXXXXX","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.8","power":"off","battery":95,"deviceMode":"pressMode"},"message":"success"}
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"XXXXXXXXXX","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.8","power":"off","battery":95,"deviceMode":"pressMode"},"message":"success"}
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC openAPIparseStatus
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC (power, battery, deviceMode) = API:(off, 95, switch), current:(false, 95, switch)
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC On: false
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC BatteryLevel: 95
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC StatusLowBattery: 0
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC Firmware Version: 4.8
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC version: 4.8
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC updateHomeKitCharacteristics
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic BatteryLevel: 95
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic StatusLowBattery: 0
[15/07/2024, 12:17:13] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic On: false
[15/07/2024, 12:17:27] [SwitchBot] [DEBUG] Bot: PC Set On: true
[15/07/2024, 12:17:27] [SwitchBot] [DEBUG] Bot: PC openAPIpushChanges
[15/07/2024, 12:17:27] [SwitchBot] [DEBUG] Bot: PC Switch Mode, Command: turnOn
[15/07/2024, 12:17:28] [SwitchBot] [DEBUG] Bot: PC Sending request to SwitchBot API, body: {"command":"turnOn","parameter":"default","commandType":"command"},
[15/07/2024, 12:17:29] [SwitchBot] [DEBUG] Bot: PC statusCode: 200, deviceStatus: {"statusCode":100,"body":{"items":[{"deviceID":"XXXXXXXXXX","code":100,"status":{"battery":95,"power":"on"},"message":"ok"}]},"message":"success"}
[15/07/2024, 12:17:29] [SwitchBot] [DEBUG] Bot: PC statusCode: 200, deviceStatus: {"statusCode":100,"body":{"items":[{"deviceID":"XXXXXXXXXX","code":100,"status":{"battery":95,"power":"on"},"message":"ok"}]},"message":"success"}
[15/07/2024, 12:17:29] [SwitchBot] [DEBUG] Bot: PC updateHomeKitCharacteristics
[15/07/2024, 12:17:29] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic BatteryLevel: 95
[15/07/2024, 12:17:29] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic StatusLowBattery: 0
[15/07/2024, 12:17:29] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic On: true
[15/07/2024, 12:17:44] [SwitchBot] [DEBUG] Bot: PC openAPIRefreshStatus
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"XXXXXXXXXX","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.8","power":"off","battery":95,"deviceMode":"pressMode"},"message":"success"}
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC statusCode: 200, deviceStatus: {"statusCode":100,"body":{"deviceId":"XXXXXXXXXX","deviceType":"Bot","hubDeviceId":"XXXXXXXXXX","version":"V4.8","power":"off","battery":95,"deviceMode":"pressMode"},"message":"success"}
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC openAPIparseStatus
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC (power, battery, deviceMode) = API:(off, 95, switch), current:(false, 95, switch)
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC On: false
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC BatteryLevel: 95
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC StatusLowBattery: 0
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC Firmware Version: 4.8
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC version: 4.8
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC updateHomeKitCharacteristics
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic BatteryLevel: 95
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic StatusLowBattery: 0
[15/07/2024, 12:17:46] [SwitchBot] [DEBUG] Bot: PC updateCharacteristic On: false
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"name": "SwitchBot",
"credentials": {
"token": "XXXXXXXXXX",
"secret": "XXXXXXXXXX",
"notice": "Keep your Token & Secret a secret!"
},
"options": {
"devices": [
{
"deviceId": "XXXXXXXXXX",
"configDeviceName": "PC",
"configDeviceType": "Bot",
"connectionType": "OpenAPI",
"bot": {
"mode": "press",
"deviceType": "switch",
"allowPush": true,
"doublePress": 2
},
"external": false,
"logging": "debug"
}
]
},
"platform": "SwitchBot"
}
]
I have managed to install version 3.4.0 and the bot works there. When switching from off to on in Homebridge, the bot is pressed once and when switching from on to off, it is also pressed once. But somehow this doesn't work in the newer versions
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.
Describe Your Problem
Bot does not act as a switch. It presses the button once, which is correct, but switches itself off again in Homebridge and Homekit.
Relevant log output
Screenshots
No response
Device & Model
Bot S1
Node.js Version
v20.15.1
NPM Version
v10.7.0
Homebridge Version
v1.8.3
Homebridge SwitchBot Plugin Version
v3.6.1-beta
Homebridge Config UI X Plugin Version
v4.56.4
Operating System
Raspbian