fantasytu / homebridge-mijia-thermometer

Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
Apache License 2.0
25 stars 2 forks source link

Cannot read properties of null (reading 'buffer') and Homebridge get in a bootloop #11

Open gaborszello opened 9 months ago

gaborszello commented 9 months ago

Describe The Bug: Cannot read properties of null (reading 'buffer') and Homebridge get in a bootloop

Logs:

[29/11/2023, 17:09:13] [Temperature & Humidity] Device Info cached!
[29/11/2023, 17:09:13] TypeError: Cannot read properties of null (reading 'buffer')
    at Gatt.onAclStreamEncrypt (/var/lib/homebridge/node_modules/homebridge-mijia-thermometer-fix/node_modules/@abandonware/noble/lib/hci-socket/gatt.js:157:40)
    at AclStream.emit (node:events:514:28)
    at AclStream.pushEncrypt (/var/lib/homebridge/node_modules/homebridge-mijia-thermometer-fix/node_modules/@abandonware/noble/lib/hci-socket/acl-stream.js:40:8)
    at NobleBindings.onEncryptChange (/var/lib/homebridge/node_modules/homebridge-mijia-thermometer-fix/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:290:15)
    at Hci.emit (node:events:514:28)
    at Hci.onSocketData (/var/lib/homebridge/node_modules/homebridge-mijia-thermometer-fix/node_modules/@abandonware/noble/lib/hci-socket/hci.js:565:12)
    at BluetoothHciSocketWrapped.emit (node:events:514:28)
[29/11/2023, 17:09:13] Got SIGTERM, shutting down Homebridge...

Plugin Config:

{
    "bridge": {
        "name": "Homebridge 5A99",
        "username": "@@@@@@@@",
        "port": "@@@@@",
        "pin": "@@@@@@@@",
        "advertiser": "avahi"
    },
    "accessories": [
        {
            "accessory": "Samsung Air Conditioner",
            "name": "Bedroom AC",
            "ip_address": "@@@@@@@@",
            "mac": "@@@@@@@@",
            "token": "@@@@@@@@"
        },
        {
            "accessory": "Samsung Air Conditioner",
            "name": "Living room AC",
            "ip_address": "@@@@@@@@",
            "mac": "@@@@@@@@",
            "token": "@@@@@@@@"
        },
        {
            "name": "Temperature & Humidity",
            "address": "@@@@@@@@",
            "bindKey": "@@@@@@@@",
            "temperatureName": "Temperature",
            "humidityName": "Humidity",
            "lowBattery": 10,
            "temperatureOffset": 0,
            "humidityOffset": 0,
            "accessory": "MijiaThermometer"
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": "@@@@",
            "auth": "form",
            "theme": "auto",
            "tempUnits": "c",
            "lang": "en",
            "platform": "config"
        },
        {
            "name": "Linak Platform",
            "pollingRate": 20,
            "idasenControllerPath": "/home/homebridge/.local/bin/idasen-controller",
            "desks": [
                {
                    "name": "IKEA Idasen",
                    "macAddress": "@@@@@@@@",
                    "baseHeight": 620,
                    "movementRange": 1270
                }
            ],
            "platform": "LinakController"
        }
    ]
}

Screenshots:

Képernyőfotó 2023-11-29 - 17 16 49

Environment: