Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Motion Sensor is always showing "Detected" no matter if there is a movement or not #1156

Open
semih-akbas opened this issue Dec 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working stale

Comments

@semih-akbas
Copy link

Describe the Bug

Motion Sensor is always showing "Detected" no matter if there is a movement or not. It never turns back to No motion detected on Hombridge. In the mobile app it is showing correctly. So I cannot use switchbot motion sensor on my homekit automations :(

To Reproduce

Motion sensor is always showing as Detected, so you don't need to do anything

Expected Behavior

It should turn back to "No motion detected" after a while when there is no real motion detected.

Relevant Log Output

Right after restarting homebridge:
[30/12/2024, 11:21:11] [SwitchBot] [DEBUG] [parseAdvertising.d9762aec38b2.s] return {"id":"d9762aec38b2","address":"d9:76:2a:ec:38:b2","rssi":-75,"serviceData":{"model":"s","modelName":"WoMotion","modelFriendlyName":"Motion Sensor","tested":false,"movement":true,"battery":0,"led":0,"iot":0,"sense_distance":1,"lightLevel":"bright","is_light":true}}


[30/12/2024, 11:21:17] [SwitchBot] [DEBUG] Discovered Motion Sensor: D9762AEC38B2
[30/12/2024, 11:21:17] [SwitchBot] [DEBUG] Device: Hareket registerDevice: true
[30/12/2024, 11:21:17] [SwitchBot] [DEBUG] Device: Hareket connectionType: OpenAPI, will display in HomeKit
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Using Debug Mode Logging: debugMode
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Using Platform Config refreshRate: 360, Platform Config updateRate: 5, Platform Config pushRate: 1
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Using Platform Max Retries: 5
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Using Platform Delay Between Retries: 3
[30/12/2024, 11:21:17] [SwitchBot] [DEBUG] Motion Sensor: Hareket Config: {"connectionType":"OpenAPI"}
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Model: W1101500, BLE Model: s, BLE Model Name: WoMotion, BLE Model Friendly Name: undefined
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Firmware Version: 4.1.7
[30/12/2024, 11:21:17] [SwitchBot] [DEBUG] Motion Sensor: Hareket version: 4.1.7
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Using Default MQTT URL: , Default mqttOptions: {}, Default mqttPubOptions: {}
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Retrieve initial values and update Homekit
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket openAPIRefreshStatus
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Registering Webhook Event Handler
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket is not listening webhook.
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket Registering Platform BLE Event Handler
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket registerPlatformBLE
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket is listening to Platform BLE.
[30/12/2024, 11:21:17] [SwitchBot] Motion Sensor: Hareket bleMac: d9:76:2a:ec:38:b2


[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket received BLE: {"model":"s","modelName":"WoMotion","modelFriendlyName":"Motion Sensor","tested":false,"movement":true,"battery":0,"led":0,"iot":0,"sense_distance":1,"lightLevel":"bright","is_light":true}
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket BLEparseStatus
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket (moveDetected) = BLE: (true), current: (true)
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket MotionDetected: true
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket LightLevel: 6001, set_minLux: 1, set_maxLux: 6001, spaceBetweenLevels: 2, numberOfLevels: 3
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket CurrentAmbientLightLevel: 18000000, LightLevel: 6001, set_minLux: 1, set_maxLux: 6001
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket LightLevel: bright, CurrentAmbientLightLevel: 18000000
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket BatteryLevel: 0
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket StatusLowBattery: 1
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket updateCharacteristic MotionDetected: true
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket MotionDetected context before: true
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket MotionDetected context after: true
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket updateCharacteristic BatteryLevel: 0
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket BatteryLevel context before: 0
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket BatteryLevel context after: 0
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket updateCharacteristic StatusLowBattery: 1
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket StatusLowBattery context before: 1
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket StatusLowBattery context after: 1
[30/12/2024, 11:21:46] [SwitchBot] Motion Sensor: Hareket updateCharacteristic CurrentAmbientLightLevel: 18000000
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket CurrentAmbientLightLevel context before: 18000000
[30/12/2024, 11:21:46] [SwitchBot] [DEBUG] Motion Sensor: Hareket CurrentAmbientLightLevel context after: 18000000

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "MYTOKEN",
                "secret": "MYSECRET",
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "BLE": true,
                "discoverBLE": true,
                "disableLogsforBLE": false,
                "disableLogsforOpenAPI": false,
                "maxRetries": 5,
                "delayBetweenRetries": 3,
                "refreshRate": 360,
                "updateRate": 5,
                "pushRate": 1,
                "logging": "debug",
                "allowInvalidCharacters": true
            },
            "platform": "SwitchBot"
        },

Screenshots

image

Device and Model

Raspberry Pi 3 Model B Plus Rev 1.3

Node.js Version

v22.12.0

NPM Version

v10.9.0

Homebridge Version

v1.8.5

Homebridge Switchbot Plugin Version

v4.1.7

Homebridge Config UI X Plugin Version

v4.67.0

Operating System

Debian GNU/Linux Bookworm (12)

Copy link
Contributor

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.

@github-actions github-actions bot added the stale label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

6 participants