[OBSOLETE] Visonic Powermax Alarm

Device handler is Alarm Panel Bridge as a copy of your code

I have been using this for a while now, using mqtt to control my alarm panel from Home Assistant.
But, after some time the mqtt component hangs. Once a day or so. I can still control the alarm panel from the nodemcu web interface and status is correctly read from the panel. MQTT commands are not received and MQTT status messages are not published. A soft reset issued from the web interface solves the issue. Any ideas?

Hi, I’m in the UK and just started using SmartThings. I use a Powermax+ and am amazed at what you’ve developed - very keen to integrate it!
Please could you advise if you still sell the required ‘plug and play’ kit?
Thanks!

@fredrik_P Somebody else has reported an mqtt depot that happens after a few days. As soon as I’m back ill investigate what is causing that, seems a bug in mqtt library, or a quirk in how I’m using it.

@alleycatuk Yes I’m still selling them, though currently on honeymoon so i closed my ‘shop’. Will post on here in about a week and a half when I’ll reopen it.

@R_M Just checking you are using the actual mac address rather than what you just pasted here. Can you give me a screenshot?

@cjcharles thank you and congratulations! Enjoy your honeynoon - perhaps best you don’t spend ages on the ST board :wink:
Will check back towards end of Feb. Thanks

@Fredrik_P, would you mind sharing your Home Assistant configuration/Python scripts. I started to look at it without too much success. With mqtt_sub, I can see the state of the zones but I don’t think you get any topic for status like “disarmed”.

Alarm/panel has the panel status information while alarm/zoneX has the zone status. Alarm/set for changing state (use the same names/identifiers as ST)

I made a quick and dirty fix (not my idea, I’ll link to the original post where I got the idea from as soon as I find it). I use automations with mqtt to simply translate messages and repost them in another topic. I’ll give you the details.

I can change the topic structure if needed and you have a better proposal? I dont use MQTT so it was just my guess for how to structure things


This is my quick fix for this:

configuration.yaml:

alarm_control_panel:

  • platform: mqtt
    name: “Visonic Powermax Pro”
    code: “****”
    state_topic: “alarm/panelstatus”
    command_topic: “alarm/set”
    payload_disarm: “disarm”
    payload_arm_home: “armhome”
    payload_arm_away: “armaway”

automations.yaml:

  • id: Disarmed
    alias: Disarmed
    initial_state: ‘on’
    trigger:
    platform: mqtt
    topic: alarm/panel
    payload: Disarm
    action:
    service: mqtt.publish
    data:
    topic: alarm/panelstatus
    payload: disarmed
    retain: true
  • id: Armedhome
    alias: Armedhome
    initial_state: ‘on’
    trigger:
    platform: mqtt
    topic: alarm/panel
    payload: Arm Home
    action:
    service: mqtt.publish
    data:
    topic: alarm/panelstatus
    payload: armed_home
    retain: true
  • id: Armedaway
    alias: Armedaway
    initial_state: ‘on’
    trigger:
    platform: mqtt
    topic: alarm/panel
    payload: Arm Away
    action:
    service: mqtt.publish
    data:
    topic: alarm/panelstatus
    payload: armed_away
    retain: true

Thanks @Fredrik_P, that helped me to get started.

@cjcharles here are the changes I made (I essentially changed the state labels) to get it working out of the box with a minimal configuration on the Home Assistant side:

configuration.yaml:
alarm_control_panel:

  • platform: mqtt
    name: Alarm
    state_topic: “alarm/panel”
    command_topic: “alarm/set”

ESP-PowerMaxESP8266.ino:

  1. Change in SendJSONMessage():
    //Now publish the message with retain flag (the ‘true’ parameter)
    if (zone_or_system_update == ALARM_STATE_CHANGE) {
    char state[25];
    strcpy(state, ZoneOrEvent);
    if (strcmp(state, “Disarm”) == 0) {
    strcpy(state, “disarmed”);
    }
    if (strcmp(state, “Arm Home”) == 0 || strcmp(state, “Quick Arm Home”) == 0) {
    strcpy(state, “armed_home”);
    }
    if (strcmp(state, “Arm Away”) == 0 || strcmp(state, “Quick Arm Away”) == 0) {
    strcpy(state, “armed_away”);
    }
    if (strcmp(state, “Perimeter Alarm”) == 0) {
    strcpy(state, “triggered”);
    }
    mqtt.publish(topic, state, true);
    }

  2. Change in mqttcallback():
    if (strcmp(message, “DISARM”) == 0 || strcmp(message, “ARM_AWAY”) == 0 || strcmp(message, “ARM_HOME”) == 0) {
    mqtt.publish(“alarm/panel”, “pending”, true);
    }
    if (strcmp(message, “DISARM”) == 0) handleDisarm();
    if (strcmp(message, “ARM_AWAY”) == 0) handleArmAway();
    if (strcmp(message, “ARM_HOME”) == 0) handleArmHome();
    if (strcmp(message, “armawayinstant”) == 0) handleArmAwayInstant();
    if (strcmp(message, “armhomeinstant”) == 0) handleArmHomeInstant();
    }

I tried that before, and also some other things but couldn’t get it to compile. Got errors that I couldn’t fix. I’ll look at it again.

Hope you had a great honeymoon! :blush:
yep used the actual mac address which I also fixed in the router and have sent you a message with the screenshots in
fingers crossed it’s an easy fix!

Thanks

@Fredrik_P check my fork with an updated pmax.h and ESP-PowerMaxESP8266.ino which should compile fine.

Sorry, stupid question maybe, but where can I find it?

Here is the direct link:

https://github.com/passy05/SmartThings/tree/master/VisonicAlarm/ESP-Source-Code

Hi All,

I am looking to update my current alarm with a alarm system connected to SmartThings, and came across this thread. Looking for an alarm system so that I can program my ST which things like (if the alarm is set, do this otherwise do that) type controls.

I am looking at the PowerMax Complete. Is this all working for this level of alarm panel?
Basically, in a nutshell, does it work, and will it continue to work?

Thanks.

That’s the model i have, so in a nutshell yes! As for all other versions, I’m virtually confident they’ll all be fully working soon, now that I’m back home.

1 Like

Hi, sorry its taken so long to be able to connect everything up.
So I have a powermaster 30.

I have connected using:
just the Wemo D1 and with port 9 (TX1) going to the TTL > USB & GND -> GND
with it plugged in, and a little trial and error I have found that the settings for putty & the device need to be
bits per second : 57600
data bits : 8
parity : none
stop bits 1 :
flow control : none

Using this I can then connect putty & grab what is coming out.
When I click on the status button I a load of Hex codes:
pastbin logs (https://pastebin.com/dwwF4CxN)

I’ve disconnected the setup for now. but hoping that makes some kind of sense to you?

Heya mate, hope all is well.
Just wondering if you had any more ideas I could try please?
This was the main reason why I got ST so might sell it on if I can’t get this to work :confused: