Govee BLE Thermometer/Hygrometer sensor

Hey thanks for your work here @Thrilleratplay. This was my gateway drug into using HomeAssistant.

I have noticed that the H5075 sensors keep sending for weeks after it sends battery level 0 and LCD turned off - which is really cool!
Just wrote a post about that at r/Govee.

Anyway, THANKS!

1 Like

Damn, I just replaced the batteries in three sensors today because the battery was 0%. I should have noticed the temperature was still being recorded. That is good to know in case I, or anyone else, doesnā€™t notice the low battery level or LCD is off. Thank you.

ā€¦and before anyone comments, yes, Home Assistant alerts for the battery level would also help but I havenā€™t gotten around to that. Besides, I use my sensors mainly for data collection and do not always look at my HA dashboard.

The -62 or -64 value has been reported as an issue in the bleson package I used but I remember that being a common value before. One thing I did do that is different from the previous version is prune values of 0. The averaged value may been have changed depending on the number of 0 readings were returned. I do not know if this is would be more accurate or not. I think I need to read up on the bluetooth spec to see how that value is calculated.

Funny, Iā€™ve noticed that of the two Govee sensors I have that ran out of battery, both died while still reporting around 34%. Screens went off and they stopped reported. I chalked it up to them probably coming with poor quality/consistency batteries.

Also, despite them not recommending it, Iā€™ve found that the H5074 in my freezers have been working great for the past 4-5 months (reporting 78% despite being at -4F to -14F 24/7). In a plastic ziplock to protect it from condensation, of course. I was thinking I might need another for the refrigerator, but Iā€™ve found that the H5075 with the included alkalines actually seems to be doing fine in the fridge (33F-39F)

Thanks again @Thrilleratplay!

The only issue I have these days is that sometimes the values displayed in HA for the H5075 refrigerator sensor will bounce between very high and low ā€“ I think bouncing between the values of other sensors. It seems to happen when the signal from the fridge sensor is obstructed (lots of bottles of liquids etc) and moving the sensor a bit clears it up. Itā€™s just interesting that it seems to pickup the values from other sensors when the real sensorā€™s signal is iffy.

You have a H5075 in your refrigerator? Interesting. I do not think the high and low values are from other sensors as the mac address is embedded in every packet. My guess is the H5075 is built to a price and the sensor varies. The Govee app will pull the history and normalize the data. This component only relies on the data is receives via the broadcast, so the fewer received messages, the more variation there will be.

Yes, in the fridge (in a ziplock). I didnā€™t expect the battery life to be good because of the cold temperature effect on alkalines, or at least for it to suppress the battery % reading due to the reduced voltageā€¦ but it doesnā€™t seem to have had much negative impact.

Re: the data, yes, that would certainly make sense, but in this case the value alternates between a realistic value and the value of the H5074 in the adjacent freezer (a consistent ~35F difference), never in between or otherwise totally out of whack. Itā€™s possible itā€™s simply a quirk in how HA is displaying the (maybe missing?) data. The next time it happens Iā€™ll take a screenshot and a closer look at what the raw values are.

I have two H5074s in freezers and one H5075 in the fridge, with HA automations for temperature alarms on them. With the Sensirion SHT30 sensors it helps to make sure they stay <80% RH.

Any chance of getting this working with ESPHome? The sensors are detected by name and the address type is public but i cant see a way to get them connected to ESPHome.

Sorry, I am not familiar with ESPHome. @iamhueman has asked about it before but I am not sure if they had any success.

I asked the same question but now I realized I donā€™t need esphome to get these sensors to work, plus the range of my USB bluetooth is way better!

No worries, I have been having issues with BT for a long time it turns out the dongle I was using was the issue. I bought that ZEXMTE one and itā€™s working wonderfully now. Now to find a use for the 2 ESP32 boards I bought :slight_smile:

Does anyone here know how to make a bluetooth 5.0 USB dongle to work in Linux/Ubuntu?
BT 5.0 will give us better range.

I put a feature request on the github page for ESPHome on this. I am interested for two reasons:

  1. I had the integration up and running when I was running HA on a RPi 4 and it worked great. I built some automations to run exhaust fans based on humidity in my bathrooms and all was well. However, I got to the point where I had to move HA off of the RPi 4 to a more capable computer. I now run HassIo on a VirtualBox VM running on an Ubuntu 18.04 host. The ā€œhostā€ laptop has built in BT but I was not able to get visibility of it in the VM. I purchased a USB BT adapter but I still canā€™t ā€œsee itā€ in the VM. The ESPHome route would solve this since I have several available.

  2. I think moving this to a ā€œhubā€ and off the HA host would be a better solution. I have several ESP32s sitting around, so that was my interest in doing it with ESPHome. Note, the ESP32/ESPHome does ā€œseeā€ the Goveeā€™s as I can get their mac addresses using the standard BLE integration but not the data. I still have the RPi 4 available and would make it the ā€œhubā€ if anyone has any ideas.

Any help would be greatly appreciated.

Just curious, what do you mean by a more ā€œcapable computerā€? What are you doing now where a Raspberry pi 4 no longer enough?

Several issues:

  1. I have a rather large installation with a number of devices, integrations and entities. (10+ integrations, 50+ devices, 100ā€™s of entities). Reload times for HA Core were getting longer and longer.
  2. I am using multiple add-ons and their performance was starting to bog down. In particular I am using MotionEye to monitor and backup a number of RTSP video streams. (I am currently not using any motion detection, just writing full streams to an SMB server. In the future I would like to start using motion detection but there was no way the Pi was going to be able to handle that load)
  3. I have had several MMC failures even using high end cards.

I had a several year old laptop available, so I shifted HA to it and it has addressed all of the above very well. Others are using NUCs but given that I had the laptop sitting around unused if made sense to just use it. (it is unused since I use RPis for lots of other stuff like my SMB server, Digital Picture frame, etc. and made the laptop un needed)

Impressive. A USB connected SSD may help with the MMC failures and overhead created by IO waits, it is understandable you will want something that will scale for video streams.

@Thrilleratplay, thanks for putting this together. Iā€™m interested in this, but my HA server is hidden away in the basement and I wanted to make a light weight raspberry pi Bluetooth central/observer for things like this. When I look into how youā€™re doing this, it looks like the temperature/humidity/battery data are all encoded into the BLE advertisement (manufacturer specific portion) rather than specific characteristics inside a BLE service that need to be access via Bluetooth connection. Is that understanding correct?

For example, the packet data that youā€™re parsing for the H5075 model below is part of the advertisement, not coming from a connection?

            if self.check_is_gvh5075_gvh5072():
                mfg_data_5075 = hex_string(self.mfg_data[3:6]).replace(" ", "")
                self.packet = int(mfg_data_5075, 16)
                self.temperature = float(self.packet / 10000)
                self.humidity = float((self.packet % 1000) / 10)
                self.battery = int(self.mfg_data[6])

Thanks again for putting this work in.

I believe the data can also be retrieved through a direct Bluetooth connection, but this component only reads the BLE advertisement. I did a lot of work to abstract parts of this component and allow for easier maintenance. You may be interested in the POC work I did before creating the HA component, it should be easier to follow or rework for your needs.

Additionally, Govee is creating an updated model that may have an improved range that could work with your set up. I purchased one which arrived today but is now saying it is unavailable. Support will be available for it in v0.7 of the HA component.

@Thrilleratplay awesome, thanks. Yes, thatā€™s exactly what I needed.

Esphome esp32 ble tracker would allow you to put them in the basement, or outside or anywhere wifi can reach. It would be awesome if someone could add the govee platform to esp home ble_tracker. The hard part is already done. I donā€™t have Bluetooth in my greenhouse.

I have two HA instances that just stop reporting temp/humidity values from the sensor. The fix was always been to reboot the computers. Any idea why it would just stop? It works for a straight 8-10 hours, then just randomly quit working. No specific time. Just random time during the day. Both machines are on version 0.7 and the HA version is 114.4 running on Ubuntu 20