bluetooth#

class platypush.message.event.bluetooth.BluetoothConnectionFailedEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Event triggered when a Bluetooth connection fails.

class platypush.message.event.bluetooth.BluetoothDeviceConnectedEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Event triggered when a Bluetooth device is connected.

class platypush.message.event.bluetooth.BluetoothDeviceDisconnectedEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Event triggered when a Bluetooth device is disconnected.

class platypush.message.event.bluetooth.BluetoothDeviceEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothEvent

Base class for Bluetooth device events.

__init__(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#
Parameters:
  • address – The Bluetooth address of the device.

  • connected – Whether the device is connected.

  • name – The name of the device.

  • rssi – Received Signal Strength Indicator.

  • tx_power – Transmission power.

  • manufacturers – The manufacturers published by the device, as a manufacturer_id -> registered_name map.

  • services – The services published by the device.

classmethod from_device(device: BluetoothDevice, **kwargs) BluetoothDeviceEvent[source]#

Initialize a Bluetooth event from the parameters of a device.

Parameters:

device – Bluetooth device.

class platypush.message.event.bluetooth.BluetoothDeviceFoundEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Event triggered when a Bluetooth device is discovered during a scan.

class platypush.message.event.bluetooth.BluetoothDeviceLostEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Event triggered when a previously discovered Bluetooth device is lost.

class platypush.message.event.bluetooth.BluetoothDeviceSignalUpdateEvent(*args, address: str, connected: bool, name: str | None = None, rssi: int | None = None, tx_power: int | None = None, manufacturer: str | None = None, services: Iterable[dict] | None = None, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Event triggered when the RSSI/TX power of a Bluetooth device is updated.

class platypush.message.event.bluetooth.BluetoothEvent(target=None, origin=None, id=None, timestamp=None, logging_level=20, disable_web_clients_notification=False, **kwargs)[source]#

Bases: Event

Base class for Bluetooth events.

class platypush.message.event.bluetooth.BluetoothFileEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothDeviceEvent

Base class for Bluetooth file events.

__init__(*args, file: str, **kwargs)[source]#
Parameters:
  • address – The Bluetooth address of the device.

  • connected – Whether the device is connected.

  • name – The name of the device.

  • rssi – Received Signal Strength Indicator.

  • tx_power – Transmission power.

  • manufacturers – The manufacturers published by the device, as a manufacturer_id -> registered_name map.

  • services – The services published by the device.

class platypush.message.event.bluetooth.BluetoothFileGetRequestEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothFileEvent

Event triggered when a file get request is received.

class platypush.message.event.bluetooth.BluetoothFilePutRequestEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothFileEvent

Event triggered when a file put request is received.

class platypush.message.event.bluetooth.BluetoothFileReceivedEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothFileEvent

Event triggered when a file download is completed.

class platypush.message.event.bluetooth.BluetoothFileSentEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothFileEvent

Event triggered when a file upload is completed.

class platypush.message.event.bluetooth.BluetoothFileTransferCancelledEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothFileEvent

Event triggered when a file transfer is cancelled.

class platypush.message.event.bluetooth.BluetoothFileTransferStartedEvent(*args, file: str, **kwargs)[source]#

Bases: BluetoothFileEvent

Event triggered when a file transfer is initiated.

class platypush.message.event.bluetooth.BluetoothScanPausedEvent(*args, duration: float | None = None, **kwargs)[source]#

Bases: BluetoothEvent

Event triggered when the Bluetooth scan is paused.

__init__(*args, duration: float | None = None, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event

class platypush.message.event.bluetooth.BluetoothScanResumedEvent(*args, duration: float | None = None, **kwargs)[source]#

Bases: BluetoothEvent

Event triggered when the Bluetooth scan is resumed.

__init__(*args, duration: float | None = None, **kwargs)[source]#
Parameters:
  • target (str) – Target node

  • origin (str) – Origin node (default: current node)

  • id (str) – Event ID (default: auto-generated)

  • timestamp (float) – Event timestamp (default: current time)

  • logging_level – Logging level for this event (default: logging.INFO)

  • disable_web_clients_notification – Don’t send a notification of this event to the websocket clients

  • kwargs – Additional arguments for the event