Thanks so much for this! Worked for me using an H5102.
I wanted to throw in one more detail though: Under, sensor:, you ought to have device_class: "humidity" in order for the sensor to be shown on Homekit (per the Supported Components section).
So if anyone’s wondering why yoru humidity is not showing up in homekit, this is why . Funnily enough, the “Master Bath Temperature” section not explicitly having device_class: "temperature" seems to show up fine on Homekit.
Fantastic work, John. I copied your code and it worked on the first go. I hadn’t looked at that Govee app in months, but now this temp/hygrometer unit has got a new lease on life!
I wanted to provide an update for this. I recently shifted over to using the new native bluetooth component in Home Assistant. I am using the ZEXMTE long range bluetooth dongle. The system auto identified the Govee sensors and it works very well. I have now shifting all of my automation and dashboards to the new entities and retired the EspHome solution. My sensors are in very different locations in the house but the dongle has no issue hearing “any of them” (the ESP32 also had no issues as well - very impressive performance from the ESP32 since the sensors are very far away including one on the second floor of the house)
Hi John! I realize you’re using the native components, but I’m needing to integrate the govee sensors directly into the esp32, because it’s a thermostat and I need it to function without HA.
I’ve been trying to use the original code at the top but I’m getting all wrong numbers. Any ideas?
What should I use for a Govee 5075?
My suggestion would be to use an ESPHOME BLE Gateway on the ESP32 and have that communicate with HA BLE Integration. This would allow you to use the “official” Govee BLE integration that does all of the heavy lifting (parsing) of the BLE data for you. I had started down this path of trying to get the ESPHOME BLE Gateway to talk to HA via the HACS custom BLE_Monitor integration. That Dev is merging his work with the new HA BLE support.
This would essentially allow an ESP32 to be used as a “BLE repeater” over the ESP32 Wifi into HA. I am not sure this has been fully developed yet, but I am sure someone is working on it. (I would further look into doing it except that the long range BT adapter I put on my HA box covers my entire home so I don’t have a current need)
I am under the impression that USB passthrough under hyper-v is problematic, for non-storage, and/or non-windows guest OS. Can’t recall where I get that from. Could anyone confirm?
Other VM solutions however are mostly fine - VMware or VirtualBox
I finally figured it out - hopped onto IRC and talked with some Python experts.
Here’s the code for the Govee H5179 - it is working as expected and I just finished some of the debugging. Hopefully this helps anyone else that is trying to use the ESP32 tracker!
Hey, I’m a novice to doing anything with esp32 boards or automation in general, but I decided to take a stab at doing this. I have an esp32c3 that I’m trying to hook a govee h5074 up to. After much toil, I finally got the code loaded onto it, but I’m not seeing any matching bluetooth traffic. Can someone check my code to find any problems?
Sorry Im very new but can someone direct me to where I would find the MAC for 5074. I have read many post but it seems it doesnt cover where or how they are obtaining them. No sure I suppose I could just be unawre of what I am look at and skimming right past it. Thank in advance
After doing some searching on the topic, I ended in this thread to ask for support. I have a couple of Govee Sensors scanned and read out by an esp32 running with esphome. It is working well and used to monitor temperatures and calculate dew points in order to de-humidify my creeping space. Anyway, I got unusual reading in the last days as the temperatures dropped below 0°C (freezing). After some research I found that the govee 5075 sensors put a minus sign into the data vector of the received data. There is a solution here:
However, I’m not good at bit- and bytewise operations in C and request some help. Or maybe somebody has already done a fix for esphome driven devices. Thanks in advance!
Using this I get very slow updates of temperature, but regular updates of humidity and battery. The heat is actively running so the temperature is actively changing. Any ideas?
[10:59:25][D][esp32_ble_tracker:246]: Starting scan...
[10:59:36][D][sensor:094]: 'main_floor Humidity': Sending state 40.40000 % with 1 decimals of accuracy
[10:59:36][D][sensor:094]: 'main_floor Battery': Sending state 69.00000 % with 1 decimals of accuracy
[11:02:09][D][sensor:094]: 'main_floor Humidity': Sending state 41.40000 % with 1 decimals of accuracy
[11:02:09][D][sensor:094]: 'main_floor Battery': Sending state 69.00000 % with 1 decimals of accuracy
[11:03:34][D][sensor:094]: 'main_floor Humidity': Sending state 41.10000 % with 1 decimals of accuracy
[11:03:34][D][sensor:094]: 'main_floor Battery': Sending state 70.00000 % with 1 decimals of accuracy
[11:04:25][D][esp32_ble_tracker:246]: Starting scan...
[11:05:59][D][sensor:094]: 'main_floor Humidity': Sending state 39.50000 % with 1 decimals of accuracy
[11:05:59][D][sensor:094]: 'main_floor Battery': Sending state 70.00000 % with 1 decimals of accuracy
[11:06:05][D][sensor:094]: 'main_floor Humidity': Sending state 39.50000 % with 1 decimals of accuracy
[11:06:05][D][sensor:094]: 'main_floor Battery': Sending state 70.00000 % with 1 decimals of accuracy
[11:07:18][D][sensor:094]: 'main_floor Humidity': Sending state 39.10000 % with 1 decimals of accuracy
[11:07:18][D][sensor:094]: 'main_floor Battery': Sending state 70.00000 % with 1 decimals of accuracy
[11:08:15][D][sensor:094]: 'main_floor Humidity': Sending state 38.60000 % with 1 decimals of accuracy
[11:08:15][D][sensor:094]: 'main_floor Battery': Sending state 70.00000 % with 1 decimals of accuracy
[11:09:27][D][esp32_ble_tracker:246]: Starting scan...
[11:09:56][D][sensor:094]: 'main_floor Humidity': Sending state 37.90000 % with 1 decimals of accuracy
[11:09:56][D][sensor:094]: 'main_floor Temperature': Sending state 22.30520 ▒ F with 1 decimals of accuracy
[11:09:56][D][climate:378]: 'Thermostat Climate Controller' - Sending state:
[11:09:56][D][climate:381]: Mode: HEAT
[11:09:56][D][climate:383]: Action: HEATING
[11:09:56][D][climate:401]: Current Temperature: 22.31▒C
[11:09:56][D][climate:405]: Target Temperature: Low: 22.44▒C High: 30.00▒C
Does anyone know if the MAC address of the Govee sensors is actually “random” and how to deal with it?
(I got the MAC address of my H5101 using the recommended “very_verbose” method, but it comes back as “Random”).
I’ve got it working and I’m getting reasonable readings, but I don’t trust it to work sustainably yet…