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

Error: TypeError: Cannot read properties of undefined (reading 'data) LYWSD03MMC #7

Open AndyLoginov opened 2 years ago

AndyLoginov commented 2 years ago

Describe Your Problem: Error: TypeError: Cannot read properties of undefined (reading 'data) LYWSD03MMC

Logs:

[2/5/2022, 3:59:44 PM] [Temperature & Humidity] Error: TypeError: Cannot read properties of undefined (reading 'data')

Plugin Config:

"bridge": { "name": "Homebridge 9322", "username": "@@@@@@@@", "port": 51550, "pin": "xxxxxxxxx" }, "accessories": [ { "name": "Temperature & Humidity", "address": "xxxxxxxxxxxxx", "temperatureName": "Temperature", "humidityName": "Humidity", "lowBattery": 10, "temperatureOffset": 0, "humidityOffset": 0, "accessory": "MijiaThermometer" } ], "platforms": [ { "name": "Config", "port": 8581, "platform": "config" }, { "name": "eWeLink", "username": "*****", "password": "0000000", "mode": "auto", "language": "en", "platform": "eWeLink" } ] } Screenshots:

Снимок экрана 2022-02-05 в 15 50 19

Environment:

Npm v8.1.2

TNX

fantasytu commented 2 years ago

bindKey is absolutely necessary to decrypt BLE data. You can get the bindKey like this post https://github.com/mKeRix/room-assistant/issues/277

olli1337 commented 2 years ago

Hey,

I set the Adversiting type: "MIJIA" & "AdFlags": true and I suddenly got rid of this error.. Maybe you could look into it also?