qolsys-controller 0.0.13__py3-none-any.whl → 0.0.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,7 @@ class QolsysPartition(QolsysObservable):
39
39
 
40
40
  # Other
41
41
  self._command_exit_sounds = True
42
+ self._command_silent_disarming = False
42
43
  self._command_arm_stay_instant = True
43
44
 
44
45
  @property
@@ -81,6 +82,14 @@ class QolsysPartition(QolsysObservable):
81
82
  def command_arm_stay_instant(self) -> bool:
82
83
  return self._command_arm_stay_instant
83
84
 
85
+ @property
86
+ def command_silent_disarming(self) -> bool:
87
+ return self._command_silent_disarming
88
+
89
+ @command_silent_disarming.setter
90
+ def command_silent_disarming(self, value: bool) -> None:
91
+ self._command_silent_disarming = value
92
+
84
93
  @system_status.setter
85
94
  def system_status(self, new_value: PartitionSystemStatus) -> None:
86
95
  if self._system_status != new_value:
@@ -34,6 +34,7 @@ class QolsysPluginRemote(QolsysPlugin):
34
34
 
35
35
  # Plugin
36
36
  self.certificate_exchange_server = None
37
+ self._check_user_code_on_arm = False
37
38
  self._check_user_code_on_disarm = True
38
39
  self._log_mqtt_messages = False
39
40
  self._task_manager = QolsysTaskManager()
@@ -62,6 +63,14 @@ class QolsysPluginRemote(QolsysPlugin):
62
63
  def check_user_code_on_disarm(self, check_user_code_on_disarm: bool) -> None:
63
64
  self._check_user_code_on_disarm = check_user_code_on_disarm
64
65
 
66
+ @property
67
+ def check_user_code_on_arm(self) -> bool:
68
+ return self._check_user_code_on_arm
69
+
70
+ @check_user_code_on_arm.setter
71
+ def check_user_code_on_arm(self, check_user_code_on_arm: bool) -> None:
72
+ self._check_user_code_on_arm = check_user_code_on_arm
73
+
65
74
  @property
66
75
  def auto_discover_pki(self) -> bool:
67
76
  return self._auto_discover_pki
@@ -196,7 +205,7 @@ class QolsysPluginRemote(QolsysPlugin):
196
205
  await self.aiomqtt.subscribe("mastermeid", qos=0)
197
206
 
198
207
  # Subscribe to all topics
199
- await self.aiomqtt.subscribe("#", qos=0)
208
+ #await self.aiomqtt.subscribe("#", qos=0)
200
209
 
201
210
  # Start mqtt_listent_task and mqtt_ping_task
202
211
  self._task_manager.cancel(self._mqtt_task_listen_label)
@@ -733,7 +742,7 @@ class QolsysPluginRemote(QolsysPlugin):
733
742
  LOGGER.debug("MQTT: Receiving pairing_request command")
734
743
  return response
735
744
 
736
- async def command_ui_delay(self, partition_id: str) -> None:
745
+ async def command_ui_delay(self, partition_id: str,silent_disarming:bool = False) -> None:
737
746
  LOGGER.debug("MQTT: Sending ui_delay command")
738
747
 
739
748
  # partition state needs to be sent for ui_delay to work
@@ -744,6 +753,7 @@ class QolsysPluginRemote(QolsysPlugin):
744
753
  "panel_status": partition.system_status,
745
754
  "userID": 0,
746
755
  "partitionID": partition_id, # STR EXPECTED
756
+ "silentDisarming":silent_disarming,
747
757
  "operation_source": 1,
748
758
  "macAddress": self.settings.random_mac,
749
759
  }
@@ -774,7 +784,7 @@ class QolsysPluginRemote(QolsysPlugin):
774
784
  await self.send_command(topic, payload, requestID)
775
785
  LOGGER.debug("MQTT: Receiving ui_delay command")
776
786
 
777
- async def command_disarm(self, partition_id: str, user_code: str = "", exit_sounds: bool = True) -> bool:
787
+ async def command_disarm(self, partition_id: str, user_code: str = "", silent_disarming: bool = False) -> bool:
778
788
  partition = self.state.partition(partition_id)
779
789
  if not partition:
780
790
  LOGGER.debug("MQTT: disarm command error - Unknow Partition")
@@ -788,7 +798,7 @@ class QolsysPluginRemote(QolsysPlugin):
788
798
  LOGGER.debug("MQTT: disarm command error - user_code error")
789
799
  return False
790
800
 
791
- async def get_mqtt_disarm_command() -> str:
801
+ async def get_mqtt_disarm_command(silent_disarming:bool) -> str:
792
802
  if partition.alarm_state == PartitionAlarmState.ALARM:
793
803
  return "disarm_from_emergency"
794
804
  if partition.system_status in {PartitionSystemStatus.ARM_AWAY_EXIT_DELAY,
@@ -798,12 +808,12 @@ class QolsysPluginRemote(QolsysPlugin):
798
808
  if partition.system_status in {PartitionSystemStatus.ARM_AWAY,
799
809
  PartitionSystemStatus.ARM_STAY,
800
810
  PartitionSystemStatus.ARM_NIGHT}:
801
- await self.command_ui_delay(partition_id)
811
+ await self.command_ui_delay(partition_id,silent_disarming)
802
812
  return "disarm_the_panel_from_entry_delay"
803
813
 
804
814
  return "disarm_from_openlearn_sensor"
805
815
 
806
- mqtt_disarm_command = await get_mqtt_disarm_command()
816
+ mqtt_disarm_command = await get_mqtt_disarm_command(silent_disarming)
807
817
  LOGGER.debug("MQTT: Sending disarm command - check_user_code:%s", self.check_user_code_on_disarm)
808
818
 
809
819
 
@@ -812,7 +822,6 @@ class QolsysPluginRemote(QolsysPlugin):
812
822
  "userID": user_id,
813
823
  "partitionID": int(partition_id), # INT EXPECTED
814
824
  "operation_source": 1,
815
- "disarm_exit_sounds": exit_sounds,
816
825
  "macAddress": self.settings.random_mac,
817
826
  }
818
827
 
@@ -903,7 +912,7 @@ class QolsysPluginRemote(QolsysPlugin):
903
912
  LOGGER.debug("MQTT: arm command error - Unknow Partition")
904
913
  return False
905
914
 
906
- if self.panel.SECURE_ARMING == "true":
915
+ if self.panel.SECURE_ARMING == "true" and self.check_user_code_on_arm:
907
916
  # Do local user code verification to arm if secure arming is enabled
908
917
  user_id = self.panel.check_user(user_code)
909
918
  if user_id == -1:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qolsys-controller
3
- Version: 0.0.13
3
+ Version: 0.0.15
4
4
  Summary: A Python module that emulates a virtual IQ Remote device, enabling full local control of a Qolsys IQ Panel
5
5
  Project-URL: Homepage, https://github.com/EHylands/QolsysController
6
6
  Project-URL: Issues, https://github.com/EHylands/QolsysController/issues
@@ -6,11 +6,11 @@ qolsys_controller/mdns.py,sha256=3_d-_K5Fyxc-2s0Fo1advTSpD72P369Hou1Ko0z__Ag,606
6
6
  qolsys_controller/mqtt_command_queue.py,sha256=FjSbjK3_3SXV5eQPfQ-k8HOI5Tbu2aWzAxe4uXymK64,937
7
7
  qolsys_controller/observable.py,sha256=X7uMnBHGpklPTa-RHKldXA0Rq38Cs1yOIuxl8ODeKV4,1049
8
8
  qolsys_controller/panel.py,sha256=2EZtnA9c_yVSL3Vtszq9SLae9ykSuKrzIxssa6LoAvk,39370
9
- qolsys_controller/partition.py,sha256=-Fos327y3MlSWwJCbDeQM51-K8uMHANxIJ8kN9-S5CA,8045
9
+ qolsys_controller/partition.py,sha256=k5aEAvF0r94DlZlDlcQnW7-lPWgIqJPA42fl3R2KoS4,8347
10
10
  qolsys_controller/pki.py,sha256=_e0tiNF8Hypb37cHr7x8yqUZDaqbzRzP45AitTtmzk4,8663
11
11
  qolsys_controller/plugin.py,sha256=Qh0irFbuw9R2QF3jOFTJw70ceVxK1ld5_sW7VnpOrA8,819
12
12
  qolsys_controller/plugin_c4.py,sha256=71o5Y7Y13GO0vWCPIsCtpqXxrplryyqt8ua5L8F4StQ,382
13
- qolsys_controller/plugin_remote.py,sha256=gpcx5nSZBeZj69L8sn4mnhxTI2IZgyAwuapN9AbHmms,37890
13
+ qolsys_controller/plugin_remote.py,sha256=vwt2kAMAdeDw81XVENnmUTRME85SdwWFPZp9_WfdWcI,38338
14
14
  qolsys_controller/settings.py,sha256=2c8QLaEylpH2Wuol8EypYBIJhfniZXewb_54w8na2ts,5314
15
15
  qolsys_controller/state.py,sha256=eWn4KiWN75K83CVW224zekDUeIpgjh9tDfnpaOJWV3I,14360
16
16
  qolsys_controller/task_manager.py,sha256=IBFi1l9aId950wvRpvP6d4PHZhr3v1hnnt8NVulM3BI,1139
@@ -60,7 +60,7 @@ qolsys_controller/database/table_zwave_association_group.py,sha256=S_tWpfzzD44rJ
60
60
  qolsys_controller/database/table_zwave_history.py,sha256=4RiCzA_XFdXXVA9X48Z4eoxA_4DFKwdjkP2N6IHHOqQ,1897
61
61
  qolsys_controller/database/table_zwave_node.py,sha256=csESJCkcg8qAPn3KSL4jO9b1oymZ5wrQiXcmWR9vSc0,7302
62
62
  qolsys_controller/database/table_zwave_other.py,sha256=HJzLd4MUfNynE9jHiCzN7j1PFDncwQHeDkP5_8_s0YE,747
63
- qolsys_controller-0.0.13.dist-info/METADATA,sha256=zAAREL1cMt_vXe0XCE-9Jtl12N4mGboIoCWXNfH_UZ0,4175
64
- qolsys_controller-0.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
65
- qolsys_controller-0.0.13.dist-info/licenses/LICENSE,sha256=GBHv9eggdA5ablDMW1xiLzGDZ2gCIhcKGW__c2aVIOc,1069
66
- qolsys_controller-0.0.13.dist-info/RECORD,,
63
+ qolsys_controller-0.0.15.dist-info/METADATA,sha256=olgz7QVjsTN1SIjRXRD9LE6DVca4Pe6Yr9sYfDATcWM,4175
64
+ qolsys_controller-0.0.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
65
+ qolsys_controller-0.0.15.dist-info/licenses/LICENSE,sha256=GBHv9eggdA5ablDMW1xiLzGDZ2gCIhcKGW__c2aVIOc,1069
66
+ qolsys_controller-0.0.15.dist-info/RECORD,,