Skip to content

Commit 55fba30

Browse files
committed
Allow configuring panel password
1 parent 684b45c commit 55fba30

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ peripherals = [
3030
ip_host = "192.168.1.2" # specify either this or serial_port, not both
3131
ip_port = 10000 # this is the default
3232
ip_password = "paradox" # this is the default
33+
panel_password = "1234" # this is the default
3334
}
3435
...
3536
]

qtoggleserver/paradox/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
DEFAULT_SERIAL_BAUD = 9600
22
DEFAULT_IP_PORT = 10000
33
DEFAULT_IP_PASSWORD = 'paradox'
4+
DEFAULT_PANEL_PASSWORD = '1234'
45

56
ARMED_MODE_DISARMED = 'disarm'
67
ARMED_MODE_ARMED = 'arm'

qtoggleserver/paradox/paradoxalarm.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def __init__(
3232
ip_host: Optional[str] = None,
3333
ip_port: int = constants.DEFAULT_IP_PORT,
3434
ip_password: str = constants.DEFAULT_IP_PASSWORD,
35+
panel_password: str = constants.DEFAULT_PANEL_PASSWORD,
3536
**kwargs
3637
) -> None:
3738
self.setup_config()
@@ -46,6 +47,7 @@ def __init__(
4647
self._ip_host = ip_host
4748
self._ip_port = ip_port
4849
self._ip_password = ip_password
50+
self._panel_password = panel_password
4951

5052
self._paradox = None
5153
self._panel_task = None
@@ -80,16 +82,22 @@ def make_paradox(self) -> Paradox:
8082
config.CONNECTION_TYPE = 'Serial'
8183
config.SERIAL_PORT = self._serial_port
8284
config.SERIAL_BAUD = self._serial_baud
85+
config.IO_TIMEOUT = 10
86+
config.LOGGING_DUMP_PACKETS = True
87+
config.LOGGING_DUMP_MESSAGES = True
8388

8489
self.debug('using serial connection on %s:%s', config.SERIAL_PORT, config.SERIAL_BAUD)
8590
else: # IP connection, e.g. 192.168.1.2:10000:paradox
8691
config.CONNECTION_TYPE = 'IP'
8792
config.IP_CONNECTION_HOST = self._ip_host
8893
config.IP_CONNECTION_PORT = self._ip_port
8994
config.IP_CONNECTION_PASSWORD = self._ip_password.encode()
95+
config.IP_INTERFACE_PASSWORD = self._ip_password.encode()
9096

9197
self.debug('using IP connection on %s:%s', config.IP_CONNECTION_HOST, config.IP_CONNECTION_PORT)
9298

99+
config.PASSWORD = self._panel_password.encode()
100+
93101
return Paradox()
94102

95103
def parse_labels(self) -> None:

0 commit comments

Comments
 (0)