pyg90alarm 2.5.2__py3-none-any.whl → 2.6.0__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.
- pyg90alarm/__init__.py +3 -2
- pyg90alarm/local/host_info.py +34 -6
- pyg90alarm/local/net_config.py +15 -1
- {pyg90alarm-2.5.2.dist-info → pyg90alarm-2.6.0.dist-info}/METADATA +1 -1
- {pyg90alarm-2.5.2.dist-info → pyg90alarm-2.6.0.dist-info}/RECORD +8 -8
- {pyg90alarm-2.5.2.dist-info → pyg90alarm-2.6.0.dist-info}/WHEEL +1 -1
- {pyg90alarm-2.5.2.dist-info → pyg90alarm-2.6.0.dist-info}/licenses/LICENSE +0 -0
- {pyg90alarm-2.5.2.dist-info → pyg90alarm-2.6.0.dist-info}/top_level.txt +0 -0
pyg90alarm/__init__.py
CHANGED
|
@@ -33,7 +33,8 @@ from .entities.sensor import (
|
|
|
33
33
|
)
|
|
34
34
|
from .entities.device import G90Device
|
|
35
35
|
from .local.host_info import (
|
|
36
|
-
G90HostInfo, G90HostInfoWifiStatus, G90HostInfoGsmStatus
|
|
36
|
+
G90HostInfo, G90HostInfoWifiStatus, G90HostInfoGsmStatus,
|
|
37
|
+
G90HostInfoWifiSetupProgress,
|
|
37
38
|
)
|
|
38
39
|
from .definitions.sensors import (
|
|
39
40
|
G90SensorDefinitions
|
|
@@ -81,7 +82,7 @@ __all__ = [
|
|
|
81
82
|
'G90Device',
|
|
82
83
|
# Panel information and status
|
|
83
84
|
'G90HostInfo', 'G90HostInfoWifiStatus', 'G90HostInfoGsmStatus',
|
|
84
|
-
'G90HostStatus',
|
|
85
|
+
'G90HostStatus', 'G90HostInfoWifiSetupProgress',
|
|
85
86
|
# Types for alerts and notifications
|
|
86
87
|
'G90MessageTypes', 'G90NotificationTypes', 'G90ArmDisarmTypes',
|
|
87
88
|
'G90AlertTypes', 'G90AlertSources', 'G90AlertStates',
|
pyg90alarm/local/host_info.py
CHANGED
|
@@ -43,10 +43,23 @@ class G90HostInfoWifiStatus(IntEnum):
|
|
|
43
43
|
"""
|
|
44
44
|
POWERED_OFF = 0
|
|
45
45
|
NOT_CONNECTED = 1
|
|
46
|
-
|
|
46
|
+
SERVER_NOT_CONNECTED = 2
|
|
47
47
|
OPERATIONAL = 3
|
|
48
48
|
|
|
49
49
|
|
|
50
|
+
class G90HostInfoWifiSetupProgress(IntEnum):
|
|
51
|
+
"""
|
|
52
|
+
Defines possible values of Wifi connection progress.
|
|
53
|
+
"""
|
|
54
|
+
IDLE = 0
|
|
55
|
+
CONNECTING = 1
|
|
56
|
+
OK = 2
|
|
57
|
+
WRONG_SSID = 3
|
|
58
|
+
WRONG_PASSWORD = 4
|
|
59
|
+
CONNECTION_ERROR = 5
|
|
60
|
+
WIFI_ERROR = 6
|
|
61
|
+
|
|
62
|
+
|
|
50
63
|
@dataclass
|
|
51
64
|
class G90HostInfo: # pylint: disable=too-many-instance-attributes
|
|
52
65
|
"""
|
|
@@ -60,11 +73,11 @@ class G90HostInfo: # pylint: disable=too-many-instance-attributes
|
|
|
60
73
|
wifi_hw_version: str
|
|
61
74
|
gsm_status_data: int
|
|
62
75
|
wifi_status_data: int
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
gsm_signal_level: int
|
|
67
|
-
wifi_signal_level: int
|
|
76
|
+
gprs_3g_active_data: int
|
|
77
|
+
wifi_setup_progress_data: int
|
|
78
|
+
battery_voltage: str # in mV
|
|
79
|
+
gsm_signal_level: int # percentage 0-100
|
|
80
|
+
wifi_signal_level: int # percentage 0-100
|
|
68
81
|
|
|
69
82
|
@property
|
|
70
83
|
def gsm_status(self) -> G90HostInfoGsmStatus:
|
|
@@ -82,6 +95,21 @@ class G90HostInfo: # pylint: disable=too-many-instance-attributes
|
|
|
82
95
|
"""
|
|
83
96
|
return G90HostInfoWifiStatus(self.wifi_status_data)
|
|
84
97
|
|
|
98
|
+
@property
|
|
99
|
+
def wifi_setup_progress(self) -> G90HostInfoWifiSetupProgress:
|
|
100
|
+
"""
|
|
101
|
+
Translates the Wifi connection progress received from the device into
|
|
102
|
+
corresponding enum.
|
|
103
|
+
"""
|
|
104
|
+
return G90HostInfoWifiSetupProgress(self.wifi_setup_progress_data)
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def gprs_3g_active(self) -> bool:
|
|
108
|
+
"""
|
|
109
|
+
Indicates whether GPRS/3G is enabled.
|
|
110
|
+
"""
|
|
111
|
+
return bool(self.gprs_3g_active_data)
|
|
112
|
+
|
|
85
113
|
def _asdict(self) -> Dict[str, Any]:
|
|
86
114
|
"""
|
|
87
115
|
Returns the host information as dictionary.
|
pyg90alarm/local/net_config.py
CHANGED
|
@@ -132,8 +132,22 @@ class G90NetConfig(DataclassLoadSave):
|
|
|
132
132
|
def apn_auth(self) -> G90APNAuth:
|
|
133
133
|
"""
|
|
134
134
|
Returns the APN authentication method as an enum.
|
|
135
|
+
|
|
136
|
+
Some panels might send values outside of the defined enum range,
|
|
137
|
+
presumably when SIM card is absent. In such cases, returns
|
|
138
|
+
`G90APNAuth.NONE`.
|
|
139
|
+
|
|
140
|
+
No attempt is made to correct the invalid value in the underlying
|
|
141
|
+
data field, since the panel is trusted - unless the value is modified
|
|
142
|
+
and saved back to the device.
|
|
143
|
+
|
|
144
|
+
:return: APN authentication method, or G90APNAuth.NONE if the received
|
|
145
|
+
value is invalid.
|
|
135
146
|
"""
|
|
136
|
-
|
|
147
|
+
try:
|
|
148
|
+
return G90APNAuth(self._apn_auth)
|
|
149
|
+
except ValueError:
|
|
150
|
+
return G90APNAuth.NONE
|
|
137
151
|
|
|
138
152
|
@apn_auth.setter
|
|
139
153
|
def apn_auth(self, value: G90APNAuth) -> None:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyg90alarm/__init__.py,sha256=
|
|
1
|
+
pyg90alarm/__init__.py,sha256=Z1Y5bwYmtY5iycIv6IDQ464o4Q-sU7fo9S3f94NGOpg,3786
|
|
2
2
|
pyg90alarm/alarm.py,sha256=BDBVQ8qRa2Bx2-786uytShTw8znlFEWakxweCGvgxME,50130
|
|
3
3
|
pyg90alarm/callback.py,sha256=9PVtjRs2MLn80AgiM-UJNL8ZJF4_PxcopJIpxMmB3vc,4707
|
|
4
4
|
pyg90alarm/const.py,sha256=cpaMlb8rqE1EfvmUEh3Yd_29dNO0usIo_Y-esPBh8B0,8012
|
|
@@ -32,9 +32,9 @@ pyg90alarm/local/config.py,sha256=QYetAc6QLrAN8T-37D4Esifvao52w_uJ01nHciLbGME,13
|
|
|
32
32
|
pyg90alarm/local/discovery.py,sha256=8YVIXuNe57lhas0VSRf7QXZH83pEDGNj9oehNY4Kh2U,3576
|
|
33
33
|
pyg90alarm/local/history.py,sha256=sL6_Z1BNYkuUwAZUi78d4p5hhcCfsXKw29i4Qu1O60M,10811
|
|
34
34
|
pyg90alarm/local/host_config.py,sha256=RSvg2UXPTCzzwDW6Iz3CyFtjxPUzSSdlxRMqGpWA61M,7445
|
|
35
|
-
pyg90alarm/local/host_info.py,sha256=
|
|
35
|
+
pyg90alarm/local/host_info.py,sha256=gdneg2XxxMNSFfNTjXCqsBsLZgZr_wg38sudKJ24RD8,3550
|
|
36
36
|
pyg90alarm/local/host_status.py,sha256=WHGtw-A0wHILqVWP4DnZhXj8DPRGyS26AV0bL1isTz4,1863
|
|
37
|
-
pyg90alarm/local/net_config.py,sha256=
|
|
37
|
+
pyg90alarm/local/net_config.py,sha256=Y4-SUVSukk-h5x3LK-HH3IlM72dP_46nj1H8lN9rTfo,5998
|
|
38
38
|
pyg90alarm/local/notifications.py,sha256=Vs6NQJciYqDALV-WwzH6wIcTGdX_UD4XBuHWjSOpCDY,4591
|
|
39
39
|
pyg90alarm/local/paginated_cmd.py,sha256=5pPVP8f4ydjgu8Yq6MwqINJAUt52fFlD17wO4AI88Pc,4467
|
|
40
40
|
pyg90alarm/local/paginated_result.py,sha256=p_e8QAVznp1Q5Xi9ifjb9Bx-S3ZiAkVlPKrY6r0bYLs,5483
|
|
@@ -43,8 +43,8 @@ pyg90alarm/local/user_data_crc.py,sha256=JQBOPY3RlOgVtvR55R-rM8OuKjYW-BPXQ0W4pi6
|
|
|
43
43
|
pyg90alarm/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
pyg90alarm/notifications/base.py,sha256=d3N_zNPa_jcTX4QpA78jdgMHDhmrgwqyM3HdvuO14Jk,16682
|
|
45
45
|
pyg90alarm/notifications/protocol.py,sha256=TlZQ3P8-N-E2X5bzkGefz432x4lBYyIBF9VriwYn9ds,4790
|
|
46
|
-
pyg90alarm-2.
|
|
47
|
-
pyg90alarm-2.
|
|
48
|
-
pyg90alarm-2.
|
|
49
|
-
pyg90alarm-2.
|
|
50
|
-
pyg90alarm-2.
|
|
46
|
+
pyg90alarm-2.6.0.dist-info/licenses/LICENSE,sha256=f884inRbeNv-O-hbwz62Ro_1J8xiHRTnJ2cCx6A0WvU,1070
|
|
47
|
+
pyg90alarm-2.6.0.dist-info/METADATA,sha256=VDotWAaE433s73_xrvXL1dpHDBG2T9o10-UuASDBvRs,12568
|
|
48
|
+
pyg90alarm-2.6.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
49
|
+
pyg90alarm-2.6.0.dist-info/top_level.txt,sha256=czHiGxYMyTk5QEDTDb0EpPiKqUMRa8zI4zx58Ii409M,11
|
|
50
|
+
pyg90alarm-2.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|