Integrating existing 433 mhz alarm to Home assistant

Hi. Im trying to integrate my existing 433 mHz alarm system to HA.

What i want is to:
-Make HA sensors trigger the alarm system when armed
-Be able to arm/disarm alarm via HA
-Make the alarm system set specific scene/activate automation when triggered/armed.

However im really struggling on the first leg: making HA send commands to the alarm system.

My Sonoff RF is set up and works with HA via MQTT. (im able to see and read the device).

I have swiped a bunch of sites on the net, but still without breaktrough.

My config looks like this (three attempts on same issue)

No 1:

alarm_control_panel:
  - platform: mqtt
    command_topic: "cmnd/Sonoff_RF/RfCode"
    state_topic: "tele/Sonoff_RF/RfCode"
    name: "MQTT alarm"
    value_template: "{{value_json.RfReceived.Data}}"
    payload_disarm: "0CF8F1"
    payload_arm_away: "0CF8F1"

Makes the console state: “21:26:55 MQT: stat/Sonoff_RF/RESULT = {“RfCode”:850161}”

No 2:

alarm_control_panel:
  - platform: mqtt
    name: "MQTT alarm 2"
    command_topic: "cmnd/sonoff_RF/Backlog"
    availability_topic: "tele/sonoff_RF/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    state_topic: "tele/sonoff_RF/RESULT"
    value_template: '{{value_json.RfCode}}'
    payload_arm_away: "RfSync 17490; RfLow 590; RfHigh 1700; RfCode #0CF8F1"
    payload_disarm: "RfSync 17490; RfLow 590; RfHigh 1700; RfCode #0CF8F1"

No result from the console.

No 3:

  - platform: mqtt
    command_topic: "cmnd/Sonoff_RF/RfCode"
    state_topic: "tele/Sonoff_RF/RfCode"
    name: "MQTT alarm 3"
    value_template: "{{value_json.RfReceived.Data}}"
    payload_disarm: "RfSync #17490; RfLow #590; RfHigh #1700; RfCode #0CF8F1"
    payload_arm_away: "RfSync #17490; RfLow #590; RfHigh #1700; RfCode #0CF8F1"

No 3 gives the same result as no 1.

-As a remark, i see it as i send a hex code but the result is in “regular numbers”!?

-What do i do wrong? Please help.

Much appreciated!

Btw. none of the above triggers any actions with my alarm system

Have you tried the # symbol in the first format? This is similar to how I trigger my siren.

alarm_control_panel:
  - platform: mqtt
    command_topic: "cmnd/Sonoff_RF/RfCode"
    state_topic: "tele/Sonoff_RF/RfCode"
    name: "MQTT alarm"
    value_template: "{{value_json.RfReceived.Data}}"
    payload_disarm: "#0CF8F1"
    payload_arm_away: "#0CF8F1"

[/quote]

Thanks for the reply. Apparently the # does not make any difference regarding the result.

Furthermore im conserned about the result stating a numeric value and not a hex-code. Is that normal?

Can you paste your code for reference?

Yes - I think it doesn’t matter - the Sonoff sends the data the same regardless of whether you specify in hex or decimal.

I don’t have an alarm as such, just a bunch of sensors and some HA automations that trigger the siren and send a SMS notification. The siren is configured as a switch:

switch:
  - platform: mqtt
    name: "Siren"
    command_topic: "cmnd/bridge/rfcode"
    payload_on: "#08AC88"
    payload_off: "#08AC82"
    retain: true
    optimistic: true

When I was setting this up, I just used the command interface of the Sonoff bridge (running Tasmota) to test the commands. Saved a lot of mucking around editing YAML and restarting HA.

Tasmota command reference for rf bridge: https://tasmota.github.io/docs/Commands/#rf-bridge

Thanks for the reply.

Im now able to read the codes from my alarm system panel.

However it seems like the panel only sends out the same payload when arming/disarming. Seems like its mostly to send a signal to the sirens to “beep” when activating/deactivating. -I would love to be able to read out the state-change. … but it seems like my Chuango S5 plus does not make me do that.

I still can not get the “send” command to work. -however i made a workaround, as i learned my Tasmota the required payloads, and can now use “cmnd/Sonoff_RF/rfkeyX” which works to me like this:

 switch:
  - platform: mqtt
    name: "Tilslut alarm"
    command_topic: "cmnd/Sonoff_RF/rfkey1"
    payload_on: "6"
    payload_off: "6"
    retain: true
    optimistic: true

Can you please paste the exact code you used in the command interface, as i can not make that work either (except the “cmnd/Sonoff_RF/rfkeyX” command.

Best regards.