Apologies if this is too off topic: I am also trying to get the basic H5074 sensor data, but using a minimal scanner on an ESP32 for now.
What I have learned about the packets these H5074 devices (vs the H5075’s w their LCD display) send may be useful to others here, so I hope posting is ok even if information refers more to the device itself rather than HA plugin by Thriller.
Using Arduino BLE code (library from Neil Kolban for ESP32) I am finding that the H5074s emit 3 types of BLE packets, with different lengths (namely, 40, 56, and 29)
The length 40 packets are the ones that contain temperature, humidity and battery level data.
The other two do not (details below)
The 29 packets seem to be emitted every second. After a long break from scanning, I appear to randomly get some 40 and 56 packets but following the first scan, only receiving 29 packets any more. This is frustrating since those don’t actually contain any data
I tried this with active and passive scanning, and with various scan periods, windows etc.
Just passive scanning and listening to length 40 packets containing sensor data does not appear to be working for H5074 devices:
After a long time of not scanning (eg ESP32 turned off) I might get a couple of data packets with actual temp but after that I only ever get length 29 “keepalive” type packets that do not contain temp data.
There seems to be something stateful to the scanning, ie. my scans influence what the H5074 emits subsequently, at least for a period of time.
Questions:
-
is anyone else seeing this “only length 29, not data containing packets” subsequent to initial scan behavior ? Or is everyone able to periodically (what period ?) fish out length 40 data containing packets out of the air ?
-
does the H5074 require active scanning (connecting to H5074 explicitly, asking for temp data) ?
More details on the packet types emitted by the H5074 device
------------------------------------------------------------------
Length 40 packet
all : Name: Govee_H5074_C0A6,
Address: e3:8e:c8:c1:c0:a6,
manufacturer data: 88ec002f0941176402,
serviceUUID: 0000180a-0000-1000-8000-00805f9b34fb
raw data (for each data item: byte 1=len, byte 2=type, byte 3+=value)
02 01 06
07 03 0A 18 F5 FE 88 EC
11 09 47 6F 76 65 65 5F 48 35 30 37 34 5F 43 30 41 36
0A FF 88 EC 00 2F 09 41 17 64 02
Decoded data
length[ 1] type[ 1 = flags] 06 .
length[ 6] type[ 3 = BLEUUIDs of services available] 0A 18 F5 FE 88 EC ......
length[16] type[ 9 = full device name] 47 6F 76 65 65 5F 48 35 30 37 34 5F 43 30 41 36 Govee_H5074_C0A6
length[ 9] type[255 = mfg specific data] 88 EC 00 2F 09 41 17 64 02 .../.A.d.
Interpretation
BLEUUIDs of services available:
0x180A device information
0xFEF5 ??
0xEC88 sensor readings (temp, humidity, battery) eg this packet
mfg specific data item:
0xEC88 = tmp/humidity/battery data follows
0x092F = temperature = 2351 decimal / 100 ➟ 23.51 degrees C
0x1741 = humidity = 5953 decimal / 100 ➟ 59.53 % relative humidity
0x64 = battery level = 100 decimal ➟ 100% battery level
------------------------------------------------------------------
Length 56 packets
all : Name: Govee_H5074_C0A6
Address: e3:8e:c8:c1:c0:a6
manufacturer data: 4c000215494e54454c4c495f524f434b535f48575074a6c0c2
serviceUUID: 0000180a-0000-1000-8000-00805f9b34fb
decoded data:
length[ 1] type[ 1=flags] 06 .
length[ 6] type[ 3=services] 0A 18 F5 FE 88 EC ......
length[16] type[ 9=device name] 47 6F 76 65 65 5F 48 35 30 37 34 5F 43 30 41 36 Govee_H5074_C0A6
length[25] type[255=mfg specific data] 4C 00 02 15 49 4E 54 45 4C 4C 49 5F 52 4F 43 4B 53 5F 48 57 50 74 A6 C0 C2 L...INTELLI_ROCKS_HWPt...
Interpretation
0x004C type of Govee data packet, mfg data follows ?
0x0215 ???
0x4E...50 INTELLI_ROCKS_HWP Intelli_rocks is the name of the mfg of the Govee devices. This data seems constant
0x74 ?
0xC0A6 last 4 of device name Govee_H5074_C0A6
0xC2 ???
This packet type doesn't appear to have enough bytes for device specific data for all hw, firmware versions, serial etc.
------------------------------------------------------------------
Length 29 packets
all : Name: Govee_H5074_C0A6
Address: e3:8e:c8:c1:c0:a6
serviceUUID: 0000180a-0000-1000-8000-00805f9b34fb
length[ 1] type[ 1] 06 .
length[ 6] type[ 3] 0A 18 F5 FE 88 EC ......
length[16] type[ 9] 47 6F 76 65 65 5F 48 35 30 37 34 5F 43 30 41 36 Govee_H5074_C0A6
Interpretation
same flag value (6) and BLEUUIDs for services and device name
Just a "heartbeat" to signal the device is online ? Once per second seems very frequent for a low power device. Perhaps triggered by scanning
---------------------------------