pyg90alarm.local.discovery
Discovers G90 alarm panels.
Classes
|
Represents discovered alarm panel. |
|
Discovers alarm panels. |
- class pyg90alarm.local.discovery.G90DiscoveredDevice(host_guid, product_name, wifi_protocol_version, cloud_protocol_version, mcu_hw_version, wifi_hw_version, gsm_status_data, wifi_status_data, gprs_3g_active_data, wifi_setup_progress_data, battery_voltage, gsm_signal_level, wifi_signal_level, host, port, guid)
Bases:
G90HostInfoRepresents discovered alarm panel.
- property gsm_status: G90HostInfoGsmStatus
Translates the GSM module status received from the device into corresponding enum.
- property wifi_setup_progress: G90HostInfoWifiSetupProgress
Translates the Wifi connection progress received from the device into corresponding enum.
- property wifi_status: G90HostInfoWifiStatus
Translates the Wifi module status received from the device into corresponding enum.
- class pyg90alarm.local.discovery.G90Discovery(timeout=10, **kwargs)
Bases:
G90BaseCommandDiscovers alarm panels.
- async process()
Initiates device discovery.
- Return type:
- property devices: List[G90DiscoveredDevice]
The list of discovered devices.
- pause_writing()
Called when the transport’s buffer goes over the high-water mark.
Pause and resume calls are paired – pause_writing() is called once when the buffer goes strictly over the high-water mark (even if subsequent writes increases the buffer size even more), and eventually resume_writing() is called once when the buffer size reaches the low-water mark.
Note that if the buffer size equals the high-water mark, pause_writing() is not called – it must go strictly over. Conversely, resume_writing() is called when the buffer size is equal or lower than the low-water mark. These end conditions are important to ensure that things go as expected when either mark is zero.
NOTE: This is the only Protocol callback that is not called through EventLoop.call_soon() – if it were, it would have no effect when it’s most needed (when the app keeps writing without yielding until pause_writing() is called).
- resume_writing()
Called when the transport’s buffer drains below the low-water mark.
See pause_writing() for details.