ESP8266 into existing alarm DSC System

The Alarm memory comes from the stored zone flags so if you have the AL:xx on, then the firmware thinks there is still a stored alarm zone.

Edit: Don’t worry about the logs. I have a suspicion as to whats going on so I’ve made a change and updated dev. Try it out and we’ll see. It’s related to how the panel sends out zone info and the associated partition.

When do the cleaning zone alarms exactly occur? Do I need to perform a complete arm/disarm cycle, or should it be sufficient to disarm during the exit delay?

Has to be a full arm after exit delay…
Edit: Actually, I’m changing that to just disarm during exit delay …

Alain, I just tested and clearing alarm memory occurs during full arming - thank you very much!

FYI, i’ve updated the code so it also clears during a partial arm/disarm (during exit delay)

…and it’s working perfectly! Thank you so much!

Quick question: Is clearing the alarm memory something that can be managed via the Keybus interface? I thought the “trigger” for clearing it was controlled exclusively by the DSC board and only occurred based on its internal logic. If that’s the case, would it be possible to implement a service call to clear the alarm memory directly, allowing it to be done from HA without needing to go through a full alarm cycle?

Another question: I noticed that when there’s an alarm in the alarm memory, pressing *3 on the virtual keyboard displays the alarm memory as expected. However, after pressing # to exit, a message briefly appears saying, “No alarms in alarm memory.” Can you reproduce this behavior on your end? It seems odd for that message to show up when there’s clearly something stored in the memory.

The esp keeps it’s own list of alarmed zones separate from the panel. There is no method to clear the panel’s alarm memory except for arming/disarming

…but if this is driven by the panel and happens when the real armed state kicks in, then how were you able to bring clearing earlier to ‘exit delay’? :confused:
(certainly not challenging you, just trying to understand what’s happening).

My description was not clear enough, apologies for that.
So when there is an alarm in the alarm memory, both in the panel and esp (so they are in sync), if you check the alarm memory by *3 on the virtual keyboard, then it displays correctly the memory, let’s say z01 (if that was alerting), however, if you press # to get out of the alarm memory menu on the virtual keyboard, then “No alarms in alarm memory.” gets displayed for a second only.

Ok, I brought clearing to exit delay to the esp code only. The panel does the same thing. I just duplicated what the panel does and did not change how the panel behaves.

As to the “no alarms” display, that’s just a timing thing in the code. I modified it as you are concerned about that message. I have not heard anyone else mentioning it.

Many thanks! …and just let me know if my OCD annoys you!

No worries, every suggestion makes for better code :slight_smile:

I truly appreciate all your help, support, and quick responses. Please enjoy some coffee on me! :slight_smile:

Thank you very much! Always glad to get new ideas and suggestions to improve it!

FYI, you can apply filters either in HA or in ESPHome to change the sensor values to whatever you want. For instance, if you don’t like getting the “not_ready” value when the system can’t be armed due to an open sensor, you can apply filters. For example, here is a filter added to the partition status in the esphome yaml config that forces the not_ready value to be disarmed when sent to HA. This is useful since the HA Alarm panel integration doesn’t support the “not_ready” flag as it only recognizes “unavailable”, armed, disarmed, etc. Some people find it confusing when they see “unavailable” and assume there is something wrong with the sensor. So with this filter, you can send it whatever it likes. FYI, the platform: dsc_alarm_panel is new (I integrated the sensor/template alarm logic into one component), but template_alarm or template should also work as usual.

  - platform: dsc_alarm_panel
    id: ps_1  
    name: "Partition 1 Status (ps_1)"
    icon: "mdi:shield"
    filters:
      - lambda: |-
          if (x == "not_ready") x="disarmed";
          return x;

Hi Alain,

Do you have an idea why I am getting these in zone status?

[20:26:30][I][Panel :979]: [2025-02-28 20:26] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[20:26:30][I][Module:979]: [2025-02-28 20:26] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)
[20:26:30][I][Panel :979]: [2025-02-28 20:26] 27: 27 00 81 01 81 C7 10 01 00 00 00 00 00 00 00 00 (58)
[20:26:30][D][binary_sensor:036]: 'z5-Nappali': Sending state ON
[20:26:30][D][text_sensor:064]: 'zone status': Sending state 'TA:1,TA:2,TA:3,TA:4,OP:5,TA:5,TA:6,TA:8,TA:9,TA:17,TA:18,TA:19,TA:20,TA:21,TA:22,TA:23,TA:24'
[20:26:30][I][Panel :979]: [2025-02-28 20:26] 05: 05 00 81 02 81 C7 81 C7 81 C7 01 00 00 00 00 00 (74)

Its a bug. I will fix it next week when I’m back in the country!

Hi Alain,

Do you have an update on this?

No, I can’t duplicate it. Please post some logs showing when the tamper turns on for those zones so that I can see what the previous panel cmd is that is the issue.

Strange, as I haven’t changed anything, and it was working fine before. I can’t recall what caused the issue, but I can only assume an ESPHome update, especially since the exact same problem appeared for a friend whose interface I configured.

Here’s the full boot log, though it doesn’t seem like anything specific is needed to trigger this. The zone status is reported like this immediately after boot.

INFO Starting log output from 192.168.33.111 using esphome API
INFO Successfully connected to dscalarm @ 192.168.33.111 in 2.038s
INFO Successful handshake with dscalarm @ 192.168.33.111 in 0.109s
[21:38:19][I][app:100]: ESPHome version 2025.2.2 compiled on Mar  3 2025, 17:21:31
[21:38:19][C][logger:177]: Logger:
[21:38:19][C][logger:178]:   Max Level: DEBUG
[21:38:19][C][logger:179]:   Initial Level: DEBUG
[21:38:19][C][logger:181]:   Log Baud Rate: 115200
[21:38:19][C][logger:182]:   Hardware UART: UART0
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z1-Előszoba'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][I][Panel :979]: [2025-03-11 21:38] E6: E6 00 18 01 00 00 00 00 00 FF 00 00 00 00 00 00 (74)
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z2-Garázs'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z3-Konyha'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z4-Üvegtörés'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z5-Nappali'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z6-Gaming Room'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][I][Panel :979]: [2025-03-11 21:38] 0A: 0A 00 80 9E 00 00 00 00 00 28 00 00 00 00 00 00 (74)
[21:38:19][I][Module:979]: [2025-03-11 21:38] 0A: FF 01 0A FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z8-Szabotázs'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z9-Emelet'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'motion'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z17-Bejárati ajtó'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'door'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z18-Terasz ajtó nagy'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'door'
[21:38:19][I][Panel :979]: [2025-03-11 21:38] 0A: 0A 00 80 A1 00 00 00 00 00 2B 00 00 00 00 00 00 (74)
[21:38:19][I][Module:979]: [2025-03-11 21:38] 0A: FF 01 05 FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z19-Terasz ajtó kis'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'door'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z20-Konyha ablak'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'window'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z21-Garázskapu'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'garage_door'
[21:38:19][I][Panel :979]: [2025-03-11 21:38] 5D: 5D 00 10 00 00 00 00 6D 00 00 00 00 00 00 00 00 (58)
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z22-Gaming Window'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'window'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z23-Lenti fürdőszoba ablak'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'window'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'z24-Kamra ablak'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'window'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'dscalarm Partition 1 Ready'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'dscalarm Partition 1 Armed'
[21:38:19][I][Panel :979]: [2025-03-11 21:38] E6: E6 00 18 01 10 00 00 00 00 0F 00 00 00 00 00 00 (74)
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'dscalarm Trouble Status'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'problem'
[21:38:19][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'dscalarm Battery Status'
[21:38:19][C][template_alarm.binary_sensor:032]:   Device Class: 'problem'
[21:38:19][I][Panel :979]: [2025-03-11 21:38] 64: 64 00 04 68 00 00 00 00 00 00 00 00 00 00 00 00 (26)
[21:38:19][D][text_sensor:064]: 'dscalarm beeps': Sending state '2'
[21:38:19][I][dscalarm:2072]: status 01, last status 01,selection 01,partition=1,skip=0,force=0
[21:38:20][D][text_sensor:064]: 'dscalarm line1': Sending state 'System is Ready'
[21:38:20][D][text_sensor:064]: 'dscalarm line2': Sending state 'Ready to Arm <>'
[21:38:20][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'dscalarm AC Status'
[21:38:20][C][template_alarm.binary_sensor:032]:   Device Class: 'plug'
[21:38:20][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'dscalarm Fire partition 1 Status'
[21:38:20][C][template_alarm.binary_sensor:032]:   Device Class: 'smoke'
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 0A: 0A 00 80 C8 00 00 00 00 00 52 00 00 00 00 00 00 (74)
[21:38:20][I][Module:979]: [2025-03-11 21:38] 0A: FF 01 2D FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[21:38:20][C][template_alarm.binary_sensor:032]: Template Alarm Binary Sensor 'Partition 1 Alarm Status'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'dscalarm System Status'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:shield'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'zone status'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:shield'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'Partition 1 Status'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:shield'
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 0A: 0A 00 80 A1 00 00 00 00 00 2B 00 00 00 00 00 00 (74)
[21:38:20][I][Module:979]: [2025-03-11 21:38] 0A: FF 01 1C FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'Partition 1 Msg'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'zone that triggered last alarm'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'Arming/Disarming user'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'dscalarm line1'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 5D: 5D 00 10 00 00 00 00 6D 00 00 00 00 00 00 00 00 (58)
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'dscalarm line2'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'dscalarm event'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'dscalarm beeps'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template_alarm.text_sensor:021]: Template Alarm Sensor 'Trouble Msg'
[21:38:20][C][template_alarm.text_sensor:021]:   Icon: 'mdi:alert-box'
[21:38:20][C][template.switch:068]: Template Switch 'dscalarm Connection'
[21:38:20][C][template.switch:070]:   Icon: 'mdi:shield-link-variant'
[21:38:20][C][template.switch:091]:   Restore Mode: always OFF
[21:38:20][C][template.switch:057]:   Optimistic: NO
[21:38:20][I][Panel :979]: [2025-03-11 21:38] E6: E6 00 18 01 10 00 00 00 00 0F 00 00 00 00 00 00 (74)
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 64: 64 00 02 66 00 00 00 00 00 00 00 00 00 00 00 00 (26)
[21:38:20][D][text_sensor:064]: 'dscalarm beeps': Sending state '1'
[21:38:20][I][dscalarm:2072]: status 01, last status 01,selection 01,partition=1,skip=0,force=0
[21:38:20][C][homeassistant.time:010]: Home Assistant Time:
[21:38:20][C][homeassistant.time:011]:   Timezone: 'CET-1CEST,M3.5.0,M10.5.0/3'
[21:38:20][C][restart:068]: Restart Switch 'restart_switch'
[21:38:20][C][restart:070]:   Icon: 'mdi:restart'
[21:38:20][C][restart:091]:   Restore Mode: always OFF
[21:38:20][C][safe_mode.switch:068]: Safe Mode Switch 'Safe Mode'
[21:38:20][C][safe_mode.switch:070]:   Icon: 'mdi:restart-alert'
[21:38:20][C][safe_mode.switch:091]:   Restore Mode: always OFF
[21:38:20][C][restart.button:017]: Restart Button 'Reboot'
[21:38:20][C][restart.button:017]:   Icon: 'mdi:restart'
[21:38:20][C][ethernet:326]: Ethernet:
[21:38:20][C][ethernet:515]:   IP Address: 192.168.33.111
[21:38:20][C][ethernet:516]:   Hostname: 'dscalarm'
[21:38:20][C][ethernet:517]:   Subnet: 255.255.255.0
[21:38:20][C][ethernet:518]:   Gateway: 192.168.33.254
[21:38:20][C][ethernet:523]:   DNS1: 8.8.8.8
[21:38:20][C][ethernet:524]:   DNS2: 0.0.0.0
[21:38:20][C][ethernet:536]:   MAC Address: A8:03:2A:21:E3:D4
[21:38:20][C][ethernet:537]:   Is Full Duplex: YES
[21:38:20][C][ethernet:538]:   Link Speed: 100
[21:38:20][C][ethernet:345]:   Power Pin: 16
[21:38:20][C][ethernet:347]:   MDC Pin: 23
[21:38:20][C][ethernet:348]:   MDIO Pin: 18
[21:38:20][C][ethernet:349]:   PHY addr: 1
[21:38:20][C][ethernet:351]:   Type: LAN8720
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 0A: 0A 00 80 BA 00 00 00 00 00 44 00 00 00 00 00 00 (74)
[21:38:20][I][Module:979]: [2025-03-11 21:38] 0A: FF 01 2D FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[21:38:20][C][mdns:116]: mDNS:
[21:38:20][C][mdns:117]:   Hostname: dscalarm
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 0A: 0A 00 80 A1 00 00 00 00 00 2B 00 00 00 00 00 00 (74)
[21:38:20][I][Module:979]: [2025-03-11 21:38] 0A: FF 01 2D FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[21:38:20][C][esphome.ota:073]: Over-The-Air updates:
[21:38:20][C][esphome.ota:074]:   Address: dscalarm.localdomain:3232
[21:38:20][C][esphome.ota:075]:   Version: 2
[21:38:20][C][esphome.ota:078]:   Password configured
[21:38:20][C][safe_mode:018]: Safe Mode:
[21:38:20][C][safe_mode:020]:   Boot considered successful after 60 seconds
[21:38:20][C][safe_mode:021]:   Invoke after 10 boot attempts
[21:38:20][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 5D: 5D 00 10 00 00 00 00 6D 00 00 00 00 00 00 00 00 (58)
[21:38:20][C][api:140]: API Server:
[21:38:20][C][api:141]:   Address: dscalarm.localdomain:6053
[21:38:20][C][api:143]:   Using noise encryption: YES
[21:38:20][I][Panel :979]: [2025-03-11 21:38] E6: E6 00 18 01 10 00 00 00 00 0F 00 00 00 00 00 00 (74)
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 5D: 5D 00 00 00 00 00 00 5D 00 00 00 00 00 00 00 00 (58)
[21:38:20][I][Panel :979]: [2025-03-11 21:38] E6: E6 00 18 01 00 00 00 00 00 FF 00 00 00 00 00 00 (74)
[21:38:20][I][Panel :979]: [2025-03-11 21:38] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[21:38:20][I][Module:979]: [2025-03-11 21:38] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)
[21:38:21][D][api:103]: Accepted 192.168.9.200
[21:38:21][W][component:237]: Component api took a long time for an operation (53 ms).
[21:38:21][W][component:238]: Components should block for at most 30 ms.
[21:38:21][D][api.connection:1446]: Home Assistant 2025.3.1 (192.168.9.200): Connected successfully
[21:38:21][D][time:051]: Synchronized time: 2025-03-11 21:38:21
[21:38:22][D][text_sensor:064]: 'dscalarm beeps': Sending state '0'
[21:38:24][I][Panel :979]: [2025-03-11 21:38] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[21:38:24][I][Module:979]: [2025-03-11 21:38] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)
[21:38:29][I][Panel :979]: [2025-03-11 21:38] 2D: 2D 00 81 01 81 C7 00 F7 00 00 00 00 00 00 00 00 (58)
[21:38:29][I][Panel :979]: [2025-03-11 21:38] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[21:38:29][I][Module:979]: [2025-03-11 21:38] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)
[21:38:32][I][Panel :979]: [2025-03-11 21:38] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[21:38:32][I][dscalarm:2072]: status 01, last status 01,selection 01,partition=1,skip=0,force=1
[21:38:32][D][text_sensor:064]: 'Partition 1 Status': Sending state 'ready'
[21:38:32][D][text_sensor:064]: 'zone status': Sending state 'TA:1,TA:2,TA:3,TA:4,TA:5,TA:6,TA:8,TA:9,TA:17,TA:18,TA:19,TA:20,TA:21,TA:22,TA:23,TA:24'
[21:38:33][I][Module:979]: [2025-03-11 21:38] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)
[21:38:36][I][Panel :979]: [2025-03-11 21:38] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[21:38:36][I][Module:979]: [2025-03-11 21:38] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)
[21:38:40][I][Panel :979]: [2025-03-11 21:38] 11: 11 00 AA AA AA AA AA AA AA 02 00 00 00 00 00 00 (67)
[21:38:40][I][Module:979]: [2025-03-11 21:38] 11: FF 01 3F FC FF FF FF FF FF 03 00 00 00 00 00 00 (67)

Hi Alain,

Based on the commit notes, I assume the latest commit should fix this, but it isn’t compiling. Is it not ready yet?