Alarm component for DMP alarm system

That output looks like it is working like it should be. 1234+V indicates successful remote connection, and the message 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 002"1 \c 02"NP\ means that it was armed by the remote user (you via HA) and it’s calling that into monitoring. The 1234 Za\068\t "BU\z 001"DINING RM WINDOW\a 001"1 \c 02"NP\ means it got a burglary alarm from zone 1, area 1, dining room window. So it looks like the commands are going back and forth like it should.

I will probably add a few finishing touches to it tonight to clean up the debug log a bit further and maybe add some more features but it looks like that hotpatch solved it. Thanks for being so quick with the testing!

1 Like

No prob, and thanks again. I will do more testing to see if I can let you know any weird cases that may be going on. It is generally working but sometimes it doesn’t seem like it is responding, or maybe one area is having issues. Like right now I am able to arm and disarm areas 1 and 3 – but 2 isn’t reacting. I’ll try to get you specific information from further testing so please don’t worry about it! I’m thrilled it is working this well already!

But is this normal? It kind of looks like some variable is being appended to and running away?

Eh sorta, the 01234012340123401234 bit is (as far as I know) normal, it’s just part of the response. It shouldn’t mash up the commands though, that’s due to me not flushing the buffer after each command (you have to send 4 commands to get it to arm; disconnect to drop any existing sessions; connect; the actual arm command; then disconnect again). i’m going to do a massive overhaul of the library and make it into a python library that gets imported so hopefully it can get merged into HA mainline.

1 Like

I’ve just resumed debugging/troubleshooting and can’t quite figure out why arms/disarms are not working in some cases.

Will arming/disarming fail if there are no zones setup for an area? This is a long shot because I swear the arming/disarming sometimes works for all three areas I have setup. I’m going to program some zones into all the areas to try to rule that out. I doubt this is the cause as just now I’m getting sporadic results on my “Perimeter” area… it armed and disarmed and then I couldn’t repeat. Eventually it armed again but now I can’t disarm. Wait… now I got the second area to arm and disarm, and now the first area disarmed. Hmmmm.

Does my configuration seem okay? (see previous post)

The default UI component has Arm Home and Arm Away – are both of those functional? And if a zone is already armed as Home or Away, do further arming actions only work if they are requested into the same mode?

@baddienatalie I added in a few simple debug messages to log when I’m pressing the arm or disarm and I think this shows several button presses and only one arming that completed for area 002, correct? Eventually I got area 003 to arm too but then could not disarm either of them.

2021-09-25 19:06:25 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:06:27 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-25 19:06:36 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:06:38 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:09:17 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:09:19 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:09:35 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:09:37 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-25 19:09:38 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5039)
2021-09-25 19:09:38 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 19:09:38 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: A4E7 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 002"1 \c 02"NP\ 
2021-09-25 19:09:38 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-25 19:09:38 DEBUG (MainThread) [custom_components.dmp] Area 002 has been updated
2021-09-25 19:09:38 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-25 19:09:49 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5040)
2021-09-25 19:09:49 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 19:09:49 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 98A9 1234 s0700240 
2021-09-25 19:09:49 INFO (MainThread) [custom_components.dmp] 1234: Received checkin message
2021-09-25 19:09:49 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-25 19:10:13 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5041)
2021-09-25 19:10:13 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 19:10:13 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-25 19:10:13 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-25 19:13:52 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5052)
2021-09-25 19:13:52 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 19:13:52 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 98A9 1234 s0700240 
2021-09-25 19:13:52 INFO (MainThread) [custom_components.dmp] 1234: Received checkin message
2021-09-25 19:13:52 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-25 19:15:11 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:15:13 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-25 19:15:15 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5053)
2021-09-25 19:15:15 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 19:15:15 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 9B17 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 003"3 \c 02"NP\ 
2021-09-25 19:15:15 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-25 19:15:15 DEBUG (MainThread) [custom_components.dmp] Area 003 has been updated
2021-09-25 19:15:15 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-25 19:15:18 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:15:21 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:15:22 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5054)
2021-09-25 19:15:22 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 19:15:22 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-25 19:15:22 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-25 19:15:36 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:15:38 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:15:45 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 19:15:48 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:15:53 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND
2021-09-25 19:15:55 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:16:07 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND
2021-09-25 19:16:09 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:16:18 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND
2021-09-25 19:16:20 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:16:27 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND
2021-09-25 19:16:30 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:16:38 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND
2021-09-25 19:16:40 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 19:16:44 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND
2021-09-25 19:16:47 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'

Response from the panel appears to be different (doesn’t have that long string) when it fails, and it reconnects with a Zs (system message?) code instead of Zq (closing/arming message).

When arming FAILS, it looks like this:

2021-09-25 21:42:37 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 21:42:40 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-25 21:42:42 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 4106)
2021-09-25 21:42:42 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 21:42:42 DEBUG (MainThread) [custom_components.dmp] data from panel E3EF 1234 Zs\022\t 084\c 02"NP\ :
2021-09-25 21:42:42 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-25 21:42:42 DEBUG (MainThread) [custom_components.dmp] Connection disconnected

When arming WORKS it looks like this:

2021-09-25 21:41:25 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND
2021-09-25 21:41:27 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-25 21:41:28 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 4101)
2021-09-25 21:41:28 DEBUG (MainThread) [custom_components.dmp] incoming data to process
2021-09-25 21:41:28 DEBUG (MainThread) [custom_components.dmp] data from panel 64E1 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 001"1 \c 02"NP\ :
2021-09-25 21:41:28 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 64E1 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 001"1 \c 02"NP\ 
2021-09-25 21:41:28 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-25 21:41:28 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-25 21:41:28 DEBUG (MainThread) [custom_components.dmp] Connection disconnected

Do you know how to run a tcpdump? It would be great to get a packet capture of what happens when you arm and disarm the device. For example:

sudo tcpdump -i eth0 -w arm.pcap

assuming your ethernet interface is eth0. It will write to a file called arm.pcap. If you can attach that file here/send it to me I can look at it and get a better idea of what’s going on. Warning, it may have sensitive info in it.

1 Like

Sure – will do. In the meantime, attached are more logs from testing. Am I outputting the arm/disarm string correctly? It looks like…

  • disarm command is “!O02,” for area 2
  • arm command is “!C02,YN” for area 2

What is the YN part in the arming? Looks like there may be a trailing comma on the disarm and is that OK? It obviously is working sometimes so that doesn’t seem like it would be an issue. Otherwise seems like it would fail all the time.

2021-09-26 10:23:42 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C02,YN
2021-09-26 10:23:45 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:24:00 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:24:03 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:27:11 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C02,YN
2021-09-26 10:27:13 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:27:58 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5858)
2021-09-26 10:27:58 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 98A9 1234 s0700240 
2021-09-26 10:27:58 INFO (MainThread) [custom_components.dmp] 1234: Received checkin message
2021-09-26 10:27:58 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:28:08 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5859)
2021-09-26 10:28:08 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 3812 1234 Zq\070\t "OP\u 09999"DEFAULT USER \a 001"1 \c 02"NP\ 
2021-09-26 10:28:08 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:28:08 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-26 10:28:08 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:28:22 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5860)
2021-09-26 10:28:22 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 0315 1234 Zq\076\t "CL\u 00000"NO CODE REQUIRED\a 001"1 \e "AC\c 02"NP\ 
2021-09-26 10:28:22 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:28:22 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-26 10:28:23 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:28:25 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5861)
2021-09-26 10:28:25 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 7415 1234 Zq\076\t "CL\u 00000"NO CODE REQUIRED\a 002"1 \e "AC\c 02"NP\ 
2021-09-26 10:28:25 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:28:25 DEBUG (MainThread) [custom_components.dmp] Area 002 has been updated
2021-09-26 10:28:25 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:28:27 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5862)
2021-09-26 10:28:27 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 8115 1234 Zq\076\t "CL\u 00000"NO CODE REQUIRED\a 003"3 \e "AC\c 02"NP\ 
2021-09-26 10:28:27 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:28:27 DEBUG (MainThread) [custom_components.dmp] Area 003 has been updated
2021-09-26 10:28:27 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:29:28 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:29:30 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:29:31 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5867)
2021-09-26 10:29:31 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: EE28 1234 Zq\070\t "OP\u 32764"REMOTE USER \a 002"1 \c 02"NP\ 
2021-09-26 10:29:31 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:29:31 DEBUG (MainThread) [custom_components.dmp] Area 002 has been updated
2021-09-26 10:29:32 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:29:35 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O03,
2021-09-26 10:29:39 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:29:40 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5868)
2021-09-26 10:29:40 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:29:40 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:29:48 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O01,
2021-09-26 10:29:51 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:33:14 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O03,
2021-09-26 10:33:17 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:33:18 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5876)
2021-09-26 10:33:18 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: D1D8 1234 Zq\070\t "OP\u 32764"REMOTE USER \a 003"3 \c 02"NP\ 
2021-09-26 10:33:18 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:33:18 DEBUG (MainThread) [custom_components.dmp] Area 003 has been updated
2021-09-26 10:33:18 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:33:28 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5877)
2021-09-26 10:33:28 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:33:28 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:33:30 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O01,
2021-09-26 10:33:33 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:33:34 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5878)
2021-09-26 10:33:34 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 2E2E 1234 Zq\070\t "OP\u 32764"REMOTE USER \a 001"1 \c 02"NP\ 
2021-09-26 10:33:34 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:33:34 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-26 10:33:34 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:33:41 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5879)
2021-09-26 10:33:41 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:33:41 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:33:55 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C02,YN
2021-09-26 10:33:58 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:33:59 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5880)
2021-09-26 10:33:59 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: A4E7 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 002"1 \c 02"NP\ 
2021-09-26 10:33:59 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:33:59 DEBUG (MainThread) [custom_components.dmp] Area 002 has been updated
2021-09-26 10:33:59 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:34:05 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C01,YN
2021-09-26 10:34:08 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:34:09 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5885)
2021-09-26 10:34:09 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:34:09 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:34:25 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:34:28 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:34:58 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:35:02 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:35:30 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5886)
2021-09-26 10:35:30 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 0A5B 1234 Zq\070\t "CL\u 00000"NO CODE REQUIRED\a 001"1 \c 02"NP\ 
2021-09-26 10:35:30 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:35:30 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-26 10:35:30 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:35:49 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:35:51 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:35:53 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5888)
2021-09-26 10:35:53 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: D2E6 1234 Zq\076\t "CL\u 32764"REMOTE USER \a 003"3 \e "AC\c 02"NP\ 
2021-09-26 10:35:53 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:35:53 DEBUG (MainThread) [custom_components.dmp] Area 003 has been updated
2021-09-26 10:35:53 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:36:05 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O03,
2021-09-26 10:36:07 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:36:08 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5892)
2021-09-26 10:36:09 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:36:09 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:36:18 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:36:20 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:36:29 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O01,
2021-09-26 10:36:32 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:37:22 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5893)
2021-09-26 10:37:22 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 98A9 1234 s0700240 
2021-09-26 10:37:22 INFO (MainThread) [custom_components.dmp] 1234: Received checkin message
2021-09-26 10:37:22 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:37:37 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:37:39 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:38:29 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:38:32 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:41:07 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O01,
2021-09-26 10:41:09 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:41:18 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:41:21 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:41:24 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O03,
2021-09-26 10:41:27 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:42:47 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O01,
2021-09-26 10:42:50 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00\x02@ 1234+O\r\x00'
2021-09-26 10:42:52 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5904)
2021-09-26 10:42:52 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 2E2E 1234 Zq\070\t "OP\u 32764"REMOTE USER \a 001"1 \c 02"NP\ 
2021-09-26 10:42:52 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:42:52 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-26 10:42:52 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:42:54 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5905)
2021-09-26 10:42:54 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:42:54 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:43:17 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:43:19 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:45:14 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O03,
2021-09-26 10:45:17 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00\x02@ 1234+O\r\x00'
2021-09-26 10:45:19 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5914)
2021-09-26 10:45:19 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: D1D8 1234 Zq\070\t "OP\u 32764"REMOTE USER \a 003"3 \c 02"NP\ 
2021-09-26 10:45:19 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:45:19 DEBUG (MainThread) [custom_components.dmp] Area 003 has been updated
2021-09-26 10:45:19 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:45:21 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5915)
2021-09-26 10:45:21 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:45:21 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:45:31 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:45:33 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00\x02@ 1234+O\r\x00'
2021-09-26 10:45:35 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5916)
2021-09-26 10:45:35 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: EE28 1234 Zq\070\t "OP\u 32764"REMOTE USER \a 002"1 \c 02"NP\ 
2021-09-26 10:45:35 DEBUG (MainThread) [custom_components.dmp] OP opening disarming
2021-09-26 10:45:35 DEBUG (MainThread) [custom_components.dmp] Area 002 has been updated
2021-09-26 10:45:35 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:45:38 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5917)
2021-09-26 10:45:38 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:45:38 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:46:40 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5921)
2021-09-26 10:46:40 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 98A9 1234 s0700240 
2021-09-26 10:46:40 INFO (MainThread) [custom_components.dmp] 1234: Received checkin message
2021-09-26 10:46:40 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:46:54 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C01,YN
2021-09-26 10:46:56 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:46:57 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5922)
2021-09-26 10:46:58 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: 64E1 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 001"1 \c 02"NP\ 
2021-09-26 10:46:58 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:46:58 DEBUG (MainThread) [custom_components.dmp] Area 001 has been updated
2021-09-26 10:46:58 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:47:00 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C02,YN
2021-09-26 10:47:02 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:47:04 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5923)
2021-09-26 10:47:04 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:47:04 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:47:15 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:47:17 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:48:31 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C02,YN
2021-09-26 10:48:34 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:48:35 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5928)
2021-09-26 10:48:35 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: A4E7 1234 Zq\070\t "CL\u 32764"REMOTE USER \a 002"1 \c 02"NP\ 
2021-09-26 10:48:35 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:48:35 DEBUG (MainThread) [custom_components.dmp] Area 002 has been updated
2021-09-26 10:48:35 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:48:58 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:49:01 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:49:02 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5929)
2021-09-26 10:49:03 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: E3EF 1234 Zs\022\t 084\c 02"NP\ 
2021-09-26 10:49:03 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:49:54 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND ARM AWAY COMMAND: !C03,YN
2021-09-26 10:49:56 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00\x02@ 1234+V12012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234012340123401234\r\x00'
2021-09-26 10:49:57 INFO (MainThread) [custom_components.dmp] Connection from ('192.168.0.3', 5930)
2021-09-26 10:49:58 DEBUG (MainThread) [custom_components.dmp] Received data from panel 1234: D2E6 1234 Zq\076\t "CL\u 32764"REMOTE USER \a 003"3 \e "AC\c 02"NP\ 
2021-09-26 10:49:58 DEBUG (MainThread) [custom_components.dmp] CL closing arming
2021-09-26 10:49:58 DEBUG (MainThread) [custom_components.dmp] Area 003 has been updated
2021-09-26 10:49:58 DEBUG (MainThread) [custom_components.dmp] Connection disconnected
2021-09-26 10:57:38 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O03,
2021-09-26 10:57:41 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:57:49 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O02,
2021-09-26 10:57:51 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'
2021-09-26 10:58:00 DEBUG (MainThread) [custom_components.dmp.alarm_control_panel] SEND DISARM COMMAND: !O01,
2021-09-26 10:58:02 DEBUG (MainThread) [custom_components.dmp] DMP: Received data after command: b'\x02@ 1234+V\r\x00'

As far as I remember the trailing comma is necessary. I’ll break out syslink in a bit and try with my panel I have here but I also have a paper I procrastinated on that’s due in 11 hours :slight_smile:

The thing with the YN is telling the panel if you want to force arm or bypass. I don’t recall the exact options but it’s basically whether you want to auto bypass any failed zones. The other y/n might have been instant arm? I quite honestly don’t remember, I unfortunately have not documented that much on them. I need to go back and look at it.

Thanks for sharing the extension and spec for the communication protocol! I was really interested in getting all of the sensors in my alarm system into Home Assistant and had some trouble modifying the extension to make it work. I ended up writing my own version instead – if you all are interested, I’d be happy to clean up the code and share it. It provides a server that listens for incoming messages from DMP and translates them into events in MQTT. You can then just use the existing MQTT alarm panel integration and add MQTT sensors for doors, window sensors, etc.

1 Like

@baddienatalie Thanks for creating the integration! I also work for a DMP dealer and will be getting a system soon. I appreciate your hard work! Keep it up!

Would love to have a look at your server that translates the messages to MQTT if you would like to share.

I just uploaded my code to GitHub - jeffdunn/dmp-mqtt: DMP/MQTT Bridge if you’d like to check it out! I didn’t implement messages in MQTT for everything that DMP sends yet (like low battery notifications).

It integrates into the Home Assistant config as follows:

alarm_control_panel:
  - platform: mqtt
    command_template: "{{action}}"
    state_topic: "dmp/[account_number_here]/alarm"
    command_topic: "dmp/[account_number_here]/alarm/set"
    name: "DMP Alarm System"

And for door/windows as binary sensors:

- platform: mqtt
  state_topic: "dmp/[account number]/status/[device id]"
  name: Front Door
  device_class: door
  payload_off: "off"
  payload_on: "on"
1 Like

Sweet! I certainly will! Ill try it out!

Trying to arm from the home assistant instance and I am getting a connection lost error.

ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140394564467872] Connection lost
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
await result
File "/config/custom_components/dmp/alarm_control_panel.py", line 98, in async_alarm_arm_away
await self._panel.connectAndSend('!C{},YN'.format(self._number[1:]))
File "/config/custom_components/dmp/__init__.py", line 138, in connectAndSend
await writer.drain()
File "/usr/local/lib/python3.9/asyncio/streams.py", line 387, in drain
await self._protocol._drain_helper()
File "/usr/local/lib/python3.9/asyncio/streams.py", line 190, in _drain_helper
raise ConnectionResetError('Connection lost')
ConnectionResetError: Connection lost

The panel seems to connect and check in until I try to arm it, and then it raises that connection reset error.

BTW I have an XTLTouch panel.

If your system has a dmp dealer app key it will communicate over port 2001 to dmp’s virtual keypad servers, I’ve seen errors like this when it’s communicating and not allowing HA to connect. Some mention use of the integration port 8001 or 8011 instead, I haven’t gotten that to work yet.

1 Like

You are still defining the remote key and IP in the configuration.yaml right? Are you using port 2001 or 8001?

I see… I didn’t even think of that. I will change the port on both devices to 8001 or something else unused.

Yeah I have a primary monitoring station already programmed in. Hopefully it’s as simple as a port conflict

I am now starting to recieve some data fine, however when I send a command, the integration it tries to talk on remains 2001 instead of changing to 8011. It gets a connection refused error.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/config/custom_components/dmp/alarm_control_panel.py", line 98, in async_alarm_arm_away
    await self._panel.connectAndSend('!C{},YN'.format(self._number[1:]))
  File "/config/custom_components/dmp/__init__.py", line 126, in connectAndSend
    reader, writer = await asyncio.open_connection(self._ipAddress, self._panelPort)
  File "/usr/local/lib/python3.9/asyncio/streams.py", line 52, in open_connection
    transport, _ = await loop.create_connection(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
  File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('10.0.0.15', 2001)

I did change the programming port to 8011 as well, so I changed it back to 2001 and I am still getting this error when I try to arm.