Xiomi Mi Thermometer won't connect

I just picked up a couple of ESP32 boards and Mi Thermometers to monitor some temperatures in my brewing system. I have been able to go through the process of programming the ESP32 board and used the settings from the ESPHome for the devices at this page.
I’ve actually tried all three permutations, but the same problem persists. I get the sensors programmed with the right info, but when the ESP32 board is looking for devices, it sees them, but will not use them. I’ve checked and double checked the MAC address. I’ve tried the pvvx and the ATC1441 custom firmware on 2 different thermometers. I have no trouble connecting to either of the devices using the Telink flasher. The devices are using hardware version 1.6 (08/2021). The lines below are pulled out of the ESP Home logs showing the devices being identified, but there are no lines afterwards showing it picked them up. The entities in HA show “Unknown” for the values.
I’m pretty sure the issue is within ESPHome based on the troubleshooting I’ve done, but not sure what to do next. Anyone have any thoughts?

[11:07:31][D][esp32_ble_tracker:719]: Found device A4:C1:38:32:11:7B RSSI=-82
[11:07:31][D][esp32_ble_tracker:740]:   Address Type: PUBLIC
[11:07:31][D][esp32_ble_tracker:742]:   Name: 'ATC_32117B'

[11:08:31][D][esp32_ble_tracker:719]: Found device A4:C1:38:72:E4:D1 RSSI=-89
[11:08:31][D][esp32_ble_tracker:740]:   Address Type: PUBLIC
[11:08:31][D][esp32_ble_tracker:742]:   Name: 'LYWSD03MMC'


The signal is really weak, is there a way to bring them closer to the esp?

When I captured the log info, they were probably 35’ feet away. I have one now sitting 2’ away with nothing between.

[13:56:17][D][esp32_ble_tracker:719]: Found device A4:C1:38:72:E4:D1 RSSI=-56
[13:56:17][D][esp32_ble_tracker:740]:   Address Type: PUBLIC
[13:56:17][D][esp32_ble_tracker:742]:   Name: 'LYWSD03MMC'

During the majority of my troubleshooting they were within a few feet and had a signal strength similar to what is shown above.

The sensor will only transmit when it has data, ie when the temperature changes. Are you sure the temp has changed? Hold it in your hand for a while.

EDIT: oh and post your yaml :slight_smile:

I had actually placed the thermometer into a freezer set to 40deg. I was still reachable, but did not connect. I would expect the device to at least establish a connection and then afterwards if the temp doesn’t change, not to send data. My YAML for the device is here.

  name: garage_temp_node
  platform: ESP32
  board: esp32dev

# Enable logging

# Enable Home Assistant API

  password: !secret ota_password

  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
    ssid: !secret fallback_wifi_ssid
    password: !secret fallback_wifi_password


  - platform: atc_mithermometer
    mac_address: "A4:C1:38:32:11:7B"
      name: "Kegerator Temperature"
      name: "Kegerator Humidity"
      name: "Kegerator Battery-Level"
      name: "ATC Battery-Voltage"
  - platform: xiaomi_lywsd03mmc
    mac_address: "A4:C1:38:72:E4:D1"
    bindkey: "b60f2e40eafa4c7b8c90ab85714da7b0"
      name: "Test Temperature"
      name: "Test Humidity"
      name: "Test Battery Level"

Thanks for looking at this.

I’m having simillar issues. Have you managed to solve your problem?

My bad. I was invoking the wrong platform. My setup is working fine.

It was solved after getting a more recent firmware version from PVVX on his github page. After installing that and following the instructions I was able to quickly get 2 different thermometers to connect right away. That was back at the beginning of November. Sorry if that isn’t much help.