[RELEASE] Visonic Powermax Alarm

dth_security
dth_sensors
requires_server
project_security
project_sensors

(cjcharles) #306

The level converters I could never get working and reliable hence why I used an Arduino. I think if you just change the level you still get some switching noise passed on to the Wemos, or something similar, hence can get problems, Would suggest that Arduino solution is your best and easiest bet


(Antonio) #307

Thank you Charles for your help.

I have flashed WEMOS and Arduino Nano, and I have the same situation than when direct wired comms.

I think that no powerlink enrolment is possible with my panel. could you help me on this @cjcharles? any clue to work on it?

I copied text data from log file (powermaxwin utility), screen messages and final JSON state.

TEXT LOG DATA:

PC [22:10:52]0x0D,0x0F,0xF0,0x0A [DLOAD EXIT]

PC [22:10:53]0x0D,0xAB,0x0A,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x06,0x0A [INIT]

PM [22:10:53]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PC [22:11:04]0x0D,0x24,0x00,0x00,0x36,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x0A [DLOAD START]

PM [22:11:05]0x0D,0x02,0xFD,0x0A [ACK]

PM [22:11:05]0x0D,0x08,0xF7,0x0A [ACCESS DENIED]

PM [22:11:17]0x0D,0xA5,0x00,0x04,0x08,0x47,0x00,0x00,0x02,0x00,0x00,0x00,0x43,0xC1,0x0A [Status Update Panel]

PC [22:11:17]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:17]0x0D,0xA7,0x01,0x00,0x00,0x61,0x00,0x00,0x02,0x00,0x00,0x00,0x43,0xB0,0x0A

PC [22:11:17]0x0D,0x02,0x43,0xBA,0x0A [ACK]

P? [22:11:22]0x00,0x0D,0xA5,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x16,0x0A,0x0D,0xF1,0x07,0x43,0x00,0x00,0x8B,0x56,0x0A

PM [22:11:25]0x0D,0xA5,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x16,0x0A

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x15,0x0A [Status Update Zone Battery]

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x14,0x0A [Status Update Zone tamper]

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x04,0x00,0x41,0x00,0x00,0x00,0x04,0x00,0x00,0x43,0xCD,0x0A [Status Update Panel]

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x05,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x43,0x11,0x0A

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x06,0x00,0x08,0x00,0x30,0x00,0x00,0x00,0x00,0x43,0xD8,0x0A [Status Update Zone Bypassed]

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x10,0x0A

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA5,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x0F,0x0A

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA7,0x01,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0xF7,0x0A

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:25]0x0D,0xA7,0x01,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0xB3,0x0A

PC [22:11:25]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:27]0x0D,0xA5,0x00,0x04,0x00,0x25,0xFF,0x0D,0x02,0x00,0x00,0x00,0x43,0xDE,0x0A [Status Update Panel]

PC [22:11:27]0x0D,0x02,0x43,0xBA,0x0A [ACK]

PM [22:11:27]0x0D,0xA7,0x01,0x00,0x00,0x2D,0xFF,0x0D,0x02,0x00,0x00,0x00,0x43,0xD7,0x0A

PC [22:11:27]0x0D,0x02,0x43,0xBA,0x0A [ACK]

SCREEN MESSAGES:

[6][serialHandler @ 34] — new packet 22:10:53 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Acknowledgement’

[6][serialHandler @ 34] — new packet 22:11:05 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Acknowledgement 2’

[6][serialHandler @ 34] — new packet 22:11:05 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Access denied’

[6][PowerMaxAlarm::OnAccessDenied @ 1288] Access denied

[6][serialHandler @ 34] — new packet 22:11:17 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Status Update Panel’

[6][PowerMaxAlarm::OnStatusUpdatePanel @ 1464] System status: Programming (8), Flags : Ready Alert-in-Memory Trouble Arm/disarm-event

[6][serialHandler @ 34] — new packet 22:11:17 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Panel status change’

[6][PowerMaxAlarm::OnStatusChange @ 1319] PmaxStatusChange: ‘Installer Programming’ by ‘System’(0x0)

[4][serialHandler @ 50] Passing invalid packet to packetManager

[3][PowerMaxAlarm::handlePacket @ 1800] Packet not correctly formated

[3][logBuffer @ 1588] Buffer: 0D A5 00 01 00 00 00 00 00 00 00 00 43 16 0A 0D F1 07 43 00 00 8B

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1794] Packet not recognized

[6][logBuffer @ 1588] Buffer: A5 00 01 00 00 00 00 00 00 00 00 43

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Status Update Zone Battery’

[6][PowerMaxAlarm::OnStatusUpdateZoneBat @ 1546] Status Update : Zone state/Battery

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Status Update Zone tamper’

[6][PowerMaxAlarm::OnStatusUpdateZoneTamper @ 1375] Status Update : Zone active/tampered

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Status Update Panel’

[6][PowerMaxAlarm::OnStatusUpdatePanel @ 1464] System status: Disarmed (0), Flags : Ready Arm/disarm-event

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1794] Packet not recognized

[6][logBuffer @ 1588] Buffer: A5 00 05 00 00 00 00 01 00 00 00 43

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Status Update Zone Bypassed’

[6][PowerMaxAlarm::OnStatusUpdateZoneBypassed @ 1413] Status Update : Zone Enrolled/Bypassed

[6][PowerMaxAlarm::OnStatusUpdateZoneBypassed @ 1422] Zone 12 is enrolled

[6][PowerMaxAlarm::OnStatusUpdateZoneBypassed @ 1422] Zone 29 is enrolled

[6][PowerMaxAlarm::OnStatusUpdateZoneBypassed @ 1422] Zone 30 is enrolled

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1794] Packet not recognized

[6][logBuffer @ 1588] Buffer: A5 00 07 00 00 00 00 00 00 00 00 43

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1794] Packet not recognized

[6][logBuffer @ 1588] Buffer: A5 00 08 00 00 00 00 00 00 00 00 43

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Panel status change’

[6][PowerMaxAlarm::OnStatusChange @ 1319] PmaxStatusChange: ‘General Restore’ by ‘System’(0x0)

[6][serialHandler @ 34] — new packet 22:11:25 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Panel status change’

[6][PowerMaxAlarm::OnStatusChange @ 1319] PmaxStatusChange: ‘System Reset’ by ‘System’(0x0)

[6][serialHandler @ 34] — new packet 22:11:27 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Status Update Panel’

[6][PowerMaxAlarm::OnStatusUpdatePanel @ 1464] System status: Disarmed (0), Flags : Ready Trouble Zone-event

[6][serialHandler @ 34] — new packet 22:11:27 ----

[6][PowerMaxAlarm::handlePacket @ 1786] Command found: ‘Panel status change’

[6][PowerMaxAlarm::OnStatusChange @ 1319] PmaxStatusChange: ‘Control Panel Low Battery’ by ‘System’(0x0)

JSON STATE

{“stat”:0,
“stat_str”:“Disarmed”,
“lastCom”:397,
“panelType”:-1,
“panelTypeStr”:“Alarm-event”,
“panelModelType”:0,
“alarmState”:0,
“alarmStateStr”:“None”,
“alarmTrippedZones”:,
“flags”:37,
“flags_ready”:true,
“flags_alertInMemory”:false,
“flags_trouble”:true,
“flags_bypasOn”:false,
“flags_last10sec”:false,
“flags_zoneEvent”:true,
“flags_armDisarmEvent”:false,
“flags_alarmEvent”:false,
“enroled_zones”:[{“zoneName”:"",
“zoneType”:0,
“zoneTypeStr”:"(null)",
“sensorId”:0,
“sensorType”:"(null)",
“sensorMake”:"(null)",
“signalStrength”:0,
“stat_doorOpen”:false,
“stat_bypased”:false,
“stat_lowBattery”:false,
“stat_active”:true,
“stat_tamper”:false},
{“zoneName”:"",
“zoneType”:0,
“zoneTypeStr”:"(null)",
“sensorId”:0,
“sensorType”:"(null)",
“sensorMake”:"(null)",
“signalStrength”:0,
“stat_doorOpen”:false,
“stat_bypased”:false,
“stat_lowBattery”:false,
“stat_active”:true,
“stat_tamper”:false},
{“zoneName”:"",
“zoneType”:0,
“zoneTypeStr”:"(null)",
“sensorId”:0,
“sensorType”:"(null)",
“sensorMake”:"(null)",
“signalStrength”:0,
“stat_doorOpen”:false,
“stat_bypased”:false,
“stat_lowBattery”:false,
“stat_active”:true,
“stat_tamper”:false}]}


(Antonio) #308

YHi all again,

I compiled the powermaxwin tool with my installer passas powerlink PID and it works nicely now.

I have got some " Packet not recognized"and “Packet not correctly formated”. How can I proceed to debug this protocol errors? is it publisehd some were the protocol?

Thank you in advance.


(cjcharles) #309

So everything is working? Where did you add your master/installer pin? If adding it to powermaxwin then presumably you are using the Wemos as a relay device?

You should also be aware that due to the time to process and display the debug information on the Wemos telnet interface you can end up with the device not working when you put it in debug mode. Once you take it out of debug mode it normally starts working as the Wemos runs a bit faster.

There are always some unknown packets on Powermax since Visonic have never published the full information behind the protocol, but it rarely causes a problem for operation since the errors are typically related to information that is not very important.


(Antonio) #310

Yes, the WEMOS is working as a relay device. WEMOS is not able to get powermax configuration and setup, but the remote windows client, conected to the WEMOS is able to manage the powermax system completly (arm/disarm/ zone names/ state / signal / etc…)

In the PMAX library, there is a “temporal” powerlink enrollment PIN. If I leave it with the default value (as it is suggested in the comentaries, “Does not have to match any of user or installer codes.”) my WEMOS is not able to enroll at all (i waited several times, with resets and power off, several minutes… and no enrollment is achieved).

If I put my master or normal instaler code there:

#define POWERLINK_PIN 0x3622;

It works nicely.

I will try to compile the WEMOS firmware with this parameter chaged and I will give you feedback with the results.

Thank you for the info Charles,

Antonio


(cjcharles) #311

Im Chris actually! I will integrate that code change into the settings page this week, since using a pin of AAAA is needed to get Powermaster systems pairing - so makes sense to make it accessible for everybody. I just havent seen any Powermax systems where you cannot use the default PIN which is defined by Powerlink… Maybe that is partly behind some of the systems online not working too…

Hence I suggest you can hold fire for a couple more days and then you can use the finished firmware file which should work completely.


(Antonio) #312

Ok Chris, keep me updated please!

Antonio


(Antonio) #313

I have recompiled your firmware with the installer code hardcoded and it works nicely too.

One question Chris, what is it exactly the MQTT functionality? is it reporting to the server each powermax message? I mean, can we monitor the PM messages in the same way that we can do it with the powermaxwin utility?

Thank you


(cjcharles) #314

Ok great, MQTT allows you to send Powermax messages to other Smart Home platforms which use MQTT as a message format. This it particularly relevant for things like OpenHAB or similar. It is probably not useful for most people, but for some it will be useful.