qolsys-controller 0.0.9__py3-none-any.whl → 0.0.12__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.
- qolsys_controller/database/db.py +13 -0
- qolsys_controller/database/table.py +16 -8
- qolsys_controller/database/table_master_slave.py +4 -2
- qolsys_controller/database/table_nest_device.py +27 -0
- qolsys_controller/database/table_output_rules.py +27 -0
- qolsys_controller/database/table_pgm_outputs.py +27 -0
- qolsys_controller/database/table_shades.py +27 -0
- {qolsys_controller-0.0.9.dist-info → qolsys_controller-0.0.12.dist-info}/METADATA +1 -1
- {qolsys_controller-0.0.9.dist-info → qolsys_controller-0.0.12.dist-info}/RECORD +11 -7
- {qolsys_controller-0.0.9.dist-info → qolsys_controller-0.0.12.dist-info}/WHEEL +0 -0
- {qolsys_controller-0.0.9.dist-info → qolsys_controller-0.0.12.dist-info}/licenses/LICENSE +0 -0
qolsys_controller/database/db.py
CHANGED
@@ -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:
|
@@ -68,7 +68,12 @@ class QolsysTable:
|
|
68
68
|
|
69
69
|
def update(self, selection: str, selection_argument: str, content_value: str) -> None:
|
70
70
|
# selection: 'zone_id=?, parition_id=?'
|
71
|
+
|
72
|
+
# Firmware 4.4.1 is sending contentValues as string
|
71
73
|
# selection_argument: '[3,1]'
|
74
|
+
# Firmware 4.6.1:
|
75
|
+
# selection_argument: ['cc:4b:73:86:5c:89']
|
76
|
+
|
72
77
|
# "contentValues":{"partition_id":"0","sensorgroup":"safetymotion","sensorstatus":"Idle"}"
|
73
78
|
|
74
79
|
# Panel is sending query parameter for db update in text string
|
@@ -80,8 +85,11 @@ class QolsysTable:
|
|
80
85
|
db_value = ",".join([f"{key}='{value}'" for key, value in content_value.items()])
|
81
86
|
|
82
87
|
# Selection Argument
|
83
|
-
selection_argument
|
84
|
-
selection_argument
|
88
|
+
# Panel send selection_argument as list in Firmware 4.6.1
|
89
|
+
if(type(selection_argument) is not list):
|
90
|
+
#Firmware 4.4.1, seletion_argument is sent as a string
|
91
|
+
selection_argument = selection_argument.strip("[]")
|
92
|
+
selection_argument = [item.strip() for item in selection_argument.split(",")]
|
85
93
|
|
86
94
|
try:
|
87
95
|
query = f"UPDATE {self.table} SET {db_value} WHERE {selection}"
|
@@ -108,12 +116,12 @@ class QolsysTable:
|
|
108
116
|
# selection: 'zone_id=?, parition_id=?'
|
109
117
|
# selection_argument: '[3,1]'
|
110
118
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
119
|
+
# Selection Argument
|
120
|
+
# Panel send selection_argument as list in Firmware 4.6.1
|
121
|
+
if(type(selection_argument) is not list):
|
122
|
+
#Firmware 4.4.1, seletion_argument is sent as a string
|
123
|
+
selection_argument = selection_argument.strip("[]")
|
124
|
+
selection_argument = [item.strip() for item in selection_argument.split(",")]
|
117
125
|
|
118
126
|
try:
|
119
127
|
query = f"DELETE FROM {self.table} WHERE {selection}"
|
@@ -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)
|
@@ -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)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qolsys-controller
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.12
|
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
|
@@ -23,8 +23,8 @@ 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=
|
27
|
-
qolsys_controller/database/table.py,sha256=
|
26
|
+
qolsys_controller/database/db.py,sha256=__VinfaSuMcFcPdU3XdhLP2yp4V_cetgv_engf9Q70I,14352
|
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
|
30
30
|
qolsys_controller/database/table_country_locale.py,sha256=CFy9UYAuIn7xDPjqVOQPm7sa6sLQpEu17lCr0fovnw8,2136
|
@@ -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=
|
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
48
|
qolsys_controller/database/table_sensor.py,sha256=EEhDe6YJB2PrGXfG-DzHrEIq54GBDuNZaVGyAf9g1Rg,4552
|
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.
|
60
|
-
qolsys_controller-0.0.
|
61
|
-
qolsys_controller-0.0.
|
62
|
-
qolsys_controller-0.0.
|
63
|
+
qolsys_controller-0.0.12.dist-info/METADATA,sha256=jh2Jwg9N3eZ1FbxN_PIHUQb_dtGF2fzY2EcHBm9A_w8,4175
|
64
|
+
qolsys_controller-0.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
65
|
+
qolsys_controller-0.0.12.dist-info/licenses/LICENSE,sha256=GBHv9eggdA5ablDMW1xiLzGDZ2gCIhcKGW__c2aVIOc,1069
|
66
|
+
qolsys_controller-0.0.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|