qolsys-controller 0.0.11__py3-none-any.whl → 0.0.13__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.
@@ -15,11 +15,15 @@ from .table_iqremotesettings import QolsysTableIqRemoteSettings
15
15
  from .table_iqrouter_network_config import QolsysTableIqRouterNetworkConfig
16
16
  from .table_iqrouter_user_device import QolsysTableIqRouterUserDevice
17
17
  from .table_master_slave import QolsysTableMasterSlave
18
+ from .table_nest_device import QolsysTableNestDevice
19
+ from .table_output_rules import QolsysTableOutputRules
18
20
  from .table_partition import QolsysTablePartition
21
+ from .table_pgm_outputs import QolsysTablePgmOutputs
19
22
  from .table_powerg_device import QolsysTablePowerGDevice
20
23
  from .table_qolsyssettings import QolsysTableQolsysSettings
21
24
  from .table_scene import QolsysTableScene
22
25
  from .table_sensor import QolsysTableSensor
26
+ from .table_shades import QolsysTableShades
23
27
  from .table_smartsocket import QolsysTableSmartSocket
24
28
  from .table_state import QolsysTableState
25
29
  from .table_tcc import QolsysTableTcc
@@ -75,6 +79,10 @@ class QolsysDB:
75
79
  self.table_zwave_history = QolsysTableZwaveHistory(self.db, self.cursor)
76
80
  self.table_zwave_node = QolsysTableZwaveNode(self.db, self.cursor)
77
81
  self.table_zwave_other = QolsysTableZwaveOther(self.db, self.cursor)
82
+ self.table_pgm_outputs = QolsysTablePgmOutputs(self.db, self.cursor)
83
+ self.table_output_rules = QolsysTableOutputRules(self.db, self.cursor)
84
+ self.table_shades = QolsysTableShades(self.db, self.cursor)
85
+ self.table_nest_device = QolsysTableNestDevice(self.db, self.cursor)
78
86
 
79
87
  self._table_array = []
80
88
  self._table_array.append(self.table_sensor)
@@ -108,6 +116,10 @@ class QolsysDB:
108
116
  self._table_array.append(self.table_zwave_association_goup)
109
117
  self._table_array.append(self.table_virtual_device)
110
118
  self._table_array.append(self.table_eu_event)
119
+ self._table_array.append(self.table_pgm_outputs)
120
+ self._table_array.append(self.table_output_rules)
121
+ self._table_array.append(self.table_shades)
122
+ self._table_array.append(self.table_nest_device)
111
123
 
112
124
  # Other Table not Implemented
113
125
  # content://com.qolsys.qolsysprovider.AllSensorsContentProvider/all_sensor
@@ -134,6 +146,7 @@ class QolsysDB:
134
146
  # content://com.qolsys.qolsysprovider.AxonRSSIContentProvider/axon_rssi_table
135
147
  # content://com.qolsys.qolsysprovider.PowerGDeviceContentProvider/powerg_device
136
148
  # content://com.qolsys.qolsysprovider.PowerGRSSIContentProvider/powerg_rssi_table
149
+ # content://com.qolsys.qolsysprovider.PgmOutputsContentProvider/pgm_outputs
137
150
 
138
151
  @property
139
152
  def db(self) -> sqlite3.Connection:
@@ -34,6 +34,7 @@ class QolsysTableMasterSlave(QolsysTable):
34
34
  "upgrade_status",
35
35
  "name",
36
36
  "bssid",
37
+ "ssid",
37
38
  "dhcpInfo",
38
39
  "topology",
39
40
  "reboot_reason",
@@ -44,8 +45,8 @@ class QolsysTableMasterSlave(QolsysTable):
44
45
  def insert(self, data: dict) -> None:
45
46
  self._cursor.execute(f"""INSERT INTO {self.table} (_id,version,opr,partition_id,zone_id,ip_address,mac_address,
46
47
  device_type,created_by,created_date,updated_by,last_updated_date,status,device_name,
47
- last_updated_iq_remote_checksum,software_version,upgrade_status,name,bssid,dhcpInfo,topology)
48
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)""", (
48
+ last_updated_iq_remote_checksum,software_version,upgrade_status,name,bssid,ssid,dhcpInfo,topology)
49
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)""", (
49
50
  data.get("_id"),
50
51
  data.get("version", ""),
51
52
  data.get("opr", ""),
@@ -65,6 +66,7 @@ class QolsysTableMasterSlave(QolsysTable):
65
66
  data.get("upgrade_status", ""),
66
67
  data.get("name", ""),
67
68
  data.get("bssid", ""),
69
+ data.get("ssid", ""),
68
70
  data.get("dhcpInfo", ""),
69
71
  data.get("topology", "")))
70
72
 
@@ -0,0 +1,27 @@
1
+ import logging # noqa: INP001
2
+ import sqlite3
3
+
4
+ from .table import QolsysTable
5
+
6
+ LOGGER = logging.getLogger(__name__)
7
+
8
+
9
+ class QolsysTableNestDevice(QolsysTable):
10
+
11
+ def __init__(self, db: sqlite3.Connection, cursor: sqlite3.Cursor) -> None:
12
+ super().__init__(db, cursor)
13
+ self._uri = "content://com.qolsys.qolsysprovider.NestDeviceContentProvider/nest_device"
14
+ self._table = "nest_device"
15
+ self._abort_on_error = False
16
+
17
+ self._columns = [
18
+ "_id",
19
+ ]
20
+
21
+ self._create_table()
22
+
23
+ def insert(self, data: dict) -> None:
24
+ if data is not None:
25
+ LOGGER.error("Please Report")
26
+ LOGGER.error("Loading Table Format: %s", self.uri)
27
+ LOGGER.error(data)
@@ -0,0 +1,27 @@
1
+ import logging # noqa: INP001
2
+ import sqlite3
3
+
4
+ from .table import QolsysTable
5
+
6
+ LOGGER = logging.getLogger(__name__)
7
+
8
+
9
+ class QolsysTableOutputRules(QolsysTable):
10
+
11
+ def __init__(self, db: sqlite3.Connection, cursor: sqlite3.Cursor) -> None:
12
+ super().__init__(db, cursor)
13
+ self._uri = "content://com.qolsys.qolsysprovider.OutputRulesContentProvider/output_rules"
14
+ self._table = "output_rules"
15
+ self._abort_on_error = False
16
+
17
+ self._columns = [
18
+ "_id",
19
+ ]
20
+
21
+ self._create_table()
22
+
23
+ def insert(self, data: dict) -> None:
24
+ if data is not None:
25
+ LOGGER.error("Please Report")
26
+ LOGGER.error("Loading Table Format: %s", self.uri)
27
+ LOGGER.error(data)
@@ -0,0 +1,27 @@
1
+ import logging # noqa: INP001
2
+ import sqlite3
3
+
4
+ from .table import QolsysTable
5
+
6
+ LOGGER = logging.getLogger(__name__)
7
+
8
+
9
+ class QolsysTablePgmOutputs(QolsysTable):
10
+
11
+ def __init__(self, db: sqlite3.Connection, cursor: sqlite3.Cursor) -> None:
12
+ super().__init__(db, cursor)
13
+ self._uri = "content://com.qolsys.qolsysprovider.PgmOutputsContentProvider/pgm_outputs"
14
+ self._table = "pgm_outputs"
15
+ self._abort_on_error = False
16
+
17
+ self._columns = [
18
+ "_id",
19
+ ]
20
+
21
+ self._create_table()
22
+
23
+ def insert(self, data: dict) -> None:
24
+ if data is not None:
25
+ LOGGER.error("Please Report")
26
+ LOGGER.error("Loading Table Format: %s", self.uri)
27
+ LOGGER.error(data)
@@ -59,6 +59,7 @@ class QolsysTableSensor(QolsysTable):
59
59
  "averagedBm",
60
60
  "serial_number",
61
61
  "extras",
62
+ "allowspeaker",
62
63
  ]
63
64
 
64
65
  self._create_table()
@@ -70,9 +71,9 @@ class QolsysTableSensor(QolsysTable):
70
71
  zone_two_way_voice_enabled, zone_reporting_enabled, battery_status,created_date,created_by,
71
72
  updated_date,updated_by,frame_count,frame_type,current_capability,shortID,diag_24hr,
72
73
  allowdisarming,device_capability,sub_type, signal_source, powerg_manufacture_id,parent_node,
73
- latestdBm,averagedBm,serial_number,extras,ac_status)
74
+ latestdBm,averagedBm,serial_number,extras,ac_status,allowspeaker)
74
75
  VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,
75
- ?,?,?,?,?,?,?,?,?,?,?)""", (
76
+ ?,?,?,?,?,?,?,?,?,?,?,?)""", (
76
77
  data.get("_id"),
77
78
  data.get("version", ""),
78
79
  data.get("opr", ""),
@@ -116,6 +117,7 @@ class QolsysTableSensor(QolsysTable):
116
117
  data.get("averagedBm", ""),
117
118
  data.get("serial_number", ""),
118
119
  data.get("extras", ""),
119
- data.get("ac_status", "")))
120
+ data.get("ac_status", ""),
121
+ data.get("allowspeaker", "")))
120
122
 
121
123
  self._db.commit()
@@ -0,0 +1,27 @@
1
+ import logging # noqa: INP001
2
+ import sqlite3
3
+
4
+ from .table import QolsysTable
5
+
6
+ LOGGER = logging.getLogger(__name__)
7
+
8
+
9
+ class QolsysTableShades(QolsysTable):
10
+
11
+ def __init__(self, db: sqlite3.Connection, cursor: sqlite3.Cursor) -> None:
12
+ super().__init__(db, cursor)
13
+ self._uri = "content://com.qolsys.qolsysprovider.ShadesContentProvider/shades"
14
+ self._table = "shades"
15
+ self._abort_on_error = False
16
+
17
+ self._columns = [
18
+ "_id",
19
+ ]
20
+
21
+ self._create_table()
22
+
23
+ def insert(self, data: dict) -> None:
24
+ if data is not None:
25
+ LOGGER.error("Please Report")
26
+ LOGGER.error("Loading Table Format: %s", self.uri)
27
+ LOGGER.error(data)
@@ -188,15 +188,15 @@ class QolsysPluginRemote(QolsysPlugin):
188
188
  await self.aiomqtt.subscribe("iq2meid")
189
189
 
190
190
  # Subscribte to MQTT commands response
191
- await self.aiomqtt.subscribe("response_" + self.settings.random_mac, qos=2)
191
+ await self.aiomqtt.subscribe("response_" + self.settings.random_mac, qos=0)
192
192
 
193
193
  # Only log mastermeid traffic for debug purposes
194
194
  if self.log_mqtt_mesages:
195
195
  # Subscribe to MQTT commands send to panel by other devices
196
- await self.aiomqtt.subscribe("mastermeid", qos=2)
196
+ await self.aiomqtt.subscribe("mastermeid", qos=0)
197
197
 
198
198
  # Subscribe to all topics
199
- await self.aiomqtt.subscribe("#", qos=2)
199
+ await self.aiomqtt.subscribe("#", qos=0)
200
200
 
201
201
  # Start mqtt_listent_task and mqtt_ping_task
202
202
  self._task_manager.cancel(self._mqtt_task_listen_label)
@@ -446,7 +446,7 @@ class QolsysPluginRemote(QolsysPlugin):
446
446
  LOGGER.error("MQTT Client not configured")
447
447
  raise QolsysMqttError
448
448
 
449
- await self.aiomqtt.publish(topic=topic, payload=json.dumps(json_payload), qos=2)
449
+ await self.aiomqtt.publish(topic=topic, payload=json.dumps(json_payload), qos=0)
450
450
  return await self._mqtt_command_queue.wait_for_response(request_id)
451
451
 
452
452
  async def command_connect(self) -> dict:
@@ -775,15 +775,13 @@ class QolsysPluginRemote(QolsysPlugin):
775
775
  LOGGER.debug("MQTT: Receiving ui_delay command")
776
776
 
777
777
  async def command_disarm(self, partition_id: str, user_code: str = "", exit_sounds: bool = True) -> bool:
778
- LOGGER.debug("MQTT: Sending disarm command - check_user_code:%s", self.check_user_code_on_disarm)
779
-
780
778
  partition = self.state.partition(partition_id)
781
779
  if not partition:
782
780
  LOGGER.debug("MQTT: disarm command error - Unknow Partition")
783
781
  return False
784
782
 
785
783
  # Do local user code verification
786
- user_id = 0
784
+ user_id = 1
787
785
  if self.check_user_code_on_disarm:
788
786
  user_id = self.panel.check_user(user_code)
789
787
  if user_id == -1:
@@ -802,9 +800,12 @@ class QolsysPluginRemote(QolsysPlugin):
802
800
  PartitionSystemStatus.ARM_NIGHT}:
803
801
  await self.command_ui_delay(partition_id)
804
802
  return "disarm_the_panel_from_entry_delay"
803
+
805
804
  return "disarm_from_openlearn_sensor"
806
805
 
807
806
  mqtt_disarm_command = await get_mqtt_disarm_command()
807
+ LOGGER.debug("MQTT: Sending disarm command - check_user_code:%s", self.check_user_code_on_disarm)
808
+
808
809
 
809
810
  disarm_command = {
810
811
  "operation_name": mqtt_disarm_command,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qolsys-controller
3
- Version: 0.0.11
3
+ Version: 0.0.13
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
@@ -10,7 +10,7 @@ qolsys_controller/partition.py,sha256=-Fos327y3MlSWwJCbDeQM51-K8uMHANxIJ8kN9-S5C
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=WwL_GJfKHIicgggbb7NsRjyObp-mkBbfE5Di-JBU2Z8,37889
13
+ qolsys_controller/plugin_remote.py,sha256=gpcx5nSZBeZj69L8sn4mnhxTI2IZgyAwuapN9AbHmms,37890
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
@@ -23,7 +23,7 @@ qolsys_controller/zwave_generic.py,sha256=gadtyUfPGsIzJaGc2zT5AQoFVxR_RsoagHE7x7
23
23
  qolsys_controller/zwave_lock.py,sha256=j80McYDNHFjSuaTxG6PJpYWjnQKlrAHlN3rSUUNlzL4,4979
24
24
  qolsys_controller/zwave_outlet.py,sha256=lxGB-jth11dHPUkT7jC411GdLCGDdct4mAGu05SndCA,185
25
25
  qolsys_controller/zwave_thermostat.py,sha256=sAraf4XEK40YCQlj9WcP39O-4JvWuNIyYf7AEGtVdqU,12766
26
- qolsys_controller/database/db.py,sha256=A3LaLzHklNMHNbZKJ9WuVQmuT8QA-UEZOrZuoIPCYn8,13538
26
+ qolsys_controller/database/db.py,sha256=__VinfaSuMcFcPdU3XdhLP2yp4V_cetgv_engf9Q70I,14352
27
27
  qolsys_controller/database/table.py,sha256=uxzBfMVxaGXnfib8qjltq_Souzao9cMiwDkQIHkp7PU,4702
28
28
  qolsys_controller/database/table_alarmedsensor.py,sha256=giF3k37VtN--zijFOAW2Bcd61oJFK575XqQBJnQ6bz8,1394
29
29
  qolsys_controller/database/table_automation.py,sha256=wgMX7ycXxKLi0bviUsEvtgetm8BHux7fQq6XmX0kMc8,2898
@@ -37,12 +37,16 @@ qolsys_controller/database/table_history.py,sha256=-t7Sx_gJgjiTrjZSKiDNr-wojN5kK
37
37
  qolsys_controller/database/table_iqremotesettings.py,sha256=AqAJkYCciOmmjMtLC60QKWaaOz668tGjo1VkKWMr3QU,1256
38
38
  qolsys_controller/database/table_iqrouter_network_config.py,sha256=xy_WLc_hL6p_ZV6ET85lZwjKUhjT1p8onMCEI31R1EI,799
39
39
  qolsys_controller/database/table_iqrouter_user_device.py,sha256=-ieMei5ieEOnqKwIde_yWrOcFXXXYeIDuFlEX_WDiZ4,787
40
- qolsys_controller/database/table_master_slave.py,sha256=3C2Fgxb8MLWhUR6aAtUugUq0HpgCdAQqA-QHxJAVVMw,2456
40
+ qolsys_controller/database/table_master_slave.py,sha256=ItyH0lS674JnnpjlzIMZQ9c8YGhrpDWBRGsTimOGZJ8,2517
41
+ qolsys_controller/database/table_nest_device.py,sha256=OCfzDq6nL-d1nf3_dwj5lD8JQzfvYsdGEUP-6bqYAww,741
42
+ qolsys_controller/database/table_output_rules.py,sha256=SShELzP_S_qWBxuImwNMSGQFG_euI5Go657IxyMiMDA,745
41
43
  qolsys_controller/database/table_partition.py,sha256=6aaTaQfYvlJG5BWSAdv_O6UkqjkSQGb6UWpAzS4UcL4,1047
44
+ qolsys_controller/database/table_pgm_outputs.py,sha256=R-bvCLj5Kcl88ySFyDE4vfzI9a6e5bpC4_viSfTIKII,741
42
45
  qolsys_controller/database/table_powerg_device.py,sha256=WEuFuak-OKnT7IbjvaZTP3fMZ67uD_W10tyo9nA7oGA,749
43
46
  qolsys_controller/database/table_qolsyssettings.py,sha256=GqMOmhZP5JBOQhzKWJnlQK2f2zMsganIG119D6DpCao,1054
44
47
  qolsys_controller/database/table_scene.py,sha256=zfiNXDJAxOwGAOmU6w5OvyflnP9bZhMc0eWVo2dZLJ4,1668
45
- qolsys_controller/database/table_sensor.py,sha256=EEhDe6YJB2PrGXfG-DzHrEIq54GBDuNZaVGyAf9g1Rg,4552
48
+ qolsys_controller/database/table_sensor.py,sha256=KKsNu1zFVNvyLF-2Y-2Dkwks-8EVbnYmtwFi2Xx1_rs,4637
49
+ qolsys_controller/database/table_shades.py,sha256=p7wH5p6hYlDWag0hQwM7VcwbcoaB1x9KjEWBrhkboqc,723
46
50
  qolsys_controller/database/table_smartsocket.py,sha256=J1jrAEHboasuedyJB8te9TO1zggNAZsq0VgnnyEdU8I,744
47
51
  qolsys_controller/database/table_state.py,sha256=AIV5JiOp5pqc55WnaWdLrsmRtTSppMSSnc5v4W2nA3k,1141
48
52
  qolsys_controller/database/table_tcc.py,sha256=AyrzdBFw0C9kL51iZJU9hmai1iKb8-q-yVY7j-3duEs,885
@@ -56,7 +60,7 @@ qolsys_controller/database/table_zwave_association_group.py,sha256=S_tWpfzzD44rJ
56
60
  qolsys_controller/database/table_zwave_history.py,sha256=4RiCzA_XFdXXVA9X48Z4eoxA_4DFKwdjkP2N6IHHOqQ,1897
57
61
  qolsys_controller/database/table_zwave_node.py,sha256=csESJCkcg8qAPn3KSL4jO9b1oymZ5wrQiXcmWR9vSc0,7302
58
62
  qolsys_controller/database/table_zwave_other.py,sha256=HJzLd4MUfNynE9jHiCzN7j1PFDncwQHeDkP5_8_s0YE,747
59
- qolsys_controller-0.0.11.dist-info/METADATA,sha256=urPoV9cUyWQFKD3x2INjsnhvYHy7h5xmKgIS2iQ5zNI,4175
60
- qolsys_controller-0.0.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
61
- qolsys_controller-0.0.11.dist-info/licenses/LICENSE,sha256=GBHv9eggdA5ablDMW1xiLzGDZ2gCIhcKGW__c2aVIOc,1069
62
- qolsys_controller-0.0.11.dist-info/RECORD,,
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,,