This Gist contains an example code fragment of how to read temperature and humidity data from Inkbird ibs-TH1 bluetooth thermometer in NodeJS with Noble.
Note that you can also read values directly via command line with gatttool
:
gatttool -b <MAC> --char-read --handle=0x002d
Example value:
c8 0a a8 16 00 49 88
c8 0a
uint16 Little Endian temperature value * 100a8 16
uint16 Little Endian humidity value * 100
To find MAC adress of sensor, you can use hcitool
.
sudo hcitool lescan
or bluetoothctl
.
Handle 0x0028 works for me - I get 7 bytes, and the first 4 match 100x the current temp (in C) and humidity. Example: 57 02 da 20 01 a9 8f
(side note - I'm not sure why I was expecting 6 bytes in my Sep 9 comment - I apparently miscounted).
Thanks!