homebridge-switchbot: Bug: curtains not updating
Describe The Bug
updated from 0.1.1 to 1.2.5 on raspberry pi: curtain state seems to be constantly updating on the apple home app. Curtain states seem to be VERY unreliable on homebridge. 9 out of 10 the commands to open or close won’t be received. Going back to v0.1.1 solved the problem.
To Reproduce
Update from 0.1.1 to 1.2.5 and back
Expected behavior
Showing the current state of the curtains and execute commands to open or close curtains
Relevant log output
[27.11.2021, 12:09:40] [HB Supervisor] Starting Homebridge with extra flags: -I
[27.11.2021, 12:09:40] [HB Supervisor] Started Homebridge v1.3.8 with PID: 17263
[27.11.2021, 12:09:41] Loaded config.json with 0 accessories and 4 platforms.
[27.11.2021, 12:09:42] Loaded 2 cached accessories from cachedAccessories.
[27.11.2021, 12:09:42] ---
[27.11.2021, 12:09:43] Loaded plugin: homebridge-config-ui-x@4.41.3
[27.11.2021, 12:09:43] Registering platform 'homebridge-config-ui-x.config'
[27.11.2021, 12:09:43] ---
[27.11.2021, 12:09:43] Loaded plugin: homebridge-homematic@0.2.226
[27.11.2021, 12:09:43] Registering platform 'homebridge-homematic.HomeMatic'
[27.11.2021, 12:09:43] ---
[27.11.2021, 12:09:44] Loaded plugin: homebridge-samsung-tizen@5.1.0
[27.11.2021, 12:09:44] Registering platform 'homebridge-samsung-tizen.SamsungTizen'
[27.11.2021, 12:09:44] ---
[27.11.2021, 12:09:44] Loaded plugin: @switchbot/homebridge-switchbot@0.1.1
[27.11.2021, 12:09:44] Registering platform '@switchbot/homebridge-switchbot.SwitchBot'
[27.11.2021, 12:09:44] ---
[27.11.2021, 12:09:44] Loading 4 platforms...
[27.11.2021, 12:09:44] [Config] Initializing config platform...
[27.11.2021, 12:09:44] [Config] Running in Service Mode
[27.11.2021, 12:09:44] [HomeMatic CCU] Initializing HomeMatic platform...
[27.11.2021, 12:09:44] [HomeMatic CCU] [Core] merging configurations
[27.11.2021, 12:09:44] [HomeMatic CCU] Homematic Plugin Version 0.2.226
[27.11.2021, 12:09:44] [HomeMatic CCU] Plugin by thkl https://github.com/thkl
[27.11.2021, 12:09:44] [HomeMatic CCU] Homematic is a registered trademark of the EQ-3 AG
[27.11.2021, 12:09:44] [HomeMatic CCU] Please report any issues to https://github.com/thkl/homebridge-homematic/issues
[27.11.2021, 12:09:44] [HomeMatic CCU] running in production mode
[27.11.2021, 12:09:44] [HomeMatic CCU] will connect to your ccu at 192.168.178.20
[27.11.2021, 12:09:44] [HomeMatic CCU] IMPORTANT !! Starting this version, your homematic custom configuration is located in /var/lib/homebridge/homematic_config.json
[27.11.2021, 12:09:44] [HomeMatic CCU] using subsection Homekit
[27.11.2021, 12:09:44] [HomeMatic CCU] [RPC] using xmprpc for communication with BidCos-RF
[27.11.2021, 12:09:44] [HomeMatic CCU] init RPC for BidCos-RF.
[27.11.2021, 12:09:44] [HomeMatic CCU] [RPC] local ip used : 192.168.178.66. you may change that with local_ip parameter in config
[27.11.2021, 12:09:44] [HomeMatic CCU] init RPC for VirtualDevices.
[27.11.2021, 12:09:44] [HomeMatic CCU] [RPC] local ip used : 192.168.178.66. you may change that with local_ip parameter in config
[27.11.2021, 12:09:44] [HomeMatic CCU] [RPC] using xmprpc for communication with BidCos-Wired
[27.11.2021, 12:09:44] [HomeMatic CCU] init RPC for BidCos-Wired.
[27.11.2021, 12:09:44] [HomeMatic CCU] [RPC] local ip used : 192.168.178.66. you may change that with local_ip parameter in config
[27.11.2021, 12:09:44] [HomeMatic CCU] init RPC for HmIP-RF.
[27.11.2021, 12:09:44] [HomeMatic CCU] [RPC] local ip used : 192.168.178.66. you may change that with local_ip parameter in config
[27.11.2021, 12:09:44] [SamsungTizen] Initializing SamsungTizen platform...
[27.11.2021, 12:09:44] [public@florian-kleinschmidt.de] Initializing SwitchBot platform...
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Using Default Push Rate.
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Loading accessory from cache: Vorhang links Curtain
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Loading accessory from cache: Vorhang rechts Curtain
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] server for interface BidCos-RF. is listening on port 9090.
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] Creating Local HTTP Client for CCU RPC Events
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] server for interface VirtualDevices. is listening on port 9093.
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] Creating Local HTTP Client for CCU RPC Events
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] server for interface BidCos-Wired. is listening on port 9091.
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] Creating Local HTTP Client for CCU RPC Events
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] server for interface HmIP-RF. is listening on port 9092.
[27.11.2021, 12:09:45] [HomeMatic CCU] [RPC] Creating Local HTTP Client for CCU RPC Events
[27.11.2021, 12:09:45] Fernseher 71E9 is running on port 34865.
[27.11.2021, 12:09:45] Please add [Fernseher 71E9] manually in Home app. Setup Code: ((CENSORED))
[27.11.2021, 12:09:45] [HomeMatic CCU] if PONG is PONG CCU is alive
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Total SwitchBot Devices Found: 3
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Total IR Devices Found: 0
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Restoring existing accessory from cache: Vorhang links Curtain DeviceID: C2E5AE13CDBA
[27.11.2021, 12:09:45] [public@florian-kleinschmidt.de] Restoring existing accessory from cache: Vorhang rechts Curtain DeviceID: F0489DFAB664
[27.11.2021, 12:10:00] [HomeMatic CCU] [ServiceClassLoader] There is no service for VIR-LG-ONOFF:VIR-LG-ONOFF-CH
[27.11.2021, 12:10:00] [HomeMatic CCU] [ServiceClassLoader] There is no service for HM-TC-IT-WM-W-EU:SWITCH_TRANSMIT
[27.11.2021, 12:10:00] Initializing platform accessory 'Haustür'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Arbeitszimmer'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Bad'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Esszimmer'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Gästebad'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Kinderzimmer'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Küche'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Wohnzimmer'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Wohnzimmer links'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Wohnzimmer rechts'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Heizung Flur'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Kühlschrank'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Thermostat Wohnzimmer Klima'...
[27.11.2021, 12:10:00] Initializing platform accessory 'Thermostat Wohnzimmer Heizung'...
Setup Payload:
X-HM://((CENSORED))
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ ((CENSORED)) │
└────────────┘
[27.11.2021, 12:10:00] Homebridge v1.3.8 (HAP v0.9.7) (Homebridge D145) is running on port 51805.
[27.11.2021, 12:10:00] [HomeMatic CCU] [Core] will cache ccu response to /var/lib/homebridge/ccu.json
[27.11.2021, 12:10:01] [homebridge-homematic] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 4.5 exceeded minimum of 10. See https://git.io/JtMGR for more info.
[27.11.2021, 12:10:04] [HomeMatic CCU] [Core] NPM 0.2.226 vs Local 0.2.226
[27.11.2021, 12:12:02] [homebridge-homematic] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 4.5 exceeded minimum of 10. See https://git.io/JtMGR for more info.
[27.11.2021, 12:12:54] [homebridge-homematic] This plugin generated a warning from the characteristic 'Target Temperature': characteristic was supplied illegal value: number 4.5 exceeded minimum of 10. See https://git.io/JtMGR for more info.
Config for homebridge-switchbot
{
"name": "((CENSORED))",
"credentials": {
"openToken": "((CENSORED))",
"notice": "Keep your token a secret!"
},
"options": {
"refreshRate": 300
},
"devicediscovery": false,
"platform": "SwitchBot"
}
Screenshots
No response
Device & Model
SwitchBot HubMini + CurtainBots
Node.js Version
v16.13.0
NPM Version
v6.14.15
Homebridge Version
v1.3.8
Homebridge Switchbot Plugin Version
v0.1.1
Homebridge Config UI X Plugin Version
v4.41.3
Operating System
Raspbian
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 43 (2 by maintainers)
Commits related to this issue
- v1.11.0 ## [Version 1.11.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.11.0) (2022-01-29) ## What's Changed * Add Support for SwitchBot Smart Lock * Add Support for Switc... — committed to OpenWonderLabs/homebridge-switchbot by donavanbecker 2 years ago
- v1.11.0 (#228) ## [Version 1.11.0](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.11.0) (2022-01-29) ## What's Changed * Add Support for SwitchBot Smart Lock * Add Suppor... — committed to OpenWonderLabs/homebridge-switchbot by donavanbecker 2 years ago
- v1.12.2 ## [Version 1.12.2](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.12.2) (2022-02-02) ## What's Changed - Fix: Issue where `PositionState` was not being sent back to... — committed to OpenWonderLabs/homebridge-switchbot by donavanbecker 2 years ago
- Version 1.12.2 (#240) ## [Version 1.12.2](https://github.com/OpenWonderLabs/homebridge-switchbot/releases/tag/v1.12.2) (2022-02-02) ## What's Changed - Fix: Issue where `PositionState` was not ... — committed to OpenWonderLabs/homebridge-switchbot by donavanbecker 2 years ago
- v2.11.0 # Changelog All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/) ## [Version 2.11.0](https://github.com/OpenWond... — committed to OpenWonderLabs/homebridge-switchbot by donavanbecker 8 months ago
Similar stuff to #85. v0.1.1 works perfectly, and everything from 1.0 forward seems unreliable.
Latest version works… flawlessly! I just tested it here. @dnicolson thank you so much, you’re my hero! And @donavanbecker thank you for being so patient with this issue.
I tried version
1.12.3-beta.5and it hasn’t resolved the issue. I’m fairly confident that the state and position are being set correctly from my testing, that doesn’t appear to be the issue. Even though you don’t see “Opening…” you see the loading spinner.Maybe it’s a bug in the Home app that doesn’t show “Opening…” correctly with the addition of the light sensor, but @donavanbecker you do not see the issue?
1.12.2-beta.1:
1.12.3-beta.5:
@gvssr I can confirm your issue is different and it seems that it was introduced with
1.0.3-beta.5, https://github.com/OpenWonderLabs/homebridge-switchbot/pull/239 should fix it.I can confirm that version 0.1.1 does not have the issue (although BLE was not working).
The problem appears to have been introduced in version 0.1.2-beta.1, it’s related to the light sensor. Removing the following lines in the latest code appears to resolve the issue: https://github.com/OpenWonderLabs/homebridge-switchbot/blob/dedabb43754f837c43d1d7ff3fbfc40e00d46877/src/device/curtain.ts#L121-L135
@donavanbecker can you also make homebridge-switchbot-openapi available again? There is a broken image in the Homebridge SwitchBot BLE settings that is hosted on GitHub.
I don’t believe it’s a Homebridge UI issue. In the Home app the “Opening…” and “Closing…” states never appear, it always changes immediately to “Open” or “Closed”. In Homebridge UI the “Opening…” and “Closing…” states never change to “Open” or “Closed”.
The homebridge-switchbot-ble works in both the Home app and Homebridge UI. Is it possible to restore the GitHub repository for this? It makes it easier to see the old code to fix these issues.