After playing with Govee thermometers H5074 and H5075, I came across the H5177 model with similar specs but with a larger display including some buttons and backlight. I decided to give it a try, just to see if it used the same protocol as the previous units.
wim@WimPi4-dev:~ $ sudo ../visualstudio/projects/GoveeBTTempLogger/bin/ARM/Debug/GoveeBTTempLogger.out -v 2 | grep E3:5E:CC:21:5C:0F
[2020-11-09T00:26:34] 44 E3:5E:CC:21:5C:0F 06 (UUID) 0A18F5FE88EC (Name) Govee_H5074_5C0F
[2020-11-09T00:26:34] 26 E3:5E:CC:21:5C:0F 88EC000103DE106402 (Temp) 45.842°F (Humidity) 43.18% (Battery) 100%
[2020-11-09T00:26:35] 44 E3:5E:CC:21:5C:0F 06 (UUID) 0A18F5FE88EC (Name) Govee_H5074_5C0F
[2020-11-09T00:26:35] 42 E3:5E:CC:21:5C:0F 4C000215494E54454C4C495F524F434B535F485750740F5CC2 (Apple) (UUID) 494E54454C4C495F524F434B535F4857 (Major) 5074 (Minor) 0F5C (RSSI) C2
^C* SIGINT: Caught Ctrl-C, finishing loop and quitting. *
GoveeBTTempLogger Version 1.20201016-1 Built on: Oct 16 2020 at 12:13:28 (exiting)
wim@WimPi4-dev:~ $ sudo ../visualstudio/projects/GoveeBTTempLogger/bin/ARM/Debug/GoveeBTTempLogger.out -v 2 | grep A4:C1:38:13:AE:36
[2020-11-09T00:27:05] 46 A4:C1:38:13:AE:36 GVH5075_AE36 (UUID) 88EC (Flags) 05 (Manu) 88EC0002859F4900 (Temp) 61.7502°F (Humidity) 27.9% (Battery) 73%
[2020-11-09T00:27:05] 42 A4:C1:38:13:AE:36 4C000215494E54454C4C495F524F434B535F48575075F2FFC2 (Apple) (UUID) 494E54454C4C495F524F434B535F4857 (Major) 5075 (Minor) F2FF (RSSI) C2
^C* SIGINT: Caught Ctrl-C, finishing loop and quitting. *
GoveeBTTempLogger Version 1.20201016-1 Built on: Oct 16 2020 at 12:13:28 (exiting)
wim@WimPi4-dev:~ $ sudo ../visualstudio/projects/GoveeBTTempLogger/bin/ARM/Debug/GoveeBTTempLogger.out -v 2 | grep A4:C1:38:0D:3B:10
[2020-11-09T00:27:35] 46 A4:C1:38:0D:3B:10 GVH5177_3B10 (UUID) 88EC (Flags) 05 (Manu) 01000101029D1A64
[2020-11-09T00:27:35] 42 A4:C1:38:0D:3B:10 4C000215494E54454C4C495F524F434B535F48575177F2FFC2 (Apple) (UUID) 494E54454C4C495F524F434B535F4857 (Major) 5177 (Minor) F2FF (RSSI) C2
^C* SIGINT: Caught Ctrl-C, finishing loop and quitting. *
GoveeBTTempLogger Version 1.20201016-1 Built on: Oct 16 2020 at 12:13:28 (exiting)
While I was able to see the device data in Bluetooth advertisements, it’s got some differences. The code snippets above are cherry picked from one device each that I know how to interpret and the new device last.
The Manufacturer data in the new H5177 device doesn’t start with the same 88EC signature, but at least appears to be the same length as H5075, and one byte shorter than the data packet from the H5074.
17.1C 28% matches with (Manu) 01000101029D1664. If anyone can point me to a quick decode algorithm, I’ll update my project to support this device very quickly.
I’ve now learned some details on BLE, and have written a program that listens for BLE advertisements from either type of thermometer and logs the temperature and humidity in a text file. The code for my project is available on GitHub. https://github.com/wcbonner/GoveeBTTempLogger
The same program can also be called to get the last value from the log and produce output compatible with MRTG. MRTG is not the best method for graphing these temperatures, because all graphs start with zero on the Y axis, and neither the temperature or humidity is likely to be near zero.
MRTG graph of Temperature and Relative Humidity
My program seems to receive advertisements from each thermometer about every ten seconds. I’ve had a friend running the code in his location with a different set of thermometers and it doesn’t get advertisements nearly as frequently. I don’t know if that’s just because environment is different, or if there’s something else going on.
Last week I came across a deal on a small thermometer with display and Bluetooth access for under $10 so I had to give it a try. The fact that the data is available via bluetooth instead of via a web service was a major selling point for me. I am hoping to be able to to log the data via a Raspberry Pi4.
GVH5070 near my Raspberry Pi4
I installed the Govee Home app on my iPhone and it was able to find the device, communicate with it, and pull both current and accumulated data.
When I attempted to find it from my Pi4 it was much more difficult. I live in an apartment with units all around. I’m not just dealing with my own devices that may be visible, but my neighbors as well.
I managed to find the device using linux command line tools, but was not able to successfully connect. A friend suggested BLE Scanner 4.0 for my iPhone for discovering the details, and it was at least able to confirm what I should be looking for using the linux command line tools. I still had timeout issues with the iPhone app, but at least was able to confirm that I could connect to the device and retrieve GUID information.
This is my first time attempting to gather data from a Bluetooth device. I’m still in the research and test phase. I’m listing a bunch of the URLS I’ve found that have been helpful.
From the command line on my Pi4 I already had the tools installed to try several Bluetooth commands. I believe they were installed as part of the bluez package. The first two commands below get details on the Raspberry Pi Bluetooth hardware, then the hcitool lescan command produced a lot of devices, and I found the line referencing the GVH5075 so I could use the address in further commands.
Another command that I attempted before I used the hcitool command was the bluetoothctl command. It scrolls a lot of data, but now that I have an idea what I’m looking at, I may be able to see announcement data from the thermometer periodically in the stream by filtering just to see the data coming from the MAC address.