hannseman / homebridge-mi-hygrothermograph

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

LYWSD02MMC The value of "offset" is out of range #128

Closed briantang1117 closed 3 years ago

briantang1117 commented 3 years ago

Current Behavior

no work

Steps to Reproduce (for bugs)

reboot Homebridge

Versions

Configuration

"accessories": [
        {
            "name": "Temperature & Humidity",
            "temperatureName": "Temperature",
            "address": "3F:5B:7D:81:08:5C",
            "humidityName": "Humidity",
            "fakeGatoEnabled": false,
            "timeout": 15,
            "forceDiscovering": true,
            "forceDiscoveringDelay": 2500,
            "disableBatteryLevel": false,
            "lowBattery": 20,
            "temperatureOffset": 0,
            "humidityOffset": 0,
            "accessory": "Hygrotermograph"
        }
    ]

Homebridge Log / Command Output

[1/22/2021, 11:03:22 AM] [Temperature & Humidity] RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 14. Received 15
    at boundsError (internal/buffer.js:83:9)
    at Buffer.readInt16LE (internal/buffer.js:411:5)
    at Parser.parseTemperatureEvent (/homebridge/node_modules/homebridge-mi-hygrothermograph/lib/parser.js:235:32)
    at Parser.parseEventData (/homebridge/node_modules/homebridge-mi-hygrothermograph/lib/parser.js:205:21)
    at Parser.parse (/homebridge/node_modules/homebridge-mi-hygrothermograph/lib/parser.js:64:23)
    at Scanner.parseServiceData (/homebridge/node_modules/homebridge-mi-hygrothermograph/lib/scanner.js:171:52)
    at Scanner.onDiscover (/homebridge/node_modules/homebridge-mi-hygrothermograph/lib/scanner.js:92:25)
    at Noble.emit (events.js:315:20)
    at Noble.onDiscover (/homebridge/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/noble/lib/noble.js:196:10)
    at NobleBindings.emit (events.js:315:20) {
  code: 'ERR_OUT_OF_RANGE'
}
hannseman commented 3 years ago

Duplicate of https://github.com/hannseman/homebridge-mi-hygrothermograph/issues/125