nickl111 / beerlogger

Monitor fermentation activity with a Raspberry Pi Zero W and Tilt Hydrometer
MIT License
0 stars 0 forks source link

Log temp from additional BLE beacons #49

Open nickl111 opened 3 years ago

nickl111 commented 3 years ago

NOTES:

for Jinou_Sensor_HumiTemp:

FB:24:62:DE:47:DB

                             |   |                |               | 
2020-11-02 17:02:09.427871 > 04 3E 22 02 01 00 00 DB 47 DE 62 24 FB 16 02 01 06 03 02 20
  AA 0E FF 00 13 03 00 41 07 64 FB 24 62 DE 47 DB C0
  -^     a  b  c     d  e  f                                                          ^-Z

a) 00 = + or 01 = -
b) hex of temp integer
c) hex of temp decimal
d) hex of humidity integer
e) hex of humidity decimal
f) I suspect this is battery %
Some more instructions from the manufacturer:

Temperature and humidity sensor service: UUID 0XAA20 There are three characteristics:
Service 0XAA20. Temp & humid data. There are 6 bytes.
1. Temperature positive/negative: 0 means positive (+) and 1 means negative
(-)
2. Integer part of temperature. Show in Hexadecimal. 3. Decimal part of temperature. Show in Hexadecimal. 4. Reserved byte. Ignore it.
5. Integer part of humidity. Show in Hexadecimal.
6. Decimal part of humidity. Show in Hexadecimal.
For example: 00 14 05 22 32 08 means +20.5C 50.8%
01 08 09 00 14 05 means -8.9C 20.5%
0XAA22(Read,Write):start/stop checking temp and humid. 0x01(start), 0x00(stop).
0XAA23(Read,Write):checking frequency, unit(10ms), default is 100, that is checking every second.
The service UUID in broadcasting can be used as filter condition when searching. 
nickl111 commented 3 years ago

Somehow we need to get the MAC to identify this beacon (what if we have two? Do we need to select on set up? Same for the Tilt?) then grep the hcidump results into a table like we do for the tilt.