433 Mhz Siren setup with HA Alarm Panel and Sonoff RF Bridge

Hello everyone,

I added a few 433 Mhz alarms around the house and in front porch connected to the HA Alarm Panel. The Tasmotized Sonoff RF Bridge will send a signal to set them off and disarm. And the Automation is done using MQTT Publish.

Here are the components I used.

  1. Sonoff RF Bridge (Running Tasmota)
  2. Digoo DG-ROSA 433MHz siren (It has a built-in backup battery!)

This particular Siren, when placed in code learning mode, gets triggered by RfKey4/8/12/16 of the RF Bridge and the RfKey2/6/10/12 will turn the alarm off. You do not need any payload because the topic sends the code to set siren on or off.

Below is my alarm and binary_sensor entry in configuration.yaml

alarm_control_panel:
  - platform: manual
    name: Home Alarm
    code: !secret alarm_code
    trigger_time: 600
    disarmed:
      trigger_time: 0
    armed_home:
      delay_time: 0
      pending_time: 0
    armed_away:
      delay_time: 60
      pending_time: 30
    triggered:
        pending_time: 0

binary_sensor:
  - platform: mqtt
    name: "Front Door"
    state_topic: "tele/RFBridge_Home/RESULT" #"RFBridge_Home" part will be different for your setup
    value_template: '{{value_json.RfReceived.Data}}'
    payload_on: '33810A'     #Find this codes using RF Bridge Console
    payload_off: '33810E'    #Find this codes using RF Bridge Console
    device_class: door
    qos: 1

Here is my automations.yaml

##################################
# Alarm System
##################################

  - alias: Trigger alarm while armed
    initial_state: 'on'
    hide_entity: true
    trigger:
      - platform: state
        entity_id: binary_sensor.front_door
        to: 'on'
    condition:
      condition: or
      conditions:
        - condition: state
          entity_id: alarm_control_panel.home_alarm
          state: armed_away
        - condition: state
          entity_id: alarm_control_panel.home_alarm
          state: armed_home
    action:
      service: alarm_control_panel.alarm_trigger
      entity_id: alarm_control_panel.home_alarm

  - alias: Sound Siren when alarm triggered
    initial_state: 'on'
    hide_entity: true
    trigger:
      - platform: state
        entity_id: alarm_control_panel.home_alarm
        to: triggered
    action:
      - service: mqtt.publish
        data:
          topic: cmnd/RFBridge_Home/RfKey4
          payload: ""

  - alias: Turn off Siren after triggered alarm disarmed
    initial_state: 'on'
    hide_entity: true
    trigger:
      - platform: state
        entity_id: alarm_control_panel.home_alarm
        to: disarmed
    action:
      - service: mqtt.publish
        data:
          topic: cmnd/RFBridge_Home/RfKey2
          payload: ""

Hope that helps someone!

4 Likes

very nice setup and easy configuration

how long does the battery last when the siren is activated ?

MQTT doesn’t work like that.

the topic sends the code

Topics never send anything. Payloads are published to topics. Even if a payload consists of an empty string (NULL value) it can still be published to a topic.

In addition, your code is literally contradicting the statement “You do not need any payload”

    action:
      - service: mqtt.publish
        data:
          topic: cmnd/RFBridge_Home/RfKey4
          payload: " " # <---- publishing a payload

If you have any other RF sensors that will report their state, the configuration for the binary_sensor will also receive their payloads and cause Home Assistant to produce warning messages (“No matching payload for entity …”).

The reason is because the binary_sensor’s configuration only looks for two matches: 33810A and 33810E. If it receives any other payload, it can’t match it to anything and you’ll get a warning message.

Here’s how to prevent it. In this version, the value_template always report a valid state even if it has no match for the received payload.

- platform: mqtt
  name: 'Front Door'
  state_topic: 'tele/RF_Bridge/RESULT'
  value_template: >-
    {% if value_json.RfReceived.Data == '33810A' %}
      {{'ON'}}
    {% elif value_json.RfReceived.Data == '33810E' %}
      {{'OFF'}}
    {% else %}
      {{states('binary_sensor.front_door') | upper}}
    {% endif %}
  device_class: door
  qos: 1

For more information:
Sonoff RF Bridge. Strategies for receiving data

@chils41 - I assume this worked because you learnt the arm/disarm and sos commands from the digoo remote?

If so can you do me a favour and send the codes to me? Tasmota will display them using the RFkey 5 command, so for yours RFkey4 5, RFkey6 5 and whatever the SOS button is assigned to as well.

Thanks

For anyone that ends up at this topic, and like me bought the siren but not the remote, the RF codes to usefully implement this thing are as follows.

On Tasmota console execute the following commands:

RfSync 13100
RfHigh 1250
RfLow 420

Put the siren in programming mode for a remote (long press and release after single beep).

RfCode #xxxx88

Where xxxx is any 4 digit hex string.

This is the SOS code. The siren will now recognise xxxx84 as “Arm Home”, xxxx81 as “Arm Away” and xxxx82 as “Disarm”

An easy exercise for the reader would be to have an automation that would trigger the alarm with the SOS code and silence it with the Disarm code. The automation can be triggered by anything you like in HA of course.

3 Likes

Nice article. It helped me setting up this sirene and use it with a similar setup.

So RfKey4/8/12/16 are for ARM
and RfKey2/6/10 will disarm the sirene

But: what does RfKey 1/3/5/7…/15 do?
The sirene beeps once when I send to this topic.

Other thing that annoys me is the beep when disarming in the morning. It wakes me up!
Does anyone know how to disarm it silently?

Just wondered if anyone has managed to get the volume lower when arming and disarming, as a siren it’s fine, but @ rfontijn has stated it is a tad loud just for setting home and away arming and disarming, it would be good if it could be done / lowered :slight_smile:

Thanks for this information!
Stupid question: how exactly (where, syntax) does I send these commands?
does I have to do something before?

I assume you are running Tasmota on your bridge? At the main menu of the web interface, there is a console option. Choose that, the console will be displayed and you can enter commands in the box at the bottom.

Thanks @zoogara
Yes, that is correct and I know the console, but I used it only to read the data for the mqtt-payload.
I’ve seen the box to enter commands, but how is the syntax in this case to execute the commands as you described in the post of Jul20?

Exactly as shown. This is the result:

20:02:17 CMD: RfSync 13100
20:02:17 MQT: stat/bridge/RESULT = {"RfSync":13100}
20:02:41 CMD: RfHigh 1250
20:02:41 MQT: stat/bridge/RESULT = {"RfHigh":1250}
20:03:04 CMD: RfHigh 1250
20:03:04 MQT: stat/bridge/RESULT = {"RfHigh":1250}
20:03:47 CMD: RfCode #ABCD88
20:03:47 MQT: stat/bridge/RESULT = {"RfCode":"#ABCD88"}

Before the RfCode command put the siren in programming mode, as if you were teaching it a remote.

Once you have done the above, you can turn on and off the siren using a switch:

  - platform: mqtt
    name: "Siren"
    command_topic: "cmnd/bridge/rfcode"
    payload_on: "#ABCD88"
    payload_off: "#ABCD82"
    retain: true
    optimistic: true

Call the switch.turn_on service to sound the alarm, the switch.turn_off to silence it.

  - service: switch.turn_on
    entity_id: switch.siren

@zoogara many thanks for this clear instuctions! :smiling_face_with_three_hearts:
unfortunately it doesn’t work in my config… :roll_eyes:

here is what I have done:

  1. three commands on tasmota console:
    image

  2. setting siren in command mode (press set till beeps once)

  3. command with Alarmcode
    image

  4. setting up mqtt switch:

#Configuration MyStrom
  - platform: mqtt
    name: "Diggo Sirene"
    command_topic: "cmnd/tasmota_EF53BF/rfcode"
    payload_on: "#AFAD88"
    payload_off: "#AFAD82"
    retain: true
    optimistic: true

when I toggle the switch on or off, nothing happens…

in mqtt-browser I get the following entries.

Any idea what I did wrong?

could be the problem, beause I use strategy 2 as described in this post?
Sonoff RF Bridge. Strategies for receiving data - Share your Projects! - Home Assistant Community (home-assistant.io)

I got it :relaxed:

I followed the manual which was sent with the siren to do the paring process.
Afterwards I serached on youtube for pairing examples, these I found are different, but they worked!
It seems that in the manual it’s the wrong process described or I have missunderstood it :rofl:

Good. To check in the console if the bridge is sending the SOS code to trigger the siren, look for something like:

14:11:57 MQT: stat/bridge/RESULT = {"RfCode":"#ABCD88"}
1 Like

short note to thank you for the guide. It worked perfectly with this siren which is solar powered.

hello i have same problem can you tell the right procedure for this ? thankyou