taligentx / dscKeybusInterface

An Arduino/esp8266/esp32 library to directly interface with DSC security systems.
GNU General Public License v3.0
497 stars 125 forks source link

Added LCD data readout for Blynk examples, some new status messages #192

Closed kricon closed 3 years ago

kricon commented 3 years ago

Added printing LCD data output messages onto VirtualPin20 of Blynk sketch.

For sections which have consecutive inputs (section [001] or [005] as example) it was needed to wait for panel until it send 2-beeps which means entry was correct and advance to next consecutive input, and then send "L" key again to get new data. That is what inputDigits boolean is checking, to avoid possible beep/0x6E conflict when panel emits 2 beeps for other things.

I've tried doing readout for 32-digits and successfully merged and print all 32 characters together, but there was major conflict when using real LCD keypad and programming phone numbers will be all screwed up - as keypad expect 4 consecutive 0x6E cmds to get all section data, but gets more 0x6E responses as the sketch will send "L" key by itself (and looping 4 times to get all 32 characters). Possible workaround is by using a timer but I never used one and as the code then was pretty much mess of advancing integers and boolean checks so I removed printing out 32-digit lcd data output.

"Partition disabled" message is send when keypad on one partition is into programming, so it disables other partitions. Real keypad display "Partition X not available" so I renamed message accordingly.

Also added that 0xA5 and 0xB7 (enter installer code for 8/enter master code for 6) pauses zones, so when you're typing fast and Blynk latency skip "enter * function" message, it would still switch to yellow-zone-lights-mode.

8 installer programming / 8 installed programming subsections means panel is waiting for input of 3 or 2 digits for valid section.

Another suggestion just came on mind, placing new LED into Blynk sketch which will change colors according how many beeps panel send - it would make programing even easier when you have feedback that you're input wrong value (long beep = red light).

kricon commented 3 years ago

Since original intended Pull-request release stated in title, I did more testing (for pending release #190) and added few new things/tweaks. Everything is described in each commit info/details.

Recently, when I was testing dialer on land-line I noticed that 0xC3 cmd byte2 bit4 is related to "Phone line trouble" / "Phone line available". Pending more testing, with v2.x, v3.x and v4.x panels to exactly verify it, when I'll have some free time to spare.

But as-is, this pull-request is ready to be merged, tested it a lot with VirtualKeypad-Blynk and KeybusReader examples (for now just on ESP8266, I've ordered an ESP32 and have plans to try other examples aswell) and didn't noticed any issues. Things I did in this PU isn't that big of a deal, and should't be code-breaking.

kricon commented 3 years ago

I've checked 0xC3 cmd output with telephone line connected, disconnected, and on call attempt. Dialer enabled message send when: telephone line trouble, dialing attempt with/without telephone line connected (active trouble or not) Dialer disabled message send when: telephone line is connected and available, or if disconnected but communications disabled (no active trouble). One of these two is the only messages 0xC3 cmd send after keypad lockout expires, so its good to leave both of this message in logs, just rename it accordingly.

Only tested on PC5020, I'll later check on earlier and newer panels but I think that's it. Should be edited/renamed in KeybusPrintData but I don't have idea how to rename it as first one can be send both when there's telephone line trouble or not.