ESP8266 into existing alarm DSC System

Hi Eggster237,
Did you ever manage to find/create a suitable automation?
I’m trying to do something similar.
Thanks

@Steverino I managed to send telegram messanges by listening to the events entity of the alarm panel, but it required quite extensive string handling and filtering using value templates since the events entity outputs a lot of information. I therefore abandoned the idea as I couldn’t find a simpler solution

It should not be that complicated. Just trigger on the alarm status binary sensors ( al_x). If for instance partition 1 is in alarm, al_1 will be on. To see what zone triggered it, just send the zone status (zs) sensor. It will have all open, bypassed and alarmed zones in the format of “OP:1,BY:1,OP:2,BY:3,OP:4,AL:4” for example. So no need for complicated filtering.

My setup has worked flawless for 2 years.
Bught a new router yesterday and changed the SSID-name.
Now I have problems getting it to work…

Have changed the wifi_ssid and wifi_password in secrets.yaml in ESPHome.
Cant get the board to connect to the new wifi.

Have you flashed the new firmware after changing the secrets?

Thanks!
Of course!
That solved the problem!

I searched through this information and could not find a fix for an issue I am having with my set up. I used the dsckeybus reader example to make sure my wiring was correct and my zones triggered. Within that scan I could see my doors opening and closing. However, my motion sensors did not trigger any log data. Then when I apply the project here to my ESP32 (same wiring). Now I get triggers for my motion and not my doors. I have all the zones set correctly in the .yaml code as they should be for the z+number. However, nothing seems to trigger the ON or OFF in the log.
Is there some differentiator between motion and doors?
I have in my .yaml -

  • platform: template
    id_code: z2
    name: “Lower Floor (z2)”
    device_class: motion
    publish_initial_state: true

  • platform: template
    id_code: z3
    name: “Front door (z3)”
    device_class: door
    publish_initial_state: true

My dsckeybus read gives this for the doors -

929.15: 11111111 1 01110101 01010101 01010101 01010101 01100100 [Module/0x22] Zone expander: 0 | Zones changed: 3 open (D/EOL)
929.19: 00100111 0 10000000 00000011 00000000 11000111 00000001 01110010 [0x27] Partition 1: Backlight - Zones open | Partition 2: disabled | Zones 1-8 open: 1
930.69: 00100111 0 10000000 00000011 00000000 11000111 00000000 01110001 [0x27] Partition 1: Backlight - Zones open | Partition 2: disabled | Zones 1-8 open: none
930.77: 00000101 0 10000001 00000001 00000000 11000111 00000000 11000111 00000000 11000111 [0x05] Partition 1: Ready Backlight - Partition ready | Partition 2: disabled | Partition 3: disabled | Partition 4: disabled
930.93: 11111111 1 11111111 11111111 01111111 11111111 11111111 11111111 11111111 11111111 [Module/0x05] Zone expander notification: 0
930.99: 00100010 0 11111111 11111111 11111111 11111111 11111111 [0x22] Zone expander query: 0
931.03: 11111111 1 01010101 01110101 01010101 01010101 01100100 [Module/0x22] Zone expander: 0 | Zones changed: 3 closed
931.07: 00100111 0 10000001 00000001 00000000 11000111 00000000 01110000 [0x27] Partition 1: Ready Backlight - Partition ready | Partition 2: disabled | Zones 1-8 open: none
932.34: 00100111 0 10000001 00000001 00000000 11000111 00000001 01110001 [0x27] Partition 1: Ready Backlight - Partition ready | Partition 2: disabled | Zones 1-8 open: 1
932.42: 00000101 0 10000000 00000011 00000000 11000111 00000000 11000111 00000000 11000111 [0x05] Partition 1: Backlight - Zones open | Partition 2: disabled | Partition 3: disabled | Partition 4: disabled
938.21: 10110001 0 11111111 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10110000 [0xB1] Enabled zones 1-32 | Partition 1: 1 2 3 4 5 6 7 8 | Partition 2: none
939.00: 11111111 1 11111111 11111111 01111111 11111111 11111111 11111111 11111111 11111111 [Module/0x05] Zone expander notification: 0

Only zone 1 and zone 2 are tracking for Home Assistant with ESPHome.

Any ideas that I may be able to try. Thank you so much in advance.

More information to my issue. I am using the latest ESPHome 2024.2.1 and my Home Assistant OS is current at 12.0 as well Core is 2024.2.5. It seems as though the ESP Code is not seeing the zones 3-7 which are my door sensors. It is only seeing my motion sensor data. However, as mentioned before when I use the same wiring configuration and then apply the dsckeybus code from taligentx/dscKeybusInterface it reads my doors but not the motion. I am not sure if there is something I am missing or should have set differently in the code to get this information. Any help would be appreciated. Thank you!

No idea what your issue is. Post actual ESPHome logs. You can also try the dev branch and see if that’s any better for you.

Thanks for the PCB sharing, I look around and i didn’t found specific config for WT32-eth1.

Pretty sure last week i saw complete esphome code template for all (Esp8266/ESP32/WT32-eth1 but i didn’t found.

Can you provide esphome code template for this WT32-eth1 specific.

i found only this one but not cover WT32-eth1

For the WT32-eth01 use these settings. The rest of the config will be the same. You will need to simply adapt the zone sections to match your own setup.

##ESP32 Pins  #use the following pins instead of the default suggested ones
  dscClockPin: "15"
  dscReadPin: "14"
  dscWritePin: "12"
 


esphome:   #use esp-wrover-kit 
  name: wt32
  platform: ESP32
  board: esp-wrover-kit

ethernet:  #use ethernet: config option instead of wifi:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO16
1 Like

If you required the clean_build you might have had some old data there from a previous compile. Anyhow, don’t forget to reset it to false now as you should not needed going forward.

Hello, I’m David, I managed to get the panel to work with home assistant, but when connecting the #dscwritepin: “15” of the wemos mini
RF sensors stop working

I have a system in my office with DSC 1832 and 3 PC5108. I have been using Domoticz actively and without any problems for 3 years, using ESP8266 and my friend’s MQTT supported Arduino code.

3 months ago I decided to try HomeAsistant. I installed it and it is still running on separate Raspi’s along with Domoticz in my office. I connected the same system to ESPHome and HomeAsistant with the other ESP8266 and with support from the @Dilbert66 code. And it works stable.

I bought DSC 1864 and 7 PC5108 from second hand. My goal is to install it in my home. (My wish is with WT32)

My basic question or problem:

I am using the DSC main board as NC and without resistor. I have to use it in this mode.
Because All window contacts and motion sensors are NC.

But in the comprehensive system in my house, most trigger devices work with NO. I will connect it to my 1864 house. I also want to trigger some inputs of DSC with NO. I can do this by putting a relay in between and using the contacts in reverse. But can I trigger it with optocoupler (and/or) transistor (example 5volt) without relay? Has anyone tried it before and succeeded?
Thanks in advance for your help.

Sorry, haven’t come back to this thread for a long, long while. I just read your post.

The yaml configuration provided by Dilbert66 is basically correct except in my yaml file, the dscwritepin is “4” instead of “12”.

Just a matter of curiosity, wiring shown in your photo is for flashing the WT32-ETH01, right? How do you connect the WT32-ETH01 module to the interface board as I couldn’t see any straight female headers soldered on the board?

Hi all

I have been neglecting to update my ESPHome for quite some time and decided it is time to do so. I also took the opportunity to update my DSC interface to the latest version that uses external components. Since updating ESPHome, however, I have been unable to compile the YAML and upload it to the ESP device. Please see below the error part of the logs that I receive:

Archiving .pioenvs/dscalarm/libFrameworkArduino.a
Linking .pioenvs/dscalarm/firmware.elf
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `void esphome::api::UserServiceBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::execute_<0, 1, 2>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0, 1, 2>)':
/data/build/dscalarm/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `void esphome::api::UserServiceBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::execute_<0, 1>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0, 1>)':
/data/build/dscalarm/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `void esphome::api::UserServiceBase<int, bool>::execute_<0, 1>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0, 1>)':
/data/build/dscalarm/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `void esphome::api::UserServiceBase<int>::execute_<0>(std::vector<esphome::api::ExecuteServiceArgument, std::allocator<esphome::api::ExecuteServiceArgument> >, esphome::seq<0>)':
/data/build/dscalarm/src/esphome/components/api/user_services.h:57: undefined reference to `int esphome::api::get_execute_arg_value<int>(esphome::api::ExecuteServiceArgument const&)'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `esphome::api::UserServiceBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::encode_list_service_response()':
/data/build/dscalarm/src/esphome/components/api/user_services.h:35: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `esphome::api::UserServiceBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int>::encode_list_service_response()':
/data/build/dscalarm/src/esphome/components/api/user_services.h:34: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `esphome::api::ListEntitiesServicesArgument::ListEntitiesServicesArgument()':
/data/build/dscalarm/src/esphome/components/api/api_pb2.h:858: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()'
/data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: .pioenvs/dscalarm/src/main.cpp.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/data/cache/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/8.4.0/bits/basic_string.h:1366: undefined reference to `esphome::api::enums::ServiceArgType esphome::api::to_service_arg_type<int>()'
collect2: error: ld returned 1 exit status
*** [.pioenvs/dscalarm/firmware.elf] Error 1

Has anyone had this issue, and perhaps know what I can do to fix it? I’m using an ESP32 C3 which has been working without issues. I have changed the board settings to the relevant board.

Edit: To me, it seems to have something to do with the fact that I’m using a C3 chip based on the “toolchain-riscv32-esp” references/paths in the logs, but as to what the actual problem is, I have no idea.

Thanks!

May I ask what was your previous board settings that make it (ESP32-C3) work? I bought couple of ESP32-C3 and ESP32-S2 boards to try almost a year ago. I could not compile the yaml without error for ESP32-C3. I finally give up and now running the dscalarm on ESP32-S2 (specifically lolin S2 mini) board.

My pin settings were the following:

  #ESP32 Pins
  dscClockPin: "7"
  dscReadPin: "6"
  dscWritePin: "10"

And board settings:

esphome:
  name: $systemName
  platform: ESP32
  board: esp32-c3-devkitm-1

Worked like a charm and as it’s still running on the old firmware, it still works perfectly. It’s only after the updates that I can’t get it to compile anymore, even with the old YAML config that is currently running on the chip.

Edit: I might add that I have another ESPHome device that also uses a ESP32-C3 chip and that one compiles and uploads without issues. The error therefore seems to be linked to the dscalarm code.

Interesting, so you never add ‘variant’ and ‘framework’ statement after ESP32 platform.

I do have other ESP32-C3 running ESPHome without any issues (just had problem download code the first time). I guess there are timer interrupts in the dscalarm code causing risc-v toolchain compile error. Even taligentx did not put ESP32-C3 in the support list, that is why I gave up the C3 last year and used the board elsewhere.

Interesting… I’ll have a look to see what I can find out. I don’t have any c3 devices currently but will pick one up to test with. From what I see it’s related to the api user services. I use services to allow home assistant to call functions on the ESP. If you use a yaml without user services, I suspect it will compile properly. It’s not technically an issue with my code but more likely the base esp32 library used in esphome that is missing some functions.

A quick google search yield some interesting info related to the issue: