sputnikdev / eclipse-smarthome-bluetooth-binding

Eclipse SmartHome Bluetooth Binding
46 stars 10 forks source link

Xiaomi temp and humidity sensor : no temperature, humidity and battery level is shown #82

Open knopserl opened 5 years ago

knopserl commented 5 years ago

I have seen similar issues already posted but all closed. I'm using RPi 3B+, latest openhabian (2.4.0-1), latest bluetooth-binding and bluetooth-bluegiga binding and a bluegiga adapter (/dev/ttyACM0) and adapter is online and finds the Xiaomi Mijia Temperatur / Humidity sensor (with LCD), MJ_HT_V1 and it shows some values but no temp, hum or battery. I have used simple link and followed the hints from the other closed issues. The bluegiga adapter does not use BT driver but uses the serial adapter. The bluetooth package is 5.43 (yesterday I had also a fresh compiled 5.47 which was today overwritten with 5.43 by any install script, but I think this is not the problem) I ahve attached the screenshot of paper-ui. Maybe somebody has some quick hints or knows this problem already. I have 3 of this devices and it would be good to get it working. I also get subsequent BT devices in the inbox which names like MAC addresses. Don't where this comes (but that problem has less prio). xiaomi-mj_ht_v1

knopserl commented 5 years ago

now I have installed the gatt packages (as decribed) and reinstalled the esh bluetooth bindig and esh blue-giga binding and the serial binding and the BlueGiga Bluetooth Dongle is online and detects several BLE devices as well as the MJ_HT_V1 but now only the RSSI channel is detected/offered. any help would be very kind.

image

image

not sure if it has todo with this gatt error (during runtime) 2019-02-18 01:29:42.488 [WARN ] [pec.BluetoothGattSpecificationReader] - Characteristic "Bond Management Control Point" is not valid neither for read nor for write operation due to unfulfilled requirements: read ([Conditional]) write ([Conditional]).

2019-02-18 01:29:42.520 [ERROR] [.eclipse.smarthome.binding.bluetooth] - bundle org.sputnikdev.org.eclipse.smarthome.binding.bluetooth:1.1.6 (249)[binding.bluetooth(295)] : The activate method has thrown an exception

java.lang.NullPointerException: null

at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.validate(BluetoothGattSpecificationReader.java:304) ~[?:?]

at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.addCharacteristic(BluetoothGattSpecificationReader.java:294) ~[?:?]

at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.readCharacteristics(BluetoothGattSpecificationReader.java:384) ~[?:?]
darkfader commented 5 years ago

I have the same problem. It just cannot validate one of the files and it doesn't give a clue where. It should just skip it then?

robygi commented 5 years ago

Hi, I have more or less the same issue. The Xiaomi temp and humidity sensor is not discoverd correctly. No temperature, humidity or battery channels. I have the same channels you post above. Did you find a way to solve the problem? I posted a message here https://community.openhab.org/t/3rd-party-bluetooth-binding-beta-testers-needed/38492/1024 but nobody is answering.

darkfader commented 5 years ago

Perhaps it's a non-issue? I just tried again without any custom characteristics folder defined and it just worked... ?! Number AT_Bedroom_Humidity "Vochtigheid [%s %%]" <humidity> (gBedroom, gHumidity) ["Humidity"] { channel="bluetooth:ble:3F59C881308F:FE95-FE95-humidity" } Number AT_Bedroom_Temperature "Temperatuur [%.1f °C]" <temperature> (gBedroom, gTemperature) ["Temperature"] { channel="bluetooth:ble:3F59C881308F:FE95-FE95-temperature" } Note that it can take a while for either attribute to appear. Also, I did update the sensor to the latest version recently. (but can't imagine that changed much)