ESP8266 into existing alarm DSC System

I might add that I have once managed to get the ESP32 to connect when I left it running for a long time and it communicated with Home Assistant as it should. But it disconnected itself again and didn’t connect again.
One thing I haven’t tried is to assign a static IP to the ESP32. It could be that it is a DHCP related issue. But then again, in that case it would also struggle to connect when not connected to the panel so I don’t think that it would help.

Thank you, I will give it a shot and let you know if it works.

Another thing you can try is change the read line port in the yaml BUT don’t change the wiring (leave it connected to port 21) and see if it still connects to wifi. Of course you wont’ see data because the esp is looking at another pin for data. This is just a test if the issue is wiring related or software related. The issue you are having sound like either an interference issue or a software timing issue that affects wifi.

@Dilbert66 I have tried your suggestions and the results are as follows:
After changing the pin number in the yaml and keeping the wiring in place the device connected to the network without issue. I then changed the pin back and updated it OTA after which it connected again for some reason and everything worked as it should. I then wanted to test if the connection is reliable so I disconnected and reconnected the device after which it didn’t want to connect again.

Changing the update interval in the header file didn’t make any difference as it still doesn’t want to connect.

That’s interesting. It seems that when the firmware is running and processing data, it has issues with wifi. No oneone else has reported similar issues and I have not seen it myself either and I’m running an esp32 d1 mini on my main system. Can you post some esp logs of your system on a new issue on my repository? I’d like to see what type of traffic you are getting as a baseline.

I have posted a new issue on your repository. Thank you for your patience and support.

Ok, I see a lot of traffic which is ok normally. Lets see if minimizing the amount of data being displayed willl help. Checking the line below to debug=1 or debug=0 in the yaml.

    DSCkeybus->debug=2; // 0 = off, 1 = minimal, 2 = all packets shown on console  3 =  + serial port debugging

After playing around with Github pull-request function for a long time, I finally uploaded my circuit board design for WT32-ETH01, such that dscalarm ESPHome can connect through wired ethernet. I used KiCAD 6.0 for both schematic and PCB layout and knew only how to generate diagrams in SVG instead of PNG or PDF format. Anyway, the Gerber file in zip format is the file I sent to PCB manufacturer for making PCB.

Very cool. Can you share the link to your github repo?

https://github.com/wkchick/esphome-dsckeybus

Edit: I found a freeware to convert the schematic, top and bottom pcb layout from svg to png format and just uploaded to my repository. Hope it could provide a better view. I also uploaded a sample yaml file for the WT32-ETH01 board with pin assignment stated.

1 Like

I have been running an ESP32 for about 1 week now and it running very well. The only issue I have is when I do an OTA update it takes a couple of minutes to reconnect to the WiFi. After that, it has been solid. If I do a reboot or power down - power up it reconnects reasonably fast. The ESP32 development board I am using is an ESP32 Doit DevKit V1 (30 Pin) clone. I was using a ESP8266 and the OTA reconnect after updates were much faster. I have a strong signal so I don’t think it is router related. I may try a different supplier on the DevKit board. I have also seen some suggestions to add a couple of capacitors on some of these DevKit V1 boards for similar issues. For initial testing, I built breadboards for both the ESP32 and ESP8266 boards based on the Isolated wiring diagram GitHub - Dilbert66/esphome-dsckeybus: Esphome custom configuration for interfacing to a DSC POWERSERIES alarm system. Since I was satisfied with the results, I designed a PCB for the ESP32 and it will be here in a couple of days. I added the ability to include a couple of capacitors to see if it would improve the reconnect after the update, but I probably won’t use them since I don’t update that often and know it reconnects. My design supplies power to Vin and does not include an option to go directly to 3.3. I tested it both ways and personal preference is the power to VIN. My DSC PowerSeries632 box is small so I am mounting it just outside of the DSC box. I designed the PCB to fit in a nice small enclosure I have from other projects. @Dilbert66 did a fantastic job on this project.

![ESP32 DOIT DEVKIT V1 PCB|690x460]

Nicely done. What I have also done is use an ESP32 d1 mini board that fits on the existing esp8266 d1 mini designs since it has the same footprint.

As to debugging your wifi issues, you can also monitor the serial output from the usb connector using the arduino serial monitor interface. By directly connecting to the chip, you can see any error messages it throws while attempting to connect to wifi.

Personally, I have not encounted wifi connectivity issues with the esp32. It’s always been better than the esp8266 in that regard.

Thanks Alain. I will investigate monitoring the serial output. It is not a big problem but I would like to know the answer. I may get a D1 mini and give it a try. The PCBs are inexpensive and with winter coming on a need some new projects. Retired and trying to keep the brain active.

Alain, could you share the brand, supplier of the ESP32 d1 mini that you use? There are numerous choices and I would like to go with the one you know works well.
Thanks

This is the ones I’ve used. Work fine. I get the cp2104 usb variant.

For the wifi connectivity, it’s also possible that there are firmware crashes but you will only catch those with the serial monitor connected so either way, it will help.

Alain, I did the same. Use a ESP32 D1 mini board that fits on the PCB PipeDeveloper designed some time before. Therefore I am running two ESPHome dscalarm instances (WT32-ETH01 and ESP32 D1 mini) in parallel.

Perfect. I will give them a try.

Any ideas why the state is constantly updating to unavailable/disarmed? It’s started to happen after I armed the partition and disarmed it once

@sidlauskas Mine did that when I would lose Wifi connection.