hannseman / homebridge-mi-hygrothermograph

Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
MIT License
267 stars 52 forks source link

Devices timeout and never recover #83

Closed 400HPMustang closed 4 years ago

400HPMustang commented 4 years ago

Expected Behavior

Launch homebridge, devices are discovered, devices report back to homebridge without timing out. If they do timeout they would eventually recover.

Current Behavior

Launch homebridge, devices are discovered, devices report back to homebridge for about 3 minutes and then timeout, never recover. Restarting homebridge results in the same

Steps to Reproduce (for bugs)

Versions

Configuration

{
            "name": "Bottom Shelf",
            "address": "58:2d:34:36:ae:ef",
            "temperatureName": "Temperature",
            "humidityName": "Humidity",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": true,
            "forceDiscoveringDelay": 900,
            "disableBatteryLevel": true,
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0,
            "accessory": "Hygrotermograph"
        },
        {
            "name": "Top Shelf",
            "address": "58:2d:34:36:b7:9d",
            "temperatureName": "Temperature",
            "humidityName": "Humidity",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": true,
            "forceDiscoveringDelay": 900,
            "disableBatteryLevel": true,
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0,
            "accessory": "Hygrotermograph"
        }

Homebridge Log / Command Output

[11/21/2019, 6:25:18 AM] [Config] Homebridge Config UI X v4.6.3 is listening on :: port 8008
[11/21/2019, 6:48:27 AM] [Top Shelf] [58:2d:34:36:b7:9d] Timed out, last update: 2019-11-21T12:28:11.008Z
[11/21/2019, 6:48:27 AM] [Top Shelf] [58:2d:34:36:b7:9d] Timed out, last update: 2019-11-21T12:28:11.008Z
[11/21/2019, 6:48:27 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Timed out, last update: 2019-11-21T12:28:05.536Z
[11/21/2019, 6:48:27 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Timed out, last update: 2019-11-21T12:28:05.536Z
[11/21/2019, 6:48:27 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Timed out, last update: 2019-11-21T12:28:05.536Z
[11/21/2019, 6:48:31 AM] [Top Shelf] [58:2d:34:36:b7:9d] Timed out, last update: 2019-11-21T12:28:11.008Z
[11/21/2019, 6:48:31 AM] [Top Shelf] [58:2d:34:36:b7:9d] Timed out, last update: 2019-11-21T12:28:11.008Z

This just keeps going....

    Line 67: [11/21/2019, 6:25:16 AM] [Bottom Shelf] Initializing Hygrotermograph accessory...
    Line 68: [11/21/2019, 6:25:16 AM] [Bottom Shelf] Initialized accessory
    Line 69: [11/21/2019, 6:25:16 AM] [Top Shelf] Initializing Hygrotermograph accessory...
    Line 70: [11/21/2019, 6:25:16 AM] [Top Shelf] Initialized accessory
    Line 132: [11/21/2019, 6:25:16 AM] [Bottom Shelf] Stop scanning. (poweredOff)
    Line 133: [11/21/2019, 6:25:16 AM] [Top Shelf] Stop scanning. (poweredOff)
    Line 146: [11/21/2019, 6:25:17 AM] [Bottom Shelf] Stopped scanning.
    Line 147: [11/21/2019, 6:25:17 AM] [Top Shelf] Stopped scanning.
    Line 162: [11/21/2019, 6:25:17 AM] [Bottom Shelf] Start scanning.
    Line 163: [11/21/2019, 6:25:17 AM] [Top Shelf] Start scanning.
    Line 192: [11/21/2019, 6:25:17 AM] [Bottom Shelf] Started scanning.
    Line 193: [11/21/2019, 6:25:17 AM] [Top Shelf] Started scanning.
    Line 330: [11/21/2019, 6:25:19 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Discovered peripheral
    Line 335: [11/21/2019, 6:25:19 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Temperature: 19.2C
    Line 336: [11/21/2019, 6:25:19 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Humidity: 70.4%
    Line 355: [11/21/2019, 6:25:22 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 360: [11/21/2019, 6:25:22 AM] [Top Shelf] [58:2d:34:36:b7:9d] Temperature: 19.2C
    Line 361: [11/21/2019, 6:25:22 AM] [Top Shelf] [58:2d:34:36:b7:9d] Humidity: 70.3%
    Line 370: [11/21/2019, 6:25:23 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Discovered peripheral
    Line 375: [11/21/2019, 6:25:23 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Battery level: 100%
    Line 376: [11/21/2019, 6:25:26 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 381: [11/21/2019, 6:25:26 AM] [Top Shelf] [58:2d:34:36:b7:9d] Battery level: 100%
    Line 656: [11/21/2019, 6:25:39 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Discovered peripheral
    Line 661: [11/21/2019, 6:25:39 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Temperature: 19.2C
    Line 662: [11/21/2019, 6:25:39 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Humidity: 70.3%
    Line 671: [11/21/2019, 6:25:41 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Discovered peripheral
    Line 676: [11/21/2019, 6:25:41 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Temperature: 19.1C
    Line 677: [11/21/2019, 6:25:41 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Humidity: 70.2%
    Line 679: [11/21/2019, 6:25:42 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 684: [11/21/2019, 6:25:42 AM] [Top Shelf] [58:2d:34:36:b7:9d] Temperature: 19.2C
    Line 693: [11/21/2019, 6:25:44 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 698: [11/21/2019, 6:25:44 AM] [Top Shelf] [58:2d:34:36:b7:9d] Temperature: 19.3C
    Line 699: [11/21/2019, 6:25:44 AM] [Top Shelf] [58:2d:34:36:b7:9d] Humidity: 70.4%
    Line 700: [11/21/2019, 6:25:44 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 705: [11/21/2019, 6:25:44 AM] [Top Shelf] [58:2d:34:36:b7:9d] Temperature: 19.3C
    Line 706: [11/21/2019, 6:25:44 AM] [Top Shelf] [58:2d:34:36:b7:9d] Humidity: 70.4%
    Line 845: [11/21/2019, 6:25:56 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 850: [11/21/2019, 6:25:56 AM] [Top Shelf] [58:2d:34:36:b7:9d] Battery level: 100%
    Line 896: [11/21/2019, 6:25:58 AM] [Top Shelf] [58:2d:34:36:b7:9d] Discovered peripheral
    Line 901: [11/21/2019, 6:25:58 AM] [Top Shelf] [58:2d:34:36:b7:9d] Temperature: 19.3C
    Line 902: [11/21/2019, 6:25:58 AM] [Top Shelf] [58:2d:34:36:b7:9d] Humidity: 70.4%
    Line 1041: [11/21/2019, 6:26:03 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Discovered peripheral
    Line 1046: [11/21/2019, 6:26:03 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Temperature: 19.2C
    Line 1047: [11/21/2019, 6:26:03 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Humidity: 70.3%
    Line 1138: [11/21/2019, 6:26:07 AM] [Bottom Shelf] [58:2d:34:36:ae:ef] Discovered peripheral
400HPMustang commented 4 years ago

I've been messing with this all morning and it's pretty much the same...Start homebridge and the hygrometers come up. After about 20 minutes the hygrometers stop responding and get the timeout messages in the console. Nothing of note in the actual logs though other than at the same time they stop timing out, I stop seeing "Discovered peripheral" in the log and the devices of course stop showing readings in homekit. It's weird because I'd think if it were an issue with the hygrometers communicating with the computer they wouldn't come right back up on a restart.

Thanks for looking!

400HPMustang commented 4 years ago

As it turns out I have this adapter. I'm going to go out on a limb and say this might be part of the problem.

image

400HPMustang commented 4 years ago

Yep. That was it...the Asus BT-400 adapter causes the same random issue in Windows.