pyg90alarm 2.5.3__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 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',
@@ -43,10 +43,23 @@ class G90HostInfoWifiStatus(IntEnum):
43
43
  """
44
44
  POWERED_OFF = 0
45
45
  NOT_CONNECTED = 1
46
- NO_SIGNAL = 2
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
- reserved1: int
64
- reserved2: int
65
- band_frequency: str
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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyg90alarm
3
- Version: 2.5.3
3
+ Version: 2.6.0
4
4
  Summary: G90 Alarm system protocol
5
5
  Home-page: https://github.com/hostcc/pyg90alarm
6
6
  Author: Ilia Sotnikov
@@ -1,4 +1,4 @@
1
- pyg90alarm/__init__.py,sha256=ehUcPV8O2jBszU3hPAfI91nXjj2UXIfYjoREvL4QE2c,3719
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,7 +32,7 @@ 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=4lFIaFEpYd3EvgNrDJmKijTrzX9i29nFISLLlXGnkmE,2759
35
+ pyg90alarm/local/host_info.py,sha256=gdneg2XxxMNSFfNTjXCqsBsLZgZr_wg38sudKJ24RD8,3550
36
36
  pyg90alarm/local/host_status.py,sha256=WHGtw-A0wHILqVWP4DnZhXj8DPRGyS26AV0bL1isTz4,1863
37
37
  pyg90alarm/local/net_config.py,sha256=Y4-SUVSukk-h5x3LK-HH3IlM72dP_46nj1H8lN9rTfo,5998
38
38
  pyg90alarm/local/notifications.py,sha256=Vs6NQJciYqDALV-WwzH6wIcTGdX_UD4XBuHWjSOpCDY,4591
@@ -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.5.3.dist-info/licenses/LICENSE,sha256=f884inRbeNv-O-hbwz62Ro_1J8xiHRTnJ2cCx6A0WvU,1070
47
- pyg90alarm-2.5.3.dist-info/METADATA,sha256=HLrqjT7wB9IQvmuGlmX7NkJo0nijovzOjaRWlm78ong,12568
48
- pyg90alarm-2.5.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
49
- pyg90alarm-2.5.3.dist-info/top_level.txt,sha256=czHiGxYMyTk5QEDTDb0EpPiKqUMRa8zI4zx58Ii409M,11
50
- pyg90alarm-2.5.3.dist-info/RECORD,,
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,,