MQTT doorbell event

Dear all,

I managed to get a doorbell read by the rtl_433 add-on. It sends a MQTT message whenever the button is pressed. I never worked manually with MQTT, but this is a screenshot from MQTT Explorer:

In a naive first approach I put this in my configuration.yaml:

mqtt:
  - event:
      name: "Türklingel"
      state_topic: "rtl_433/9b13b3f4-rtl433-next/devices/Honeywell-ActivLink/Doorbell/476604/alert"
      event_types:
        - press
      device_class: "doorbell"
      unique_id: turklingel

But this entity does not register anything when a message arrives on the MQTT server. I think I need more than this to later create an automation when the doorbell is ringing?

Thanks for your help

Hello Tobster77,

You would need to create an mqtt sensor that reads that topic and creates an entity for you.

alias: Front Door Bell
description: ""
mode: single
triggers:
  - topic: rtl_433/9b13b3f4-rtl433/devices/Generic-Remote/3745/tristate
    payload: 001XXX0Z00XX
    trigger: mqtt
conditions: []
actions:
  - data:
      message: TTS
      data:
        tts_text: Front door bell
        media_stream: alarm_stream_max
        tag: Alarm
        priority: high
    action: notify.mobile_app_sm_g981u1

You can just use an automation to alert you when doorbell rings without creating a sensor.

1 Like

Hello @Spiro,

thanks. But I would appreciate to have an entity that monitors all rings. Is there a simple way?

Hello @Sir_Goodenough,

I was hoping that the code above would just do this from what I found in the documentation.

Unfortunately, the code is not working as intended. Would you have a correction?

@Sir_Goodenough This worked very well, thanks:

mqtt:
  - binary_sensor:
      name: "Türklingel"
      state_topic: "rtl_433/9b13b3f4-rtl433-next/devices/Honeywell-ActivLink/Doorbell/476604/alert"
      payload_on: "Normal"
      off_delay: 1
      unique_id: turklingel

Still, this is not a really consistent solution (while it does the job!): I have to manually reset the switch after a second. A doorbell is a button, not a switch.

The HA documentation of MQTT events explicitly mentions “MQTT events are stateless. For example, a doorbell does not have a state like being “on” or “off” but instead is momentarily pressed.”

This would really make sense, but where is my implementation of the MQTT event (as tried above) wrong? It simply does not react when I press the doorbell, while the binary switch does.

Well, you really need to learn to search a bit… There atr about a dozen MQTT entity types…
I don’t know which one you want?

1 Like

Not sure if I got you right: I searched and I found the “MQTT Event” type: MQTT Event - Home Assistant

As I wrote, “MQTT Event” looks like the right approach, but I’m to inexperienced to implement it properly, I assume.

I also found the “MQTT Button” as you did, but this seems to be a sending unit, not a receiving one.

Not sure I got your criticism right?

Still lost. Can someone support me with a proposal how to get the MQTT Event configured?
Thanks!