pyg90alarm.local.targeted_discovery

Discovers G90 alarm panel devices with specific ID.

Classes

G90DiscoveredDeviceTargeted(message, ...)

Discovered device with specific ID.

G90TargetedDiscovery(device_id, **kwargs)

Discovers alarm panel devices with specific ID.

G90TargetedDiscoveryInfo(message, ...)

Wire representation of the information about discovered device.

class pyg90alarm.local.targeted_discovery.G90TargetedDiscoveryInfo(message, product_name, wifi_protocol_version, cloud_protocol_version, mcu_hw_version, fw_version, gsm_status, wifi_status, server_status, reserved1, reserved2, gsm_signal_level, wifi_signal_level)

Bases: object

Wire representation of the information about discovered device.

class pyg90alarm.local.targeted_discovery.G90DiscoveredDeviceTargeted(message, product_name, wifi_protocol_version, cloud_protocol_version, mcu_hw_version, fw_version, gsm_status, wifi_status, server_status, reserved1, reserved2, gsm_signal_level, wifi_signal_level, host, port, guid)

Bases: G90TargetedDiscoveryInfo

Discovered device with specific ID.

class pyg90alarm.local.targeted_discovery.G90TargetedDiscovery(device_id, **kwargs)

Bases: G90BaseCommand

Discovers alarm panel devices with specific ID.

connection_made(transport)

Invoked when connection is established.

Return type:

None

connection_lost(exc)

Invoked when connection is lost.

Return type:

None

datagram_received(data, addr)

Invoked when datagram is received.

Return type:

None

error_received(exc)

Invoked when error is received.

Return type:

None

to_wire()

Converts the command to wire representation.

Return type:

bytes

async process()

Initiates the device discovery process.

Return type:

G90TargetedDiscovery

property devices: List[G90DiscoveredDeviceTargeted]

The list of discovered devices.

add_device(value)

Adds discovered device to the list.

Return type:

None

decode_data(payload)

Decodes the command data from JSON string.

Return type:

List[Any]

encode_data(data)

Encodes the command data to JSON string.

Return type:

str

property expects_response: bool

Indicates whether the command expects a response.

from_wire(data)

Parses the response from the alarm panel.

Return type:

List[Any]

property host: str

The hostname/IP address of the alarm panel.

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).

property port: int

The port of the alarm panel.

property result: List[Any]

The result of the command.

resume_writing()

Called when the transport’s buffer drains below the low-water mark.

See pause_writing() for details.