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.
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.
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.
A couple of years ago I bought a discount sound bar to use as my computer speaker. I’ve been really happy with the sound quality. It’s connected via an optical cable to my computer and has a separate subwoofer.
This summer I moved into a new apartment, and during the last month I’ve run into a problem. One of my neighbors seems to be connecting to my soundbar via Bluetooth.
When I first noticed the problem, the sound bar was in a mode that would let Bluetooth turn on the sound bar, which was extremely frustrating when I was nearly asleep and the soundbar would start playing noises for no reason. That caused me to learn how to disable the Bluetooth power on feature of the sound bar. Now at least it will only switch to Bluetooth when I’m actually using the soundbar for computer output.
The TaoTronics devices seem to be able to connect to multiple devices at the same time. I’m guessing that my neighbor has no idea that they are connecting to a second device at all. Obviously it’s built to make connecting to devices as easy as possible.
If anyone has suggestions on how to reject an already paired device from Bluetooth, I’d love to see it in the comments. I’m willing to use one of my Raspberry Pi devices that supports Bluetooth to see if there’s a way to send an interrupt signal.