Issue with MQTT Alarm Panel

I’m trying to link my Visonic Alarm panel via MQTT but HA can’t see to get the status of it.

It can push events just fine, I can arm/disarm via the service dev tool but on the UI it just shows up as Unknown.

Am I missing some configuration?

Capture

- platform: mqtt
  name: Visonic Alarm
  state_topic: "smartthings/Visonic Alarm/alarm"
  command_topic: "smartthings/Visonic Alarm/alarm"
  payload_disarm: "off"
  payload_arm_home: "strobe"
  payload_arm_away: "siren"
  retain: true

Having state topic and command topic being the same certainly looks suspicious: the commands will be off, strobe, and siren but the states are off and armed_away - I suspect your commands are overwriting the state information.

That makes sense, I’m just not sure what the valid state topic would be. I can only see smartthings/Visonic Alarm/alarm in the logs.

Did you run some MQTT client to look at the different messages?

I’m a little new to this so forgive me but I just monitored the broker logs to see what came in, and that’s the only thing I could see related to the alarm. Not sure what else to check.

What model are you using to connect to ST? If decent price, I can pick one up and test it out.

Basically, it’s a Visonic Powermax alarm which connects to SmartThings via a Wemos D1 R2. Info at the link below.

So after a bit of playing around, it seems I need to figure out how to publish the state topic changes into its own topic (something like Visonic Alarm/status) and point the status topic to that.

I’ve managed to get the status to show as “Armed Home” by running this in the dev tool, but obviously I need to find a way to publish these status changes automatically.

{
  "topic": "smartthings/Visonic Alarm/status",
  "payload": "armed_home"
}

Does anyone have of any examples of scripts that do this sort of thing?

Alright, in case anyone finds this useful, I’ve found a semi-ish solution that seems to work (for the past hour or so at least). It’s just an automation that calls the service to change the state topic so it displays correctly on the HA front end. It’s my first automation, and it was actually a pretty fun learning experience.

It’s probably terrible and not the most efficient, but it suits my needs as of right now.

- id: ArmHome
  alias: "Armed Home"
  initial_state: "on"
  trigger:
    platform: mqtt
    topic: "smartthings/Visonic Alarm/alarm"
    payload: "strobe"
  action:
    service: mqtt.publish
    data:
      topic: "smartthings/Visonic Alarm/status"
      payload: "armed_home"
      
- id: Disarmed
  alias: "Disarmed"
  initial_state: "on"
  trigger:
    platform: mqtt
    topic: "smartthings/Visonic Alarm/alarm"
    payload: "off"
  action:
    service: mqtt.publish
    data:
      topic: "smartthings/Visonic Alarm/status"
      payload: "disarmed"
      
- id: ArmAway
  alias: "Armed Away"
  initial_state: "on"
  trigger:
    platform: mqtt
    topic: "smartthings/Visonic Alarm/alarm"
    payload: "siren"
  action:
    service: mqtt.publish
    data:
      topic: "smartthings/Visonic Alarm/status"
      payload: "armed_away"

Great idea. I use a Nodemcu (ESP8266) with my Visonic and the smartthings firmware you mentioned. I had to reconfigure the payloads and topics but now it’s up and running. Thanks!

1 Like

Sorry to dig this one up…
could you show more information on how

What needs to go into the configuration.yaml?