Govee H5179 integration support

Hi all. I have a Govee H5179 wifi Thermometer Hygrometer that I’m currently managing independently through the vendor’s app. I’d like to get it into HA so I can trigger other devices based on the H5179’s data points. I see that there’s support for it using BLE, but I can’t seem to figure out how to add it. Ideally, I’d like to communicate over wifi as the device is physically 20-25 or so feet away with walls in between. Will this device work over wifi with HA?

To expand on this, I have HA running on an OVA in VirtualBox. In VirtualBox, under USB in Settings, I have an Intel Corp. [0001] device. The Product ID 0aa7 lines up with the integrated Intel Dual Band Wireless-AC 3168 card in my NUC. This card is BT v4.2 and supports BLE.

I had added the following code to configuration.yaml and subsequently rebooted:

#Bluetooth Tracker
device_tracker:
  - platform: bluetooth_le_tracker
    new_device_defaults:
      track_new_devices: true

Upon rebooting, I checked the logs and found the error below:

Logger: homeassistant.components.bluetooth_le_tracker.device_tracker
Source: components/bluetooth_le_tracker/device_tracker.py:150
Integration: bluetooth_le_tracker (documentation, issues)
First occurred: 10:42:16 PM (1 occurrences)
Last logged: 10:42:16 PM
No Bluetooth LE devices to track!

The same error occurs if I change bluetooth_le_tracker to bluetooth_tracker. What am I doing wrong?

If this doesn’t end up working, are there any suggestions for a wifi-based temp and humidity sensor that’s compatible with HA that doesn’t require hours of config to get working?

I’m trying to figure this out as well but I’m using a different route - I have an ESP32 that I’m using with the esp_ble_tracker component. I have identified the broadcasts but I haven’t figured out the data decoding to get accurate temp and humidity.

You can read more about it here - I’m still working on it when I’m not working on my day job :slight_smile:

Thanks for your input @Electrostrong. I just checked in the host OS (Win10) and see Govee_H5179_688A as discoverable. I just can’t get it working inside HA.

My HA installation is a little bit different, but I might still be able to help here. I’m using the BLE Monitor HACS integration, which automatically finds and adds the device, including both temp and humidity sensors.
I’m not an expert on this by any means, but you should be able to pass your Bluetooth adapter through to the VM for this to work. Depending on your host device’s config, you may have to purchase a separate USB Bluetooth adapter so that you can pass it through to your HomeAssistant VM.

Ultimately, I got this working. I added some code to configuration.yaml to start. The platform also had to be changed to “ble_monitor”.

# Govee BLE HCI
sensor:
  - platform: ble_monitor
    rounding: True
    decimals: 2
    period: 60
    use_median: True
    log_spikes: True
    govee_devices:
      - mac: "E3:32:80:C3:68:8A"
        name: Govee H&T Sensor

I also had to drop to SSH and use vi to edit the core.config_entries file in the .storage folder. The BT adapter MAC address was set to all zeros. Once I updated it with the correct MAC address and restarted the core, it started working. Just adding this info in case anyone else runs into this issue. Thanks everyone!

Having some issues following along here.

  1. I installed Passive BLE Monitor Integration from HACS but it’s not available to be added after a restart
    (maybe its just manual and the last quoted item just needs to be put in configuration.yaml)

  2. when I try to add my sensor (Govee H5179) to MiHome (is this required?) - it tells me a gateway is needed. Is this correct?

Thanks for any help

I’m having the exact same issue. I can’t get the H5179’s to display in the BLE integration no matter what I do, and MiHome isn’t liking it either. The code from @thaddicus just crashes all my other codes in configuration.yaml. @thaddicus I wonder if you can please take us step by step?

Try using the Govee BLE HCI Integration instead. It may work better.

@sweggy696969 are you getting any specific errors when you try to add the H5179? My issue was that the core.config_entries file had a statically-mapped MAC address of 00:00:00:00:00:00 for the device (which translates to device not found). Once I changed it in the core.config_entries file, it started working after a reboot.

There’s a separate process to configure working from the CLI within the browser that gives you the ability to modify files. If you don’t have this set up, let me know.

Can you post a snippet of your configuration.yaml?

Also, try clearing your browser cache and/or hitting Ctrl + F5. Either of these most often clears up immediate issues.

Thanks for the reply…No errors. It’s detecting the devices but passing state ‘unavailable’ for all sensors on both of my H5179’s.

Here’s my core.config_entries

            {
                "entry_id": "(id here)",
                "version": 3,
                "domain": "ble_monitor",
                "title": "Bluetooth Low Energy Monitor",
                "data": {},
                "options": {
                    "bt_interface": [
                        "B8:27:EB:45:F8:AE"
                    ],
                    "bt_auto_restart": false,
                    "active_scan": false,
                    "discovery": true,
                    "period": 60,
                    "use_median": false,
                    "decimals": 1,
                    "log_spikes": false,
                    "restore_state": false,
                    "report_unknown": "Off",
                    "devices": [
                        {
                            "mac": "BC:FF:4D:D8:DA:4E",
                            "temperature_unit": "\u00b0C",
                            "decimals": "default",
                            "use_median": "default",
                            "restore_state": "default",
                            "reset_timer": 35,
                            "track_device": false,
                            "tracker_scan_interval": 20,
                            "consider_home": 180,
                            "delete device": false
                        },
                        {
                            "mac": "bc:ff:4d:d8:db:c0",
                            "temperature_unit": "\u00b0C",
                            "decimals": "default",
                            "use_median": "default",
                            "restore_state": "default",
                            "reset_timer": 35,
                            "track_device": false,
                            "tracker_scan_interval": 20,
                            "consider_home": 180,
                            "delete device": false
                        }
                    ],
                    "is_flow": true,
                    "hci_interface": [
                        0
                    ]
                },
                "pref_disable_new_entities": false,
                "pref_disable_polling": false,
                "source": "user",
                "unique_id": "(id here)",
                "disabled_by": null
            }

And my configuration.yaml

  - platform: ble_monitor
    rounding: True
    decimals: 2
    period: 60
    log_spikes: False
    hci_device: hci0
    govee_devices:
      - mac: "BC:FF:4D:D8:DA:4E"
        name: Indoor
      - mac: "BC:FF:4D:D8:DB:C0"
        name: Outdoor

Appreciate your response & help.

Check or try these options:

  • In Configuration → Devices and Services → Integrations, click Configure on your Bluetooth Low Energy Monitor
  • Make sure Use Active Scan is checked. If it’s not, enable it and reboot

Here is a snippet of my configuration.yaml that works:

# Bluetooth Tracker
device_tracker:
  - platform: bluetooth_le_tracker
    new_device_defaults:
      track_new_devices: True

# Govee BLE HCI
sensor:
  - platform: ble_monitor
    rounding: True
    decimals: 2
    period: 60
    use_median: True
    log_spikes: True
    govee_devices:
      - mac: "<MAC address removed>"
        name: Govee H&T Sensor

Mate, turning on active scan did the trick. Thanks heaps for your help :grin:

1 Like

how do you get it working over wifi? all my out builds are far away from my server and run on Ethernet and wifi and not bluetooth.