Skip to content

Commit

Permalink
0.9.6.20 - bug fix for panel loss of response
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmeghead committed Aug 7, 2024
1 parent df8f7bf commit bacdea0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion custom_components/visonic/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
# "trigger",
#]

CLIENT_VERSION = "0.9.6.17"
CLIENT_VERSION = "0.9.6.20"

MAX_CLIENT_LOG_ENTRIES = 300

Expand Down
2 changes: 1 addition & 1 deletion custom_components/visonic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"loggers": ["visonic"],
"requirements": ["Pillow", "pyserial_asyncio"],
"single_config_entry": false,
"version": "0.9.6.17"
"version": "0.9.6.20"
}
28 changes: 14 additions & 14 deletions custom_components/visonic/pyvisonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def convertByteArray(s) -> bytearray:
from pyhelper import (toString, MyChecksumCalc, AlImageManager, ImageRecord, titlecase, pmPanelTroubleType_t, pmPanelAlarmType_t, AlPanelInterfaceHelper,
AlSensorDeviceHelper, AlSwitchDeviceHelper)

PLUGIN_VERSION = "1.3.6.3"
PLUGIN_VERSION = "1.3.6.5"

# Some constants to help readability of the code

Expand Down Expand Up @@ -206,20 +206,20 @@ def convertByteArray(s) -> bytearray:
# This data defines each panel type's maximum capability
pmPanelConfig_t = { # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 See pmPanelType_t above
"CFG_SUPPORTED" : ( False, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True ), # Supported Panels i.e. not a PowerMax
"CFG_KEEPALIVE" : ( 10000, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 15, 25, 25, 15 ), # Keep Alive message interval if no other messages sent
"CFG_DLCODE_1" : ( "5650", "5650", "5650", "5650", "5650", "5650", "5650", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA" ), # Default download codes (for reset panels or panels that have not been changed)
"CFG_DLCODE_2" : ( "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB" ), # Alternative (Master) known default download codes
"CFG_PARTITIONS" : ( 1, 1, 1, 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ),
"CFG_EVENTS" : ( 250, 250, 250, 250, 250, 250, 250, 250, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000 ),
"CFG_KEYFOBS" : ( 8, 8, 8, 8, 8, 8, 8, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32 ),
"CFG_1WKEYPADS" : ( 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"CFG_2WKEYPADS" : ( 2, 2, 2, 2, 2, 2, 2, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32 ),
"CFG_SIRENS" : ( 2, 2, 2, 2, 2, 2, 2, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8 ),
"CFG_USERCODES" : ( 8, 8, 8, 8, 8, 8, 8, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48 ),
"CFG_KEEPALIVE" : ( 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 15, 25, 25, 15 ), # Keep Alive message interval if no other messages sent
"CFG_DLCODE_1" : ( "", "5650", "5650", "5650", "5650", "5650", "5650", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA" ), # Default download codes (for reset panels or panels that have not been changed)
"CFG_DLCODE_2" : ( "", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "AAAA", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB", "BBBB" ), # Alternative (Master) known default download codes
"CFG_PARTITIONS" : ( 0, 1, 1, 1, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ),
"CFG_EVENTS" : ( 0, 250, 250, 250, 250, 250, 250, 250, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000 ),
"CFG_KEYFOBS" : ( 0, 8, 8, 8, 8, 8, 8, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32 ),
"CFG_1WKEYPADS" : ( 0, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
"CFG_2WKEYPADS" : ( 0, 2, 2, 2, 2, 2, 2, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32 ),
"CFG_SIRENS" : ( 0, 2, 2, 2, 2, 2, 2, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8 ),
"CFG_USERCODES" : ( 0, 8, 8, 8, 8, 8, 8, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48 ),
"CFG_PROXTAGS" : ( 0, 0, 8, 0, 8, 8, 0, 8, 32, 32, 32, 32, 32, 32, 32, 32, 32 ),
"CFG_ZONECUSTOM" : ( 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ),
"CFG_WIRELESS" : ( 28, 28, 28, 28, 28, 28, 29, 29, 62, 62, 62, 62, 62, 64, 62, 62, 64 ), # Wireless + Wired total 30 or 64
"CFG_WIRED" : ( 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 0, 2, 2, 0 ),
"CFG_WIRELESS" : ( 0, 28, 28, 28, 28, 28, 29, 29, 62, 62, 62, 62, 62, 64, 62, 62, 64 ), # Wireless + Wired total 30 or 64
"CFG_WIRED" : ( 0, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 0, 2, 2, 0 ),
"CFG_AUTO_ENROLL" : ( False, False, False, True, True, True, True, True, True, True, True, True, True, False, True, True, False ), # 360 and 360R cannot autoenroll to Powerlink
"CFG_AUTO_SYNCTIME" : ( False, False, False, True, True, True, True, True, True, True, True, True, True, True, True, True, True ), # Assume 360 and 360R can auto sync time
"CFG_POWERMASTER" : ( False, False, False, False, False, False, False, True, True, True, True, True, True, True, True, True, True ), # Panels that use and respond to the additional PowerMaster Messages
Expand Down Expand Up @@ -1804,7 +1804,7 @@ async def _keep_alive_and_watchdog_timer(self):
elif len(self.pmExpectedResponse) > 0 and self.expectedResponseTimeout >= RESPONSE_TIMEOUT:
# Expected response timeouts are only a problem when in Powerlink Mode as we expect a response
# But in all modes, give the panel a _triggerRestoreStatus
if len(self.pmExpectedResponse) == 1 and self.pmExpectedResponse[0] == ACK_MESSAGE:
if len(self.pmExpectedResponse) == 1 and ACK_MESSAGE in self.pmExpectedResponse:
pass # If it's only for an acknowledge response then ignore it
else:
st = '[{}]'.format(', '.join(hex(x) for x in self.pmExpectedResponse))
Expand Down

0 comments on commit bacdea0

Please sign in to comment.