ESP8266 into existing alarm DSC System

I copied it but it’s still the same error

Is that good?

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3  
  framework:
    type: arduino

Correction. In your case it should be:

dscclockpin: 18
dscreadpin: 10
dscwritepin: 5

Yes, your device board setup is correct.

1 Like

This shouldn’t matter. However if you are using the Pipe Developer PCB design (which I also used before I designed mine) and based on the picture of your ESP32-C3 module (which is different from mine), dscclockpin should be 18, dscreadpin should be 10 and dscwritepin should be 5.

The Pipe Developer PCB design used D1 for dscclockpin, D2 for dscreadpin and D8 for dscwritepin.

As you didn’t show the connector solder in your ESP32-C3 module photo, please make sure the module is inserted in the interface module in the right direction.

1 Like

Thank you, it was good

Thanks for the advice, too. The legs were swapped. I’ve already done this once with the Homeassistant version.

Hi everyone!

Thank you so much Dilbert for taking the time to make this and for making it available for everyone to use.

I’ve been trying to get it to work for a while now, and it’s finally time to admit that I need some help. So far I’ve managed to:

  • order a custom PCB (for WemosD1 Mini)
  • order a Lolin D1 Mini, the resistors and transistor.
  • solder everything (correctly, I hope)
  • flash the firmware
  • connect everything to the alarm
  • read info from the alarm (I can see if it’s armed/ready to arm, battery status, AC status, etc.)

However, I cannot, for the life of me, get it to arm from Home Assistant. I must admit I’m pretty new to it, and only used basic functionality until now. I want to see if I can get it to arm/disarm before trying to make the nice alarm panel work, because I still don’t know if there’s something wrong with my hardware, with my ESPHome configuration, or if I simply don’t know how to use those services.

I was used to Home Assistant generating my buttons automatically. What would be the easiest way to setup a button in a dashboard to arm and disarm the system?

You need to do a couple tests first to identify that home assistant is seeing your esp, that you have the correct service and that the esp can send to the panel.
You first need to find the alarm_keypress service in the developer tools section, action tab. Then you can send a cmd to the esp using that service as shown in the screenshot below. You also need to have the esphome logs displaying on another tab and watch the logs there. You should then see the “writing keys: …” log entry and the following 05 response in the log. This would indicate that you have the correct service, and that the esp can send the cmds to the panel and the panel responds. If you only see the “writing keys” entry but no following 05 cmd entry, then the cmd is not being sent to the panel so you would have to look at your transmit circuit and pin for an issue.

[17:05:36][I][dscalarm:805]: Writing keys: # to partition 1, partition disabled: 0 , partition locked: 0
[17:05:36][I][dscalarm:2064]: status 01, last status 01,selection FF,partition=1,skip=0,force=1
[17:05:36][I][Module:966]: [2025-05-26 17:05] 05: FF 01 2D FF FF FF FF FF FF FF 01 00 00 00 00 00 (74)
[17:05:38][I][Panel :966]: [2025-05-26 17:05] B1: B1 00 FF FF FF 00 08 06 03 00 BF 00 00 00 00 00 (82)

Oh, wow. It works! I tried what you said and I got the correct response. Immediately after reading your reply I managed to arm it via developer tools (didn’t know about them before - I’m still a noob). Later I realized that all I had to do was trigger the action via a button, so now I have crude functionality working (arm, disarm, and arm status on my main dashboard, which is awesome.

Now it’s time to learn some more about home assistant, as I’m still not sure what actions, services or how I could add a custom card (everybody seems to get them from stores). If anyone can point me to any good resources, that would be great.

Thank you for your time and help Dilbert!

Dilbert66

When using ESP32 Web Keypad, is there a way to notify you by phone in case of an alarm?

You can just use any of the home assistant notification options to send out a notification on an alarm. Alternatively you can use my esphome telegram component which doesnt need home assistant.

1 Like

I’m trying this component, but there’s no signal when an alarm occurs.

/disarm does not alarm the partition either. Instead, it rings the doorbell.

That is only an example config and it’s currently configured for a Vista20 panel. It will not work as is on a DSC. You need to configure it for your own application and panel cmds.

I’m trying to set an alarm on this command.

- command: "/armstay,/a"
      then: 
        - lambda: |-   
            $panelId->alarm_keypress_partition("{accesscode}2",1);

But it doesn’t alert you to this code

- command: "/disarm,/d"
      then: 
        - lambda: |-
            $panelId->alarm_keypress_partition("{accesscode}1",1);  

But if I enter 1234 instead of the access code, it will alert me.

And after the command, there is no automatic status message like in your photo.

Like I indicated in my earlier post, you cannot use the cmds in the example telegram config for a dsc system. They do not understand the same cmds. I only show an example based on a vista panel.

For example:
This is for a vista system. The arm cmd is “12342” where 1234 is the access code.

- command: "/armstay,/a"
      then: 
        - lambda: |-   
            $panelId->alarm_keypress_partition("${accesscode}2",1);

For a dsc, the arm stay cmd is “s”. Look at the documentation on the dsc project for the valid dsc control cmds for arming. For disarming you just send
“${accesscode}”

- command: "/armstay,/a"
      then: 
        - lambda: |-   
            $panelId->alarm_keypress_partition("s",1);

This is an example of getthing the system status on a dsc panel:

    - command: "/status,/s" 
      then:
        - lambda: |-
            webnotify->publish(x.chat_id,"System state is "+id(ps_1).state,1); 
            std::string m=webnotify->get_send_status()?"on":"off";
            webnotify->publish(x.chat_id,"Notify is " + m,1); 

Please remember that the sensor id’s are not all the same on a vista versus a dsc implementation when you create your commands.

1 Like

${accesscode}” gives this error.

Like the error says, you are missing the global substition for “accesscode” in your yaml. You could just send your code directly instead of using a substitution but thats your choice.

Add this to your global substititions. Where variable “access_code” is set up in your secrets file.

accesscode: !secret access_code

Alternatively, as I indicated you can just send it this way, where 1234 is your access code.

$panelId->alarm_keypress_partition("1234",1);
1 Like

Thank you, it worked.

I’m bothering you again. After a while, this error occurs and it becomes inaccessible from telegram. But it works from the web page.

Is there any solution to this?