BLE Redundancy

Hi, I have installed Xiaomi temp/humi sensors all over the house to help trigger the heating and to tell me to open windows. I have ESP32s in each room running ESPHome that are receiving the updates.

I would like to build in some redundancy and have 2 questions:

  1. Does anyone if it is NOT possible to have one Xiaomi sensor update many ESP32s or any problems with that?
  2. How can I combine the entities together? For example - (if above is true) the kids bedroom temp might be picked up by 3 different ESP32s but they are all referring to one Entity - Kids Bedroom Temperature.

There will be an automation that turns the heating on but I only want it triggered from one Entity (which is the combination of the temp reading from the 3 ESP32s that are receiving the Xiaomi update).

Or open to a better idea . . .

Shouldn’t be a problem because the ble beacons just broadcasted (shouted) into the air and can be picked up from more than one esp because no pairing or anything is involved.

That will be the tricky part you have to solve (in ha) :wink:

Probably you only want to include recently updated readings (entities) and not a state from a esp32 (located further away) from yesterday for example :bulb:

1 Like

Thank you.

Good point about the readings - will need to review date stamp of the up then.

I don’t even know where to start with the entity combining. I am thinking Groups like lights and then triggering based on the Group changes but wary that Groups are normally used as an end point rather than a trigger.

Izzy

Guess a template sensor in ha is what you could use

OK for anyone else this might help . . .

I have the $4 Xiaomi temp/humi sensors in every room, I have a ESP32 in every room. I have each Xiaomi temp/humi talking to at least 3 ESPs (same room, same floor, different floor) so get 3 points of reference and redundancy.

I creates a min/max sensor for eash room using the entity ids from each ESP32:

  • platform: min_max
    name: Last Office Temp
    type: last
    entity_ids:

    • sensor.office_temperature
    • sensor.office_temperature_2
    • sensor.office_temperature_3
    • sensor.office_temperature_4
  • platform: min_max
    name: Last Master Bedroom Temp
    type: last
    entity_ids:

    • sensor.master_bedroom_temperature_2
    • sensor.master_bedroom_temperature_3
    • sensor.master_bedroom_temperature
  • platform: min_max
    name: Last Top Hall Temp
    type: last
    entity_ids:

    • sensor.top_hall_temperature_2
    • sensor.top_hall_temperature_3
    • sensor.top_hall_temperature
  • platform: min_max
    name: Last Mid Hall Temp
    type: last
    entity_ids:

    • sensor.mid_hall_temperature_2
    • sensor.mid_hall_temperature_3
    • sensor.mid_hall_temperature

These are then past to the HA thermostat

  • platform: generic_thermostat
    name: Office Thermostat
    unique_id: J4GxyDva9fVg
    heater: switch.home_office_heater
    target_sensor: sensor.last_office_temp
    min_temp: 14
    max_temp: 23
    target_temp: 18
    away_temp: 8
    ac_mode: false
    precision: 0.5
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3

  • platform: generic_thermostat
    name: Living Room Thermostat
    unique_id: CeEf9Hke78Pa
    heater: switch.dining_radiator_relay ##for now
    target_sensor: sensor.last_living_room_temp
    min_temp: 14
    max_temp: 23
    target_temp: 18
    away_temp: 8
    ac_mode: false
    precision: 0.5
    min_cycle_duration:
    seconds: 5
    keep_alive:
    minutes: 3

End result is this thing of beauty:

1 Like