Good idea about the ir battery and other statuses. I will look into that. The panel will see all messages from the rf devices so I’m sure its there. I just need to provide a field on esphome to format and display it.
I’ve pushed a test version to the “dev” branch at https://github.com/Dilbert66/esphome-dsckeybus/tree/dev that includes full pc5108 zone expander emulation. I’ve tested on my own systems and works well so far. Needs more testing on other systems. The current zone max is set at 32.
The expander module will not be supervised by default as it’s not needed for operation. To use it’s just a matter setting expanderAddr1 and 2 to one of the range address you want.
#zone expander addresses:
# 9 - zones 9-16
# 10 - zones 17-24
# 11 - zones 25-32
# 12 - zones 33-40 (for systems with 64 zone support)
# 13 - zones 41-48 (for systems with 64 zone support)
# 14 - zones 49-56 (for systems with 64 zone support)
# 16 - zones 57-64 (for systems with 64 zone support)
expanderAddr1: "0" # 1st zone expander emulator address to use . Set to 0 to disable.
expanderAddr2: "0" # 2nd expander emulator address to use . Set to 0 to disable.
A new service is also made available in home assistant called esphome._set_zone_fault with attributes zone and fault:
zone is 2 digit zone number and fault is 0 or 1 where 1 sets a zone as open and 0 closes it. By calling this service from a home assistant function, you can enable any event, sensor, etc to trigger any one of your emulated zones in your alarm system.
Relay module support is also added. This will give your panel the ability to trigger an event on any PGM channel output. See the yaml file for an example configuration. An example output for pgm 1 will show in home assistant as PGM 1. You can add more fields in the yaml config file.
This version now also adds the ability to display the low battery warning status of any wireless zones. These will be showing in the “zone status” field of the yaml. Also in that field, you will see the alarm status of any triggered zones.
The display format for a low battery is BL:zz and alarm status will be shown as AL:zz where zz is the zone number. Note that this won’t capture already existing low battery warnings as it depends on the pc5132 module status update command which only sends on status changes.
Thanks for sharing the project. I’ll try it this weekend on a PC5020.
I just want to say thank you to @Dilbert66 for putting in the work for this and all the supporting projects that has contributed.
I was able to successfully install this on my PC1864 yesterday and am very happy with it so far. As a bonus I can control the alarm through HomeKit using the bridge plugin.
Thanks again!
I am trying to have HA send me an alert if the system is in alarm. Can anyone provide some guidance on this? Do I need to set up an automation so that the notification will be sent or is that automatic with and Alarm Panel in HA?
If I have to setup an automation, will it be comparing the petition status with “In Alarm” to trigger the automation?
Any assistance would be greatly appreaciated!
@PipeDeveloper
How did you make the connections? What components did you use? Can you make a simple schematic for the nodemcu v3? Thank you
@Dilbert66 @PipeDeveloper
Thanks for the best work.
Can I follow the pattern of the first post with only the 15k and 10k resistor?
Hello @Molot
If you want to use ESPhome with DSC Alarm library, please follow the steps on the repository.
Actually you may use 10k and 15k resistor and it will work, but its not correctly use those values.
Have in mind that those resistors acts as a “voltage divider” and not as “pull down”, because they are digital signals with a specific voltage 12v on DSC and 3.3v on the ESP8266.
You can check it using this calculator
https://ohmslawcalculator.com/voltage-divider-calculator
The input is arround 12.3 - 13.7v provided by the DSC pannel. So if you use 15 and 10kohm, the output will be arround 5v, which is fine for arduino and most of popular boards, but for ESP8266 its not ideal. NodeMCU and WemosD1 can tolerate 5v tension on digital pins and thats why it will work but i repeat its not correctly.
My recomendation, follow the first link with the full guide documentation and schematics. Use 33k and 10kohm in stead, that will drop to 2.7 - 3.3v and it will work fine also.
Both will work but when you use the correct values, you save energy, stability and feel sure that you did a good job using the correct values.
Thanks @PipeDeveloper. I’ve seen @Dilbert66 's schematic, but can’t figure it out. I would need a photo like the one you posted in the first post. Also from your photo i can also see a transistor soldiered on the wires. Is it a PN2222A or a 2N3904? Sorry for too many questions but I’m not very well versed in electronics. Thanks for your patience and help.
Both transistors 2N2222 and 2N3904 are NPN transistors and they are very popular, you can find them everywhere and they are very cheap, less than 0.05usd.
In simple words you can use both and the circuit will work, both transistors do the same. It doesnt matter for its purpose.
The diference, 2N2222 support max 1A current, 2N3904 can support only 200mA (or 0.2A). But on this case it doesnt matter because the amount of current is very low.
I dont know about this, but some people that builds pedals on guitar effects prefers 2N2222 as they are more stable on noise in the signal (for music that is important), but on this case it doesnt matter, both will work.
Thanks for the reply @PipeDeveloper .
Now I just need a clear scheme to get the job done. By clear I mean a pattern that can be understood even by a 10-year-old child.
Please read first answer of @Dilbert66 (thread begining) with his esphome-dsckeybus, you will find a path called PCB Layout and inside you can get schematics, pcb, etc.
Well almost two months to get my PCB’s, but im impressed with the quality of the product. Also very cheap to build.
Components that i used:
1 PCB (Printed circuit board, you may find them in dsckeybus repository)
LM2596
2N3904 or 2N2222
Some resistors 33k, 10k and 1k (SMD 1206)
4pin Terminal block (2,54mm)
Some pin headers
1 jumper
The final result:
Thank you guys who share and contribute on this proyect.
Works fine, solid and stable
Looks good!
Very nice. Who built the card for you?, we’re you able to order a single board?
Thanks
I ordered in AllPCB.
5dollars + 8dollars shipping cost via ePacket (total 13.70usd)
You need to send an e-mail and ask for the cheapper shipping method with tracking code to your country if you mind.
The most small order are 5 PCBs, but i dont care in that sense, i just store the rest
Hi. Firstly, thanks for all these amazing inputs, they are really useful.
I am about to do this for my DSC 1864 panel.
I don’t want to energise the Arduino from the DSC keybus, because in case of an energy cut at home, there is no sense on keeping this on, nothing to talk to, at least in my case.
Anyways, if I use a external source, I am not 100% sure about wiring. From reading at the github doc, I’d go straight to the 3.3 or Vin depending on the source I can get, plus ground, to power up. Then all the wiring should be the same, even connecting the black bus channel to ground. With the exception of red wire, which will be left unused in this scenario. Just want to confirm this is right.
Take this opportunity to ask about DLS5 software connection using this. Is it possible?
Thanks in advance!
You can power the ESP using the built in USB connector and simply don’t connect the red wire. Ground needs to be connected for this circuit. I will publish another alternative schematic that uses all optocouplers later to provide full isolation and in that case ground will not need to be joined.
Thanks for the quick reply. And yes, that would be great.
I’m just install Dilbert66/esphome-dsckeybus in my home assistant and im very happy and gratefult for the work, but i can’t to integrate it into lovelace using a panel alarm card.
I’m newbie in home assistant and can’t to understand the readme information from this link esphome-dsckeybus/README.md at master · Dilbert66/esphome-dsckeybus · GitHub
I have working esphome with DSC1832 alarm, im recieving data from motion sensors and i can to arm and disarm manually using esphome services from HA (development tools)
Can anyone help me? i can’t to link the arm and disarm buttons from control panel alarm to esphome services who arm and disarm DSC1832 using esp32.