ESP8266 into existing alarm DSC System

You are right! It is written in blue in the diagram. Sorry for not seeing it before. Thank you!

removing code_format worked for me.

template:
- alarm_control_panel:
  - name: Alarm Panel
    code_arm_required: false
    arm_away:
    - action: esphome.dscalarm_alarm_arm_away
    arm_home:
    - action: esphome.dscalarm_alarm_arm_home
    disarm:
    - data_template:
        code: 'XXXX'
      action: esphome.dscalarm_alarm_disarm
    #code_format: TemplateCodeFormat.number
    default_entity_id: alarm_control_panel.safe_alarm_panel
    state: '{{states(''sensor.dsc_status_partition_1'')}}'

it took some time to me to realize I needed to enable ā€œadvanced modeā€ to see this new cards

Hello Alain, a huge thanks for your hard work ! I’m trying to implement the resistor divider version to connect my esp32 to the alarm. I have an issue with the wire from r1 to the pin ā€œ7ā€ on the esp32. Where should I declare it in dscAlarm.yaml ? the ESP 32 is powered by USB. another question is, are R3,R5,R1 all connected to the same ā€œGroundā€ on my PCB board ? last question, the GND from the PCB board should be wired to AUX - pin in the alarm system ? Thanks a lot in advance !

The schematic has a discrepency with the connected pin and the example config in the text. My bad. You can connect the pins where you want as long as you setup the corresponding gpio number in the yaml. In this case pin 7 is gpio05 (dscwritepin: 5). As to the grounds. Only r3, r5, q1 emitter, esp gnd and panel black go to the ground connection. R1 is NOT grounded! Ground should go to the black wire on the panel. I suppose AUX - is the same but just adds confusion.

Thanks a lot for your prompt answer ! True, R1 is not grounded… By the way, on my alarm panel, I have a ā€œBLKā€ slot next to YLW and GRN. Should I use this BLK slot rather the ā€œAUX -ā€ as the black wire on the schema to plug it on the ground of my PCB ? and of the course the PCB ground to esp ground pin .

You can use aux - as it seems that on your panel that that connection is used as the main gnd instead of the blk. Either should work fine.