openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.55k forks source link

[shelly] BLU HT - sensor channels missing #16736

Closed ijasan closed 2 weeks ago

ijasan commented 1 month ago

Binding version: SNAPSHOT 4.2.0.202404071245

The BLU HT device only shows the standard channels after discovery. The temperature and humidity sensor channels are not generated.

grafik

The log file from adding the device: openhab_BLU_SBHT.log

The script console output on the gateway device shows when BT button is pressed: BTH: unknown type

ijasan commented 1 month ago

I found out that some sensor id definitions were incorrect and some were missing.

Based on the documentation at: https://shelly-api-docs.shelly.cloud/docs-ble/Devices/ht and https://bthome.io/format

the definitions should be adjusted:

Typo in line "BTH[0x43] = { n: "UVIndex", t: uint8 };" --> wrong ID, should be 0x46.

According to Shelly documentation above, BLU HT uses the following ID's for the temperature and humidity sensor:

BTH[0x2e] = { n: "Humidity", t: uint8 };
BTH[0x45] = { n: "Temperature", t: int16, f: 0.1 };

These two must be added to the script. The sensors are then recognized and the two missing channels are generated by the binding.

In addition, the other definitions should also be checked. For example, the factor for sensor 0x51 "Acceleration" is 0.01, which differs from the documentation. Here 0.001 is specified.

markus7017 commented 1 month ago

yes, you are right

try this build https://github.com/markus7017/myfiles/blob/master/shelly/org.openhab.binding.shelly-4.2.0-SNAPSHOT.jar?raw?true

markus7017 commented 2 weeks ago

verified @ijasan