Skip to content

Support for 95 users, decoded more status & keys messages, additions to 0x87, 0xC3 cmds#182

Merged
taligentx merged 17 commits intotaligentx:developfrom
kricon:develop
Dec 18, 2020
Merged

Support for 95 users, decoded more status & keys messages, additions to 0x87, 0xC3 cmds#182
taligentx merged 17 commits intotaligentx:developfrom
kricon:develop

Conversation

@kricon
Copy link
Copy Markdown
Contributor

@kricon kricon commented Dec 10, 2020

As discussed in #175 I've decoded User code range 35-95 present on new panels.
Placing Pull request instead of logs output, should be faster and easier for both :)
Tested for: *1, *2, *3, *5, *6, *7, *9, Arm/disarm, random access codes in range 1-75.
Just for reference, Zone expander 7 supervisory and *5/*6 access by users 41-42 already decoded in previous pull request which is already merged.

Changes:
Seperated printPanelStatus1X as it conflicted between 0x14, 0x17 and 0x1B.
Added printPanelStatus5 (for arm/disarm/*9 user codes 35-95 except 40-42)
Added printPanelStatus18 (*5 and *6 users 1-95, *7/Auto-arm cancel users 35-95)
Added accessCodeIncrease boolean onto printPanelAccessCode, making support for user codes 33-39 and consecutive decoding for users 33-95 by increment of 3 starting with user40, for printPanelData5,17,18 used on 0xEB and 0xEC cmds.

EDIT: in commit b20d79a I've included two new decoded messages, for entering 6-code installer code and 6-code user codes.
EDIT2: in commit 92d0a00 more messages are decoded, for key ouput. Global label broadcast and Data received confirmation as seen in #184 logs
EDIT3: in commit 06cbfc0 0x87 fully decoded as per #166 "Battery check in progress" message decoded aswell.
EDIT4: in commit b4961fa 0xC3 cmd bits3&4 decoded - it is used for dialing attemps and dialer attempt end.
EDIT5: in commit 00f2a51 PGM2 input supervisory trouble/restore for printPanelStatus0 is decoded.
EDIT6: in commit e256c2d added decoding for Event buffer 75% full as well as few new keypad function keys added.
EDIT7: Decoded few new status/panel messages. More info on 0x8D cmd. Added new messages to VirtualKeypad examples.

NOTE: printPanelAccessCode need to check panel version before making prefixes for user codes 33, 34, 41 and 42.
Panels with version 4.1 and below have preset user codes 33,34 as Duress and 41,42 as Supervisory.
On panels with version 4.2 and above, only user code 40 is preset as Master, other ones can be individualy set as duress/supervisory.

Also, processPanelStatus5 should be added in dscKeybusProcessData.cpp for following which user code (in range 35-95) armed/disarmed system in sketches.

KeybusReader sketch compiles and flashes fine for Arduino Uno (output from latest commit 8b4caeb):

Sketch uses 32256 bytes (100%) of program storage space. Maximum is 32256 bytes.
Global variables use 961 bytes (46%) of dynamic memory, leaving 1087 bytes for local variables. Maximum is 2048 bytes.

kricon added 12 commits December 9, 2020 09:13
0x14/0x17/0x1B data was overlapping, so it needed to be seperated
0x05: arm/disarm user 35-39, 43-95
0x14: Tlink module data
0x17: *1/*2/*3 access user 35-39, 43-95
0x18: *5/*6/user code access 35-39, 43-95
0x1B: System reset transmission
Little messy but it works for *1, *2, *3, *5, *6, *7/Access codes codes 43-75. Arming/disarming is decoded but not implemented yet.
Decoding for user codes 75 - 95 is included but not tested (I dont have PC1864) but range matches fine so it should be correct.
It was mainly for testing and to learn/gain some experience with dsckeybusinterface structure. Code should be optimized.
Also, I had trouble getting user codes 35-39 to work because printPanelAccessCode increases user code by 5, needed for cmds on older generation.
… 1-95 user codes

Now supports more than 32 user codes, and correctly put it into oder (33-95 consecutive except codes 40-42).
…*7, *9

printPanelAccessCode needs a version check to correctly show user code prefix (users 33, 34, 41, 42)
Panels with version 4.2 and above have more user codes and each can be set as supervisor/durres
Tested random codes in range 1-75, works nice on PC1832. 75-95 pending testing but range matches fine.
"global label broadcast" key send immediately after LCD5500 start label broadcast, it disables all keypads on system
"data successfully received" key is send as confirmation immediately after keypad received and read up to 8-char of data, panel then send next 8-char data if whole string is more than 8 digits long (for example, phone number programming is 32 digits in lenght)
also boolean accessIncrease renamed to accessCodeIncrease for better readability
…otif.

Added Battery check in progress message, 0x87 now fully decoded with byte3 bit2 and 3 discovered.
Changed "Unknown notification" to "Keypad going idle notification", on which partition is send on 0xB1 Byte4 afterwards.
Renamed "Global label broadcast start" to "Label broadcast announced" for better understanding.
Added "Entered *1/*2/*3 menu" message, better to include that than unknown data.
Bugfix: 0xC3 data will be unknown if dialer attempts while keypad lockout active.
Im not certain if 0xC3 byte2 bit4 is indeed related for dialer attempts.
Also I got this message after lockout time expired, more fixing needed, but better than unknown message:
11000011 0 00010000 11111111 11010010 [0xC3] Dialer attempts finished
Renamed "PGM2 input trouble/restore" to "Fire zone trouble/restore" to match event buffer naming scheme.
@kricon kricon changed the title Added support for user codes 33-95 for arm/disarm/*1/*2/*3/*5/*6/*7/*9 Support for 95 users, decoded more status & keys messages, additions to 0x87, 0xC3 cmds Dec 12, 2020
kricon and others added 5 commits December 13, 2020 08:14
@taligentx taligentx merged commit b65b792 into taligentx:develop Dec 18, 2020
@taligentx
Copy link
Copy Markdown
Owner

Merged, thank you for this work! Splitting out printPanelStatus1X makes sense, and I'll see if there's code elsewhere that can be consolidated. With this merge, I'm seeing the Arduino Uno code size at 31118 bytes so there's a little bit of breathing room.

@kricon
Copy link
Copy Markdown
Contributor Author

kricon commented Dec 18, 2020

Can you verify ranges 75-95 and which is the last user code PC1864 accepts? On PC1616 - 48 and on PC1832 - 75 (instead of 72 as per manual). I found out more Key messages so it's nice there is room to include it.
As for 0x8D/0x6E and similar cmds, do you plan including it at all? I've checked 0x8D byte3 and succesfuly decoded 0x01 until 0xDE with just few gaps inbetween. It wont fit on Arduino for sure.

@taligentx
Copy link
Copy Markdown
Owner

taligentx commented Dec 19, 2020

Can you verify ranges 75-95 and which is the last user code PC1864 accepts?

Looks good! User 95 is the last user, anything after that results in an error beep (aside from 99 to configure the user attributes):

11101011 0 00000010 00010110 00011010 00010011 00010100 00000101 01011111 00000000 10101000 [0xEB] 2016.06.16 19:05 | Partition 2 | Disarmed: User code 75
11101011 0 00000010 00010110 00011010 00010010 11101000 00010111 01101111 00000000 10011101 [0xEB] 2016.06.16 18:58 | Partition 2 | *1: User code 75
11101011 0 00000010 00010110 00011010 00010010 11101000 00011000 10000001 00000000 10110000 [0xEB] 2016.06.16 18:58 | Partition 2 | *5: User code 75
11101011 0 00000010 00010110 00011010 00010011 00010000 00000101 00111001 00000000 01111110 [0xEB] 2016.06.16 19:04 | Partition 2 | Armed: User code 95
11101011 0 00000010 00010110 00011010 00010010 11010000 00010111 10000011 00000000 10011001 [0xEB] 2016.06.16 18:52 | Partition 2 | *1: User code 95
11101011 0 00000010 00010110 00011010 00010010 11011000 00011000 10010101 00000000 10110100 [0xEB] 2016.06.16 18:54 | Partition 2 | *5: User code 95

.

As for 0x8D/0x6E and similar cmds, do you plan including it at all?

Sure, the Keybus decoding code in dscKeybusPrintData.cpp can keep growing (though I'll need to start excluding some decoding from the Uno, etc) - it's the core interface code in dscKeybusInterface.cpp and status processing code in dscKeybusProcessData.cpp that I'd like to focused on only processing data that has practical applications.

For example, I'll need to split off handling the 0x0F, 0xE6.21, 0xE6.01, and 0xE6.02 status messages you noted that are constantly sent in installer programming from partitions 2-4 - in the current code, a copy of each of these messages would need to be stored in memory for redundantPanelData() to eliminate the flood of messages in KeybusReader. However, this memory increase would affect all sketches, so I'll be taking a look on reworking this to be more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants