ESP8266 into existing alarm DSC System

Vantablack, each sensor is associated with a zone so in the yaml config you simply name the associated zone sensor according to it’s location/function and this will be what shows up in home assistant

Ok, thank you.

Of course!
Thought it would be more complicated than it really is.
Thank you!

Is it only me? I found the dscKeybusInterface (or dscalarm on ESPhome) doesn’t return ‘pending’ status at all. I didn’t notice it before as I ran it parallel on ‘Arduino UNO + Ethernet shield’ with GitHub - taligentx/dscKeybusInterface.

I tested the ‘new’ branch of ‘dscalarm’ on ESP32 (Wemos D1 mini ESP32) with PCB designed by PipeDeveloper. Recently I successfully migrate the ‘dscalarm’ to WT32-ETH01 as I would like to used ethernet instead of WiFi connection. Just before I retired my over 2 years old Arduino UNO, I found the ‘dscalarm’ doesn’t show ‘pending’ on partition status. Partition message does show status (Exit delay) and Line 1, 2 correctly though.

I also tested the ‘new’ branch of ‘dscalarm’ on ESP8266 (Wemos D1 mini) and results is the same. I then rolled back to ‘master’ branch (lastest release) and got the same result.

Any idea to test or proceed?

i do not see the issue you note. Pending does display during the exit delay. on the partition status message. Please provide some esphome or serial output logs so we can see what is happening after you arm the system.

I don’t have this issue either. Latest version of ESPHome and latest version of the project’s code.

For me, pending status is shown on the exit delay after you arm you alarm. I think that you should use the latets version on both ESPhome and code. If the issue persist you should continue that thread on the issues section on the github repository dsckeybus

Thank you so much for prompt response from all of you. After digging a little deeper, I found 'pending' status did exist, but only for a very short while. As a result, it didn't show up on the 'states' of Home Assistant. I used a stupid approach, by creating an 'Automation' to output the 'sensor.dscalarm_partition_1_status' whenever there is state change (trigger). I found it changes like that: disarmed > unavailable > pending > unavailable > disarmed. It was then unchanged until the time elapsed and finally change to 'armed_home' state. As I stated before the Partition Msg as well as LCD line 1 and line 2 are displayed correctly.

I captured the logs under ESPhome dashboard, is that what you meant?
[23:57:28][I][Paneldata: :511]: 05: 05 00 8B 08 00 C7 00 C7 00 C7 01 00 00 00 00 00
[23:57:28][D][info:1207]: status 08, last status 9F,line2status 9F,selection 01
[23:57:28][D][text_sensor:067]: ‘dscalarm-eth line1’: Sending state 'Exit delay ’
[23:57:28][D][text_sensor:067]: ‘dscalarm-eth line2’: Sending state 'in progress ’
[23:57:28][D][text_sensor:067]: 'dscalarm-eth Partition 1 Msg ': Sending state ‘Exit delay in progress’
[23:57:28][D][text_sensor:067]: 'dscalarm-eth Partition 1 Status ': Sending state ‘pending’
[23:57:28][D][text_sensor:067]: 'dscalarm-eth Partition 1 Status ': Sending state ‘disarmed’
[23:57:28][D][binary_sensor:036]: ‘dscalarm-eth Partition 1 Ready’: Sending state ON
[23:57:29][D][text_sensor:067]: ‘dscalarm-eth beeps’: Sending state ‘0’
[23:57:47][D][text_sensor:067]: 'dscalarm-eth Partition 1 Status ': Sending state ‘disarmed’
[23:57:49][D][text_sensor:067]: ‘dscalarm-eth lights’: Sending state ‘’
[23:57:49][D][text_sensor:067]: ‘dscalarm-eth System Status’: Sending state ‘online’

Thanks

Hi, thanks for great add on, just started with EspHome on HA, keybus interface (https://github.com/Dilbert66/esphome-dsckeybus) and the PCB with WemosD1 mini. I use almost latest versions of HA and ESPHome. I was able to build and upload binaries to ESP8266 - it blinks and when I open logs there is nothing about active work:

INFO Reading configuration /config/esphome/dsc-gateway.yaml...
INFO Starting log output from dsc-gateway.local using esphome API
INFO Successfully connected to dsc-gateway.local
[23:23:21][I][app:102]: ESPHome version 2022.1.2 compiled on Feb  8 2022, 18:57:22

Sorry, for stupid question, but how I can turn on debug log and see what’s going on inside the box?

If I set log level to debug and connect with USB wire then it does not respond and does not connect to WiFi:

logger:
  baud_rate: 9600
  level: debug

Also I do not see any alarm sensor in my HA. I have full list of binary_sensor and text_sensor in the esphome yaml file. Reading the communication above it looks like I have to add something to configuration.yaml? But I’m not sure what to add to appear sensors in the HA lookup.

palivoda, I suspect you have something wrong with your circuit wiring since you see no ouput data in the logs. No matter the debug level, you should still see some traffic.

1 Like

wkchick, the sequence is odd in your logs for an arming sequence. Did you disarm the system during the exit delay?

No, not on that particular instance. I did sometimes before disarmed during the exit delay but not while I capture the log. The log shows ‘dscalarm’ (in my case dscalarm-eth as I am using the WT32-ETH01) instantly sent ‘disarmed’ status after ‘pending’ while others (partition message, LCD line 1 and 2) kept going.

wkchick, Can you let me know what branch you are using master? dev? as well as the panel model you are using. Can you also post a longer log showing the complete sequence from arming to pending right up to when it is fully armed (after the wait delay).
It’s possible your system is sending odd status bits that are being seen incorrectly by the software that I might need to account for.

I did test circuit after soldering, I still think something wrong with configuration or compatibility.

I use master branch from github.

For Wemos D1 mini wiring check - what are the expected voltage levels and baud rate on D1, D2 and D8?

Currently config file https://github.com/Dilbert66/esphome-dsckeybus/blob/997b39d055a3bf376ad63c47c8eeb885ad154ef7/DscAlarm.yaml does not say anything about D1, D2 and D8. Should I add in to my instance of EspHome config to define SCL and SDA pins?

I connected ESP to the bus where I have PC1832 with 3 extension modules and 2 keyboards. Should I configure baud rate in EspHome config?

Pin config is done in file dscalarm.h


#define dscClockPin D1  // esp8266: D1, D2, D8 (GPIO 5, 4, 15)
#define dscReadPin D2   // esp8266: D1, D2, D8 (GPIO 5, 4, 15)
#define dscWritePin D8  // esp8266: D1, D2, D8 (GPIO 5, 4, 15)

There is no baud rate. This is a custom protocol. If you need to trouble shoot, you will need an oscilloscope or logic analyzer to view the data on those pins.

1 Like

As you asked about need to add anything in configure.yaml, a simple question: did you add your ‘dscalarm’ in your integration?

1 Like

I’m not sure what you mean… Probably not. :slight_smile: please explain.

I meant no matter your D1 mini properly connected to your alarm security panel or not (even you disconnected the CLK and DAT), your HA will create the list of sensors and binary_sensor you created in your ESPhome yaml file. However, you MUST add your ESPhome in your HA integration, otherwse nothing would happen. I guess you mainly focused on the ESPhome dashboard.

1 Like

The default dscalarm.yaml will work fine with no config for the initial testing. Of course, the zones wont match your own config but no matter what you should see traffic in the logs as long as you have the correct pins wired up or if you use different pins, they are set correctly in the dscalarm.h file. You don’t need to add to Homeassistant until all is working.

If the logger config is set to debug and causing issues, then I really suspect you have incorrect wiring and getting bogus data showing up in the log and overloading the communications.