AlCalzone / ioBroker.ble

Monitor Bluetooth Low Energy beacons
MIT License
41 stars 15 forks source link

Add new variant of Xiaomi device MJ_HT_V1 to MacPrefixes #51

Closed thatso closed 5 years ago

thatso commented 5 years ago

According to /src/plugins/lib/xiaomi_protocol.ts line 30, currently only the MAC 4c:65:a8 is recognized for Xiaomi Mijia temperature sensors by the BLE adapter 0.7.0 for ioBroker:

MiTemperature: "4c:65:a8"

Today I've received two Xiaomi Mijia Hygrothermographs like this:

Xiaomi

One of them has a MAC starting with 4c:65:a8 and was instantly recognized with correct readouts for battery, temperature, humidity and rssi. However, the other one has a MAC starting with 58:2d:34. While both of them identify as MJ_HT_V1, the latter is not recognized by the Xiaomi plugin. See debug log:

2019-03-22 19:27:45.005 - debug: ble.0 discovered peripheral 4c:65:a8:xx:xx:xx 2019-03-22 19:27:45.006 - debug: ble.0 has advertisement: true 2019-03-22 19:27:45.006 - debug: ble.0 has serviceData: true 2019-03-22 19:27:45.006 - debug: ble.0 serviceData = [{"uuid":"fe95","data":{"type":"Buffer","data":[80,32,170,1,172,223,118,220,168,101,76,13,16,4,221,0,99,1]}},{"uuid":"ffff","data":{"type":"Buffer","data":[195,109,167,31,137,253]}}] 2019-03-22 19:27:45.007 - debug: ble.0 plugin Xiaomi is handling 4c:65:a8:xx:xx:xx 2019-03-22 19:27:45.013 - debug: ble.0 updating rssi state for 4c:65:a8:xx:xx:xx 2019-03-22 19:27:45.027 - debug: ble.0 xiaomi >> got data: 5020aa01acdf76dca8654c0d1004dd006301 2019-03-22 19:27:45.028 - debug: ble.0 xiaomi >> got humidity update => 35.5 2019-03-22 19:27:45.028 - debug: ble.0 xiaomi >> got temperature update => 22.1 2019-03-22 19:27:45.031 - debug: ble.0 4c:65:a8:xx:xx:xx > got values: {"humidity":35.5,"temperature":22.1} 2019-03-22 19:27:45.031 - debug: ble.0 setting state ble.0.4c:65:a8:xx:xx:xx.humidity 2019-03-22 19:27:45.039 - debug: ble.0 setting state ble.0.4c:65:a8:xx:xx:xx.temperature 2019-03-22 19:27:45.062 - debug: ble.0 discovered peripheral 58:2d:34:xx:xx:xx 2019-03-22 19:27:45.063 - debug: ble.0 has advertisement: true 2019-03-22 19:27:45.063 - debug: ble.0 has serviceData: true 2019-03-22 19:27:45.064 - debug: ble.0 serviceData = [{"uuid":"fe95","data":{"type":"Buffer","data":[80,32,170,1,163,83,135,48,52,45,88,13,16,4,239,0,65,1]}},{"uuid":"ffff","data":{"type":"Buffer","data":[234,40,41,240,30,146]}}] 2019-03-22 19:27:45.064 - debug: ble.0 plugin _default is handling 58:2d:34:xx:xx:xx 2019-03-22 19:27:45.070 - debug: ble.0 _default: 58:2d:34:xx:xx:xx > got data 5020aa01a3538730342d580d1004ef004101 for fe95 2019-03-22 19:27:45.071 - debug: ble.0 _default: 58:2d:34:xx:xx:xx > got data ea2829f01e92 for ffff 2019-03-22 19:27:45.074 - debug: ble.0 58:2d:34:xx:xx:xx > got values: {"services.fe95":"5020aa01a3538730342d580d1004ef004101","services.ffff":"ea2829f01e92"} 2019-03-22 19:27:45.075 - debug: ble.0 setting state ble.0.58:2d:34:xx:xx:xx.services.fe95 2019-03-22 19:27:45.095 - debug: ble.0 setting state ble.0.58:2d:34:xx:xx:xx.services.ffff

AlCalzone commented 5 years ago

The fixed version will be released soon

thatso commented 5 years ago

@AlCalzone : thank you for the fast update. I see you have released the new version 0.7.2 on 05.04.2019. However, it still does not show up as available for me. I admit I'm not familiar with the mechanics behind releases. Do I just have to wait some more days?

AlCalzone commented 5 years ago

Which repo do you have configured in iobroker? Stable or latest? The new version will only show up in stable after a while of testing when I manually promote it to stable

thatso commented 5 years ago

I'm not sure. These are my current settings:

repositories