Same sensor published by 2 different ESPHOME devices

Hi,

So I would like to install a second rf receiver in my house to more reliable rf signal reception from few windows/doors sensors.

Now the question is: what is the best strategy to manage multiple receivers?
Have different sensors for each one and combine the with an OR sensor template inside HA?
Is something less cumbersome available?

I use MQTT for publishing all my RF sensors. I have 3 RF receivers. All publish to the same topics.

HA and your MQTT server will handle that fine.

There may be some way to do it with the API, but using MQTT has just worked fine.

1 Like

I see, unluckily I have other sensor on the same esp for which I would like to continue take advantage of the api.

Is it possible to publish only some sensors to MQTT and keep the other on the api?

Or any other solution?

Yes that would be an issue.

Maybe just use an automation to demux the sensors and update a resulting template sensor in HA?

I was thinking that probably the best thing to do is fire an event from the ESPHOME device to HA and update the sensor with an automation, which is more or less what you suggested

so I set up the second RF received but now I have some doubt if the strategy I suggested above is the best or not…

Does anyone have a better suggestion about how to implement multiple ESPHOME RF receiver in HA?

Ancient topic, I know but I can’t find much else on this problem of using multiple receivers.

I use one “main” RFBridge that runs ESPHome with MQTT but no Home Assisstant “api:” line (disabled). This one is the one that shows up in Home Assistant under mqtt devices.

An “echo” RF receiver (also a Sonoff Bridge actually) uses the exact same YAML config, but of course with a different name. The echo receiver does not seem to show up in Home Assistant but I see it with MQTT Explorer.

Here is the key, under mqtt:

  topic_prefix: rfbridge # this line ensures all devices send the same...
  #empty topics disable availability reporting:
  birth_message:
    topic: ${name}/status
    payload:
  will_message:
    topic: ${name}/status
    payload:

The first device is called rfbridge so this ensures all devices broadcast to the same mqtt. It may be necessary during initial discovery by Home Assistant to NOT do this with the main bridge and instead use the usual birth/will messages (online/offline).

I haven’t played around enough to be sure of this but I would suspect it’s not a problem. The echo device doesn’t show up in HA simply because HA thinks it has no sensors or switches…?

I also delays by default in the binary sensors:

#------ Remote1 'a' key
  - platform: remote_receiver
    name: "RF Remote1a"
    rc_switch_raw:
      code: '010100001110110101011000'
      protocol: 1
    filters:
      - delayed_off: 100ms

Also, I have 100ms delays at the end of any automations that are triggered… those delays might need to be increased, depending on distance between receivers…?


Edit: a few days and it seems that trying to use 2 Sonoff RFBridges (both with ‘direct hack’ applied) causes both receivers to NOT receive signals at all…

Considering my options and I’ll come back if I figure it out.