Bluetooth Device (MiFlora) with ESPHome

i seem to be having the same issue here. I’ve updated the latest to the firmware with the flower care app and can see values in there but i still only see “unknown” in Home assistant

the logs show that the esphome can see the sensor

[09:12:07][D][esp32_ble_tracker:723]: Found device C4:7C:8D:6D:24:C8 RSSI=-56
[09:12:07][D][esp32_ble_tracker:744]:   Address Type: PUBLIC
[09:12:07][D][esp32_ble_tracker:746]:   Name: 'Flower care'

but i never see any information from it. it just scans every 5 minutes.
esp config as follows

esphome:
  name: plant-gateway
  platform: esp32
  board: az-delivery-devkit-v4
  

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "blahblahblah"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Plant-Gateway Fallback Hotspot"
    password: !secret fallback_password

captive_portal:
    
esp32_ble_tracker:

sensor:
  - platform: xiaomi_hhccjcy01
    mac_address: 'C4:C7:8D:6D:24:C8'
    temperature:
      name: "Plant 1 Temperature"
    moisture:
      name: "Plant 1 Moisture"
    illuminance:
      name: "Plant 1 Illuminance"
    conductivity:
      name: "Plant 1 Soil Conductivity"
    battery_level:
      name: "Plant 1 Battery Level"

i’m stumped

UPDATE: i have changed the esp32_ble_tracker code to

esp32_ble_tracker:
  scan_parameters:
    active: false

and now it is working!

1 Like

Anyone have any advice on how to use the latest BT5 models (pink enclosure)? The new device model is HHCCJCY10, details including packet captures can be found here.

This should work with the blie_monitor custom component (due to the work linked above), but that involves having an RPi out in the yard near enough to these devices to pick up the signal. Would be a lot easier to put an ESP32 in that position instead!

You can use myhomeiot/esphome-components: A collection of my ESPHome components (github.com) to forward the BLE packets to Passive BLE Monitor Parse data from ESPHome - Passive BLE Monitor integration (custom-components.github.io) or OpenMQTTGateway v0.9.13 which can be combined with Install | Theengs gateway.

Hey @mihsu81 I wanted to say thanks! The myhomeiot solution works great, and I really appreciate the guidance to steer me in that direction. The HHCCJCY10 works as expected and all the parameters are being parsed correctly by the BLE Gateway component. Just what I wanted, thanks again!

@luma May I ask how frequent you get sensor readings from your HHCCJCY10?

Once a minute when I have good signal and the device is close to my ESP32. It can be once an hour or worse when out in my yard. Need to get a better antenna on my ESP but I don’t really need more than maybe one reading a day.

Interesting. I have 4 of them and I only get data once per hour on all of them.

HI,

I see the light information on the BLE log, but I’m not able to add it on the ESP config
[22:43:47][D][xiaomi_ble:358]: Light: off

any idea? how I can add it?

I’m running 3.3.5 miflora version

Are you confusing the lux level (light level sensor) with a light output?

I’m using these

temperature:
  name: "Xiaomi MiFlora Jasmine 01 Temperature"
moisture:
  name: "Xiaomi MiFlora Jasmine 01 Moisture"
illuminance:
  name: "Xiaomi MiFlora Jasmine 01 Illuminance"
conductivity:
  name: "Xiaomi MiFlora Jasmine 01 Soil Conductivity"
battery_level:
  name: "Xiaomi MiFlora Jasmine 01 Battery Level"

but in the log i see a “light” entry off/on

Actually I think there is a small LED on the top of the device. I guess you can potentially force it on/off but there would be no point. The ESPhome setup doesn’t allow for it as far as I know.

Hello @luma , after seeing here that you were successful in reading the HHCCJCY10 sensor using the BLE Gateway component, I did the same and used the flower_care.yaml example, but unfortunately I am getting the error as a return:

[17:06:45][D][myhomeiot_ble_client:069]: [DC:23:4D:E5:65:A6] Found device
[17:06:45][I][myhomeiot_ble_client:032]: [DC:23:4D:E5:65:A6] Connecting
[17:06:47][I][myhomeiot_ble_client:087]: [DC:23:4D:E5:65:A6] Connected successfully, app_id (1)
**[17:06:48][E][myhomeiot_ble_client:144]: [DC:23:4D:E5:65:A6] SEARCH_CMPL_EVT service (0x1204) not found**
[17:06:48][I][myhomeiot_ble_client:042]: [DC:23:4D:E5:65:A6] Disconnecting

Have you ever encountered this type of error?

Thank you very much in advance!!

Random question → It occurred to my my Lux values never go to zero (even in pitch black). In fact I’m having trouble determining whether the lights are on or off. I have a 12 hr plant light running and the lux seems to always hover around something:

Is this normal (I’m running with ESPhome)

Mine also have a varying low points somewhere between 0-400 lx. If you get ~40.000-100.000 lx in full sunlight it is probably your grow light that is too weak. It is surprising how much artificial light it requires to get you above a few thousand lx even.

1 Like