You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-25Lines changed: 36 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# DSC Keybus Interface
2
-
This library directly interfaces Arduino and esp8266 microcontrollers to [DSC PowerSeries](http://www.dsc.com/dsc-security-products/g/PowerSeries/4) security systems for integration with home automation, notifications on alarm events, and usage as a virtual keypad. This enables homes and offices with existing DSC security systems (of which millions have been installed over the decades) to connect with modern devices and software, while retaining the features and reliability of a hardwired system.
2
+
This library directly interfaces Arduino and esp8266 microcontrollers to [DSC PowerSeries](http://www.dsc.com/dsc-security-products/g/PowerSeries/4) security systems for integration with home automation, notifications on alarm events, and usage as a virtual keypad. This enables homes and offices with existing DSC security systems (of which millions have been installed over the decades) to connect with modern devices and software, while retaining the features and reliability of a hardwired system for under $5USD in components.
3
3
4
4
The built-in examples can be used as-is or as a base to adapt to other uses:
* Virtual keypad: Web interface, [Blynk](https://www.blynk.cc) mobile app
8
8
9
9
## Screenshots
@@ -31,42 +31,47 @@ While there has been excellent [discussion about the DSC Keybus protocol](https:
31
31
* Read-only - unable to control the Keybus to act as a virtual keypad.
32
32
* No implementations to do useful work with the data.
33
33
34
-
Poking around with a logic analyzer and oscilloscope revealed that the errors capturing the Keybus data were timing issues. Updating the existing projects to fix this turned out to be more troublesome than starting from scratch, so this project was born. After resolving the data errors, decoding the data required capturing the Keybus binary data as the security system handled various events and reverse engineering the protocol.
35
-
36
-
At this point, this interface resolves all of the earlier issues (and goes beyond my initial goal of simply seeing if the alarm is triggered).
34
+
Poking around with a logic analyzer and oscilloscope revealed that the errors capturing the Keybus data were timing issues. Updating the existing projects to fix this turned out to be more troublesome than starting from scratch, so this project was born. After resolving the data errors, it was possible to reverse engineer the protocol by capturing the Keybus binary data as the security system handled various events. At this point, this interface resolves all of the earlier issues (and goes beyond my initial goal of simply seeing if the alarm is triggered).
37
35
38
36
## Features
39
-
* Monitor the alarm state of all partitions: alarm triggered, armed/disarmed, entry/exit delay, fire triggered
37
+
* Monitor the alarm state of all partitions: alarm triggered, armed/disarmed, entry/exit delay, fire triggered, keypad panic keys
40
38
* Monitor the state of all zones: zones open/closed, zones in alarm
39
+
* Monitor the system status: trouble, AC power, battery
41
40
* Virtual keypad: Send keys to the panel for any partition
42
41
* Direct Keybus interface: does not require the [DSC IT-100 serial interface](https://www.dsc.com/alarm-security-products/IT-100%20-%20PowerSeries%20Integration%20Module/22).
- All PowerSeries series are supported, please [post an issue](https://github.com/taligentx/dscKeybusInterface/issues) if you have a different panel (PC5020, etc) and have tested the interface to update this list.
46
45
- Rebranded DSC PowerSeries (such as some ADT systems) should also work with this interface.
47
-
* Unsupported security systems:
48
-
- DSC Classic ([PC1500, etc](https://www.dsc.com/?n=enduser&o=identify)): Uses a different data protocol, though support is theoretically possible.
49
-
- DSC Neo: Uses a higher speed encrypted data protocol (Corbus) that is not possible to support.
50
-
- Honeywell, Ademco, and other brands (that are not rebranded DSC systems) use totally different protocols and are not supported.
51
46
* Supported microcontrollers:
52
-
- Arduino: Uno, Mega, Leonardo, Mini, Micro, Nano, Pro, Pro Mini (ATmega328P, ATmega2560, and ATmega32U4-based boards at 16Mhz)
53
-
- esp8266: NodeMCU, Wemos D1 Mini, ESP12, etc - these work with the Arduino framework, have integrated WiFi, and feature much better performance/memory at only $3USD shipped.
47
+
-[Arduino](https://www.arduino.cc/en/Main/Products): Uno, Mega, Leonardo, Mini, Micro, Nano, Pro, Pro Mini (ATmega328P, ATmega2560, and ATmega32U4-based boards at 16Mhz)
48
+
- esp8266: NodeMCU v2 or v3, Wemos D1 Mini, etc.
49
+
* Includes [Arduino framework support](https://github.com/esp8266/Arduino), integrated WiFi, and improved specs at only $3USD shipped.
50
+
* NodeMCU modules are a good choice as they can be powered directly from the DSC panel, the Wemos D1 Mini requires an additional 5v voltage regulator to handle the 12v+ DSC panel power.
54
51
* Designed for reliable data decoding and performance:
55
52
- Pin change and timer interrupts for accurate data capture timing
56
53
- Data buffering: helps prevent lost Keybus data if the sketch is busy
57
-
- Extensive data decoding: reverse engineered the majority of Keybus data as seen in the [DSC IT-100 Data Interface developer's guide](https://cms.dsc.com/download.php?t=1&id=16238) and documented in [`src/dscKeybusPrintData.cpp`](https://github.com/taligentx/dscKeybusInterface/blob/master/src/dscKeybusPrintData.cpp).
54
+
- Extensive data decoding: the majority of Keybus data as seen in the [DSC IT-100 Data Interface developer's guide](https://cms.dsc.com/download.php?t=1&id=16238) has been reverse engineered and documented in [`src/dscKeybusPrintData.cpp`](https://github.com/taligentx/dscKeybusInterface/blob/master/src/dscKeybusPrintData.cpp).
58
55
- Non-blocking code: Allows sketches to run as quickly as possible without using `delay` or `delayMicroseconds`
56
+
* Unsupported security systems:
57
+
- DSC Classic series ([PC1500, etc](https://www.dsc.com/?n=enduser&o=identify)) use a different data protocol, though support is possible.
58
+
- DSC Neo series use a higher speed encrypted data protocol (Corbus) that is not possible to support.
59
+
- Honeywell, Ademco, and other brands (that are not rebranded DSC systems) use different protocols and are not supported.
59
60
* Potential future features (pending [sufficient interest](https://github.com/taligentx/dscKeybusInterface/issues)):
60
61
- Virtual zone expander: Add new zones to the DSC panel emulated by the microcontroller based on GPIO pin states or software-based states. Requires decoding the DSC PC5108 zone expander data.
61
-
- Installer code unlocking: Requires brute force checking all possible codes and a workaround if keypad lockout is enabled (possibly automatically power-cycling the panel to skip the lockout time).
62
+
- Installer code unlocking: Requires brute force checking all possible codes and a workaround if keypad lockout is enabled (possibly automatically power-cycling the panel with a relay to skip the lockout time).
62
63
- ESP32 microcontroller support: At minimum, requires changing the timer interrupts.
63
64
- DSC Classic series support: This protocol is [already decoded](https://github.com/dougkpowers/pc1550-interface), use with this library would require major changes.
64
65
65
66
## Release notes
66
67
* 1.2
67
68
- New: Virtual keypad web interface example, thanks to [Elektrik1](https://github.com/Elektrik1) for this contribution!
69
+
- As of esp8266 Arduino Core 2.5.1, you may need to [manually update the esp8266FS plugin](https://github.com/esp8266/arduino-esp8266fs-plugin) for SPIFFS upload.
70
+
- New: Support esp8266 CPU running at 160MHz - this helps sketches using TLS through BearSSL
68
71
- Updated: HomeAssistant-MQTT example includes availability status, thanks to [bjrolfe](https://github.com/bjrolfe) for this contribution!
69
-
- Updated: List of tested DSC panels: PC585, PC5005, PC1808
72
+
- Updated: List of tested DSC panels: PC585, PC1565, PC5005, PC1808
73
+
- Updated: esp8266 power wiring diagrams
74
+
- Updated: esp8266 module list
70
75
* 1.1
71
76
- New: Zones 33-64 tamper and fault decoding
72
77
- New: Push notification example using [Twilio](https://www.twilio.com), thanks to [ColingNG](https://github.com/ColinNg) for this contribution!
@@ -138,6 +143,12 @@ The included examples demonstrate how to use the library and can be used as-is o
138
143
139
144
***Email** (esp8266-only): Demonstrates how to send an email when the status has changed. Email is sent using SMTPS (port 465) with SSL for encryption - this is necessary on the ESP8266 until STARTTLS can be supported. For example, this will work with Gmail after changing the account settings to [allow less secure apps](https://support.google.com/accounts/answer/6010255).
140
145
146
+
This can be used to send SMS messages if the number's service provider has an [email to SMS gateway](https://en.wikipedia.org/wiki/SMS_gateway#Email_clients) - examples for the US:
***VirtualKeypad-Blynk** (esp8266-only): Provides a virtual keypad interface for the free [Blynk](https://www.blynk.cc) app on iOS and Android. Scan one of the following QR codes from within the Blynk app for an example keypad layout:
142
153
-[Virtual keypad with 16 zones](https://user-images.githubusercontent.com/12835671/42364287-41ca6662-80c0-11e8-85e7-d579b542568d.png)
143
154
-[Virtual keypad with 32 zones](https://user-images.githubusercontent.com/12835671/42364293-4512b720-80c0-11e8-87bd-153c4e857b4e.png)
@@ -153,7 +164,13 @@ The included examples demonstrate how to use the library and can be used as-is o
153
164
## Wiring
154
165
155
166
```
156
-
DSC Aux(-) --- Arduino/esp8266 ground
167
+
DSC Aux(+) ---+--- Arduino Vin pin
168
+
|
169
+
+--- esp8266 NodeMCU Vin pin
170
+
|
171
+
+--- 5v voltage regulator --- esp8266 Wemos D1 Mini 5v pin
+--- 5v voltage regulator --- esp8266 development board 5v pin (NodeMCU, Wemos)
175
-
|
176
-
+--- 3.3v voltage regulator --- esp8266 bare module VCC pin (ESP-12, etc)
177
187
```
178
188
179
189
## Wiring Notes
180
190
* The DSC Keybus operates at ~12.6v, a pair of resistors per data line will bring this down to an appropriate voltage for both Arduino and esp8266.
181
-
* Arduino: connect the DSC Yellow (Clock) line to a [hardware interrupt pin](https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/) - for the Uno, these are pins 2 and 3. The DSC Green (Data) line can be connected to the remaining digital pins 2-12.
191
+
* Arduino: connect the DSC Yellow (Clock) line to a [hardware interrupt pin](https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/) - for the Uno, these are pins 2 and 3. The DSC Green (Data) line can be connected to any of the remaining digital pins 2-12.
182
192
* esp8266: connect the DSC lines to GPIO pins that are normally low to avoid putting spurious data on the Keybus: D1 (GPIO5), D2 (GPIO4) and D8 (GPIO15).
183
193
* Virtual keypad uses an NPN transistor and a resistor to write to the Keybus. Most small signal NPN transistors should be suitable, for example:
184
194
* 2N3904
185
195
* BC547, BC548, BC549
186
196
* That random NPN at the bottom of your parts bin (my choice)
197
+
* Connections should be soldered, breadboards can cause issues.
187
198
188
199
## Virtual keypad
189
200
This allows a sketch to send keys to the DSC panel to emulate the physical DSC keypads and enables full control of the panel from the sketch or other software.
0 commit comments