API Reference

This section is a reference for the Open GoPro Python Package API. The BLE / Wifi API’s that this package implements can be found in the Open GoPro documentation linked from package summary

Note

Not everything is exposed here. This section should only consist of the interface information that a user (not a developer) of the Open GoPro module should care about.

For a higher-level summary / usage, see the usage section

Warning

This documentation is not a substitute for the Open GoPro BLE and WiFi specifications. That is, this interface shows how to use the various commands but is not an exhaustive source of information for what each command does. The Open GoPro specs should be used simultaneously with this document for development.

GoPro Client

There are two top-level GoPro client interfaces - Wireless and Wired:

Wireless

from open_gopro import WirelessGoPro
Inheritance diagram of open_gopro.gopro_wireless.WirelessGoPro
class WirelessGoPro(target: Pattern | None = None, wifi_interface: str | None = None, sudo_password: str | None = None, enable_wifi: bool = True, **kwargs: Any)

The top-level BLE and Wifi interface to a Wireless GoPro device.

See the Open GoPro SDK for complete documentation.

This will handle, for BLE:

  • discovering target GoPro device

  • establishing the connection

  • discovering GATT characteristics

  • enabling notifications

  • discovering Open GoPro version

  • setting the date, time, timezone, and DST

  • transferring data

This will handle, for Wifi:

  • finding SSID and password

  • establishing Wifi connection

  • transferring data

It will also do some synchronization, etc:

  • ensuring camera is ready / not encoding before transferring data

  • sending keep alive signal periodically

If no target arg is passed in, the first discovered BLE GoPro device will be connected to.

It can be used via context manager:

>>> async with WirelessGoPro() as gopro:
>>>     # Send some messages now

Or without:

>>> gopro = WirelessGoPro()
>>> await gopro.open()
>>> # Send some messages now
WRITE_TIMEOUT

BLE Write Timeout. Not configurable.

Type:

Final[int]

Parameters:
  • target (Pattern | None) – A regex to search for the target GoPro’s name. For example, “GoPro 0456”). Defaults to None (i.e. connect to first discovered GoPro)

  • wifi_interface (str | None) – Set to specify the wifi interface the local machine will use to connect to the GoPro. If None (or not set), first discovered interface will be used.

  • sudo_password (str | None) – User password for sudo. If not passed, you will be prompted if a password is needed which should only happen on Nix systems.

  • enable_wifi (bool) – Optionally do not enable Wifi if set to False. Defaults to True.

  • **kwargs (Any) – additional parameters for internal use / testing

Raises:

InterfaceConfigFailure – In order to communicate via Wifi, there must be an available Wifi Interface. By default during initialization, the Wifi driver will attempt to automatically discover such an interface. If it does not find any, it will raise this exception. Note that the interface can also be specified manually with the ‘wifi_interface’ argument.

property ble_command: BleCommands

Used to call the BLE commands

Returns:

the commands

Return type:

BleCommands

property ble_setting: BleSettings

Used to access the BLE settings

Returns:

the settings

Return type:

BleSettings

property ble_status: BleStatuses

Used to access the BLE statuses

Returns:

the statuses

Return type:

BleStatuses

async close() None

Safely stop the GoPro instance.

This will disconnect BLE and WiFI if applicable.

If not using the context manager, it is mandatory to call this before exiting the program in order to prevent reconnection issues because the OS has never disconnected from the previous session.

async configure_cohn(timeout: int = 60) bool

Prepare Camera on the Home Network

Provision if not provisioned Then wait for COHN to be connected and ready

Parameters:

timeout (int) – time in seconds to wait for COHN to be ready. Defaults to 60.

Returns:

True if success, False otherwise

Return type:

bool

async connect_to_access_point(ssid: str, password: str) bool

Connect the camera to a Wifi Access Point

Parameters:
  • ssid (str) – SSID of AP

  • password (str) – password of AP

Returns:

True if AP is currently connected, False otherwise

Return type:

bool

property http_command: HttpCommands

Used to access the Wifi commands

Returns:

the commands

Return type:

HttpCommands

property http_setting: HttpSettings

Used to access the Wifi settings

Returns:

the settings

Return type:

HttpSettings

property identifier: str

Get a unique identifier for this instance.

The identifier is the last 4 digits of the camera. That is, the same string that is used to scan for the camera for BLE.

If no target has been provided and a camera is not yet found, this will be None

Raises:

GoProNotOpened – Client is not opened yet so no identifier is available

Returns:

last 4 digits if available, else None

Return type:

str

property is_ble_connected: bool

Are we connected via BLE to the GoPro device?

Returns:

True if yes, False if no

Return type:

bool

property is_cohn_provisioned: bool

Is COHN currently provisioned?

Get the current COHN status from the camera

Returns:

True if COHN is provisioned, False otherwise

Return type:

bool

property is_http_connected: bool

Are we connected via HTTP to the GoPro device?

Returns:

True if yes, False if no

Return type:

bool

property is_open: bool

Is this client ready for communication?

Returns:

True if yes, False if no

Return type:

bool

property is_ready: bool

Is gopro ready to receive commands

Returns:

yes if ready, no otherwise

Return type:

bool

async keep_alive() bool

Send a heartbeat to prevent the BLE connection from dropping.

This is sent automatically by the GoPro instance if its maintain_ble argument is not False.

Returns:

True if it succeeded,. False otherwise

Return type:

bool

async open(timeout: int = 15, retries: int = 5) None

Perform all initialization commands for ble and wifi

For BLE: scan and find device, establish connection, discover characteristics, configure queries start maintenance, and get Open GoPro version..

For Wifi: discover SSID and password, enable and connect. Or disable if not using.

Raises:
Parameters:
  • timeout (int) – How long to wait for each connection before timing out. Defaults to 10.

  • retries (int) – How many connection attempts before considering connection failed. Defaults to 5.

property password: str | None

Get the GoPro AP’s password

Returns:

password or None if it is not known

Return type:

str | None

register_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]], update: SettingId | StatusId | ActionId) None

Register for callbacks when an update occurs

Parameters:
  • callback (UpdateCb) – callback to be notified in

  • update (UpdateType) – update to register for

property ssid: str | None

Get the GoPro AP’s WiFi SSID

Returns:

SSID or None if it is not known

Return type:

str | None

unregister_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]], update: SettingId | StatusId | ActionId | None = None) None

Unregister for asynchronous update(s)

Parameters:
  • callback (UpdateCb) – callback to stop receiving update(s) on

  • update (UpdateType | None) – updates to unsubscribe for. Defaults to None (all updates that use this callback will be unsubscribed).

property version: str

The API version that the connected camera supports

Only 2.0 is currently supported

Returns:

supported version

Return type:

str

Wired

from open_gopro import WiredGoPro
Inheritance diagram of open_gopro.gopro_wired.WiredGoPro
class WiredGoPro(serial: str | None = None, **kwargs: Any)

The top-level USB interface to a Wired GoPro device.

See the Open GoPro SDK for complete documentation.

If a serial number is not passed when instantiating, the mDNS server will be queried to find a connected GoPro.

This class also handles:
  • ensuring camera is ready / not encoding before transferring data

It can be used via context manager:

>>> async with WiredGoPro() as gopro:
>>>     # Send some messages now

Or without:

>>> gopro = WiredGoPro()
>>> await gopro.open()
>>> # Send some messages now
Parameters:
  • serial (str | None) – (at least) last 3 digits of GoPro Serial number. If not set, first GoPro discovered from mDNS will be used. Defaults to None

  • **kwargs (Any) – additional keyword arguments to pass to base class

property ble_command: BleCommands

Used to call the BLE commands

Raises:

NotImplementedError – Not valid for WiredGoPro

property ble_setting: BleSettings

Used to access the BLE settings

Raises:

NotImplementedError – Not valid for WiredGoPro

property ble_status: BleStatuses

Used to access the BLE statuses

Raises:

NotImplementedError – Not valid for WiredGoPro

async close() None

Gracefully close the GoPro Client connection

async configure_cohn(timeout: int = 60) bool

Prepare Camera on the Home Network

Provision if not provisioned Then wait for COHN to be connected and ready

Parameters:

timeout (int) – time in seconds to wait for COHN to be ready. Defaults to 60.

Returns:

True if success, False otherwise

Return type:

bool

Raises:

NotImplementedError – not yet possible

property http_command: HttpCommands

Used to access the USB commands

Returns:

the commands

Return type:

HttpCommands

property http_setting: HttpSettings

Used to access the USB settings

Returns:

the settings

Return type:

HttpSettings

property identifier: str

Unique identifier for the connected GoPro Client

Raises:

GoProNotOpened – serial was not passed to instantiation and IP has not yet been discovered

Returns:

identifier

Return type:

str

property is_ble_connected: bool

Are we connected via BLE to the GoPro device?

Returns:

True if yes, False if no

Return type:

bool

property is_cohn_provisioned: bool

Is COHN currently provisioned?

Get the current COHN status from the camera

Returns:

True if COHN is provisioned, False otherwise

Return type:

bool

Raises:

NotImplementedError – not yet possible

property is_http_connected: bool

Are we connected via Wifi to the GoPro device?

Returns:

True if yes, False if no

Return type:

bool

property is_open: bool

Is this client ready for communication?

Returns:

True if yes, False if no

Return type:

bool

property is_ready: bool

Is gopro ready to receive commands

Returns:

yes if ready, no otherwise

Return type:

bool

async open(timeout: int = 10, retries: int = 1) None

Connect to the Wired GoPro Client and prepare it for communication

Parameters:
  • timeout (int) – time (in seconds) before considering connection a failure. Defaults to 10.

  • retries (int) – number of connection retries. Defaults to 1.

Raises:
register_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]], update: SettingId | StatusId | ActionId) None

Register for callbacks when an update occurs

Parameters:
  • callback (UpdateCb) – callback to be notified in

  • update (UpdateType) – update to register for

Raises:

NotImplementedError – not yet possible

unregister_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]], update: SettingId | StatusId | ActionId | None = None) None

Unregister for asynchronous update(s)

Parameters:
  • callback (UpdateCb) – callback to stop receiving update(s) on

  • update (UpdateType | None) – updates to unsubscribe for. Defaults to None (all updates that use this callback will be unsubscribed).

Raises:

NotImplementedError – not yet possible

property version: str

The Open GoPro API version of the GoPro Client

Only Version 2.0 is currently supported.

Returns:

string version

Return type:

str

Open GoPro API

These are both the base types that are used to implement the API (BLE Setting, Ble Status, etc.) and the version-specific API’s themselves.

These should not be imported directly and instead should be accessed using the relevant properties (ble_command, wifi_setting, etc.) of a GoPro(open_gopro.gopro_base.GoProBase) instance.

class BleCommands(communicator: CommunicatorType)

Bases: BleMessages[BleMessage]

All of the BLE commands.

To be used as a delegate for a GoProBle instance to build commands

async cohn_clear_certificate() GoProResp[None]

Clear the current SSL certificate on the camera that is used for COHN

Returns:

was the clear successful?

Return type:

GoProResp[None]

async cohn_create_certificate(*, override: bool = False) GoProResp[None]

Create an SSL certificate on the camera to use for COHN

Parameters:

override (bool) – Should the current cert be overwritten?. Defaults to True.

Returns:

certificate creation status

Return type:

GoProResp[None]

async cohn_get_certificate() GoProResp[ResponseCOHNCert]

Get the current SSL certificate that the camera is using for COHN.

Returns:

the certificate

Return type:

GoProResp[proto.ResponseCOHNCert]

async cohn_get_status(*, register: bool) GoProResp[NotifyCOHNStatus]

Get (and optionally register for) the current COHN status

Parameters:

register (bool) – whether or not to register

Returns:

current COHN status

Return type:

GoProResp[proto.NotifyCOHNStatus]

async cohn_set_setting(*, mode: Toggle) GoProResp[None]

Set a COHN specific setting.

Parameters:

mode (constants.Toggle) – should camera auto connect to home network?

Returns:

status of set

Return type:

GoProResp[None]

async custom_preset_update(icon_id: int | None = None, title: str | int | None = None) GoProResp[ResponseGeneric]

Update a custom preset title and / or icon

Parameters:
  • icon_id (proto.EnumPresetIcon.ValueType | None) – Icon ID. Defaults to None.

  • title (str | proto.EnumPresetTitle.ValueType | None) – Custom Preset name or Factory Title ID. Defaults to None.

Raises:
  • ValueError – Did not set a parameter

  • TypeError – Title was not proto.EnumPresetTitle.ValueType or string

Returns:

status of preset update

Return type:

GoProResp[proto.ResponseGeneric]

async enable_wifi_ap(*, enable: bool) GoProResp[None]

Enable / disable the Wi-Fi Access Point.

Parameters:

enable (bool) – True to enable, False to disable

Returns:

response as JSON

Return type:

GoProResp[None]

async get_ap_entries(*, scan_id: int, start_index: int = 0, max_entries: int = 100) GoProResp[ResponseGetApEntries]

Get the results of a scan for wifi networks

Parameters:
  • scan_id (int) – ID corresponding to a set of scan results

  • start_index (int) – Used for paging. 0 <= start_index < NotifStartScanning.total_entries. Defaults to 0.

  • max_entries (int) – Used for paging. Value must be < NotifStartScanning.total_entries. Defaults to 100.

Returns:

result of scan with entries for WiFi networks

Return type:

GoProResp[proto.ResponseGetApEntries]

async get_camera_capabilities() GoProResp[dict[SettingId | StatusId, Any]]

Get the current capabilities of each camera setting

Returns:

response as JSON

Return type:

GoProResp[CameraState]

async get_camera_settings() GoProResp[dict[SettingId | StatusId, Any]]

Get all of the camera’s settings

Returns:

response as JSON

Return type:

GoProResp[CameraState]

async get_camera_statuses() GoProResp[dict[SettingId | StatusId, Any]]

Get all of the camera’s statuses

Returns:

response as JSON

Return type:

GoProResp[CameraState]

async get_date_time() GoProResp[datetime]

Get the camera’s date and time (non timezone / DST version)

Returns:

response as JSON

Return type:

GoProResp[datetime.datetime]

async get_date_time_tz_dst() GoProResp[TzDstDateTime]

Get the camera’s date and time with timezone / DST

Returns:

response as JSON

Return type:

GoProResp[TzDstDateTime]

async get_hardware_info() GoProResp[CameraInfo]

Get the model number, board, type, firmware version, serial number, and AP info

Returns:

response as JSON

Return type:

GoProResp[CameraInfo]

async get_last_captured_media() GoProResp[ResponseLastCapturedMedia]

Get the last captured media file

Returns:

status of request and last captured file if successful

Return type:

GoProResp[proto.ResponseLastCapturedMedia]

async get_open_gopro_api_version() GoProResp[str]

Get Open GoPro API Version

Returns:

response as JSON

Return type:

GoProResp[str]

async get_preset_status(*, register: list[int] | None = None, unregister: list[int] | None = None) GoProResp[NotifyPresetStatus]

Get information about what Preset Groups and Presets the camera supports in its current state

Also optionally (un)register for preset / group preset modified notifications which will be sent asynchronously as open_gopro.constants.constants.ActionId.PRESET_MODIFIED_NOTIFICATION

Parameters:
  • register (list[proto.EnumRegisterPresetStatus.ValueType] | None) – Types of preset modified updates to register for. Defaults to None.

  • unregister (list[proto.EnumRegisterPresetStatus.ValueType] | None) – Types of preset modified updates to unregister for. Defaults to None.

Returns:

JSON data describing all currently available presets

Return type:

GoProResp[proto.NotifyPresetStatus]

async get_wifi_password() GoProResp[str]

Get the Wifi password.

Returns:

command status and password

Return type:

GoProResp[str]

async get_wifi_ssid() GoProResp[str]

Get the Wifi SSID.

Returns:

command status and SSID

Return type:

GoProResp[str]

async load_preset(*, preset: int) GoProResp[None]

Load a Preset

The integer preset value can be found from the get_preset_status command

Parameters:

preset (int) – preset ID to load

Returns:

command status

Return type:

GoProResp[None]

async load_preset_group(*, group: int) GoProResp[None]

Load a Preset Group.

Once complete, the most recently used preset in this group will be active.

Parameters:

group (proto.EnumPresetGroup.ValueType) – preset group to load

Returns:

response as JSON

Return type:

GoProResp[None]

async power_down() GoProResp[None]

Power Down the camera

Returns:

status of command

Return type:

GoProResp[None]

async register_for_all_capabilities(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Register push notifications for all capabilities

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

command status and current value of all capabilities

Return type:

GoProResp[None]

async register_for_all_settings(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Register push notifications for all settings

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

command status and current value of all settings

Return type:

GoProResp[None]

async register_for_all_statuses(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Register push notifications for all statuses

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

command status and current value of all statuses

Return type:

GoProResp[None]

async register_livestream_status(*, register: list[int] | None = None, unregister: list[int] | None = None) GoProResp[NotifyLiveStreamStatus]

Register / unregister to receive asynchronous livestream statuses

Parameters:
  • register (list[proto.EnumRegisterLiveStreamStatus.ValueType] | None) – Statuses to register for. Defaults to None (don’t register for any).

  • unregister (list[proto.EnumRegisterLiveStreamStatus.ValueType] | None) – Statuses to unregister for. Defaults to None (don’t unregister for any).

Returns:

current livestream status

Return type:

GoProResp[proto.NotifyLiveStreamStatus]

async release_network() GoProResp[None]

Disconnect the camera Wifi network in STA mode so that it returns to AP mode.

Returns:

status of release request

Return type:

GoProResp[None]

async request_wifi_connect(*, ssid: str) GoProResp[ResponseConnect]

Request the camera to connect to a WiFi network that is already provisioned.

Updates will be sent as open_gopro.constants.constants.ActionId.NOTIF_PROVIS_STATE

Parameters:

ssid (str) – SSID to connect to

Returns:

Command status of request

Return type:

GoProResp[proto.ResponseConnect]

async request_wifi_connect_new(*, ssid: str, password: str) GoProResp[ResponseConnectNew]

Request the camera to connect to a WiFi network that is not already provisioned.

Updates will be sent as open_gopro.constants.constants.ActionId.NOTIF_PROVIS_STATE

Parameters:
  • ssid (str) – SSID to connect to

  • password (str) – password of WiFi network

Returns:

Command status of request

Return type:

GoProResp[proto.ResponseConnectNew]

async scan_wifi_networks() GoProResp[ResponseStartScanning]

Scan for Wifi networks

Returns:

Command status of request

Return type:

GoProResp[proto.ResponseStartScanning]

async set_camera_control(*, camera_control_status: int) GoProResp[None]

Tell the camera that the app (i.e. External Control) wishes to claim control of the camera.

Parameters:

camera_control_status (proto.EnumCameraControlStatus.ValueType) – Desired camera control.

Returns:

command status of request

Return type:

GoProResp[None]

async set_date_time(*, date_time: datetime) GoProResp[None]

Set the camera’s date and time (non timezone / DST version)

Parameters:

date_time (datetime.datetime) – Date and time to set (Timezone will be ignored)

Returns:

command status

Return type:

GoProResp[None]

async set_date_time_tz_dst(*, date_time: datetime, tz_offset: int, is_dst: bool) GoProResp[None]

Set the camera’s date and time with timezone and DST

Parameters:
  • date_time (datetime.datetime) – date and time

  • tz_offset (int) – timezone as UTC offset

  • is_dst (bool) – is daylight savings time?

Returns:

command status

Return type:

GoProResp[None]

async set_livestream_mode(*, url: str, minimum_bitrate: int, maximum_bitrate: int, starting_bitrate: int, window_size: int | None = None, lens: int | None = None, certs: list[Path] | None = None) GoProResp[None]

Initiate livestream to any site that accepts an RTMP URL and simultaneously encode to camera.

Parameters:
  • url (str) – url used to stream. Set to empty string to invalidate/cancel stream

  • minimum_bitrate (int) – Desired minimum streaming bitrate (>= 800)

  • maximum_bitrate (int) – Desired maximum streaming bitrate (<= 8000)

  • starting_bitrate (int) – Initial streaming bitrate (honored if 800 <= value <= 8000)

  • window_size (proto.EnumWindowSize.ValueType | None) – Streaming video resolution. Defaults to None (use camera default).

  • lens (proto.EnumLens.ValueType | None) – Streaming Field of View. Defaults to None (use camera default).

  • certs (list[Path] | None) – list of certificates to use. Defaults to None.

Returns:

command status of request

Return type:

GoProResp[None]

async set_shutter(*, shutter: Toggle) GoProResp[None]

Set the Shutter to start / stop encoding

Parameters:

shutter (constants.Toggle) – on or off

Returns:

status of command

Return type:

GoProResp[None]

async set_third_party_client_info() GoProResp[None]

Flag as third party app

Returns:

command status

Return type:

GoProResp[None]

async set_turbo_mode(*, mode: Toggle) GoProResp[None]

Enable / disable turbo mode.

Parameters:

mode (constants.Toggle) – True to enable, False to disable.

Returns:

command status of request

Return type:

GoProResp[None]

async sleep() GoProResp[None]

Put the camera in standby

Returns:

status of command

Return type:

GoProResp[None]

async tag_hilight() GoProResp[None]

Tag a highlight during encoding

Returns:

status of command

Return type:

GoProResp[None]

async unregister_for_all_capabilities(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Unregister push notifications for all capabilities

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

command status

Return type:

GoProResp[None]

async unregister_for_all_settings(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Unregister push notifications for all settings

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

command status

Return type:

GoProResp[None]

async unregister_for_all_statuses(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Unregister push notifications for all statuses

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

command status

Return type:

GoProResp[None]

class BleSettings(communicator: GoProBle)

Bases: BleMessages[BleSettingMessageBase]

The collection of all BLE Settings.

To be used by a GoProBle delegate to build setting messages.

Parameters:

communicator (GoProBle) – Adapter to read / write settings

anti_flicker: BleSettingFacade[Anti_Flicker]

Anti-Flicker

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#anti-flicker-134)

auto_power_down: BleSettingFacade[AutoPowerDown]

Auto Power Down

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#auto-power-down-59)

bit_depth: BleSettingFacade[BitDepth]

Bit Depth

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#bit-depth-183)

camera_volume: BleSettingFacade[CameraVolume]

Camera Volume

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#camera-volume-216)

controls: BleSettingFacade[Controls]

Controls

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#controls-175)

easy_mode_speed: BleSettingFacade[EasyModeSpeed]

Easy Mode Speed

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#easy-mode-speed-176)

easy_night_photo: BleSettingFacade[EasyNightPhoto]

Easy Night Photo

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#easy-night-photo-191)

enable_night_photo: BleSettingFacade[EnableNightPhoto]

Enable Night Photo

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#enable-night-photo-177)

frame_rate: BleSettingFacade[FrameRate]

Frame Rate

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#frame-rate-234)

frames_per_second: BleSettingFacade[FramesPerSecond]

Frames Per Second

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#frames-per-second-3)

framing: BleSettingFacade[Framing]

Framing

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#framing-193)

gps: BleSettingFacade[Gps]

GPS

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#gps-83)

hindsight: BleSettingFacade[Hindsight]

HindSight

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#hindsight-167)

hypersmooth: BleSettingFacade[Hypersmooth]

Hypersmooth

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#hypersmooth-135)

lapse_mode: BleSettingFacade[LapseMode]

Lapse Mode

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#lapse-mode-187)

led: BleSettingFacade[Led]

LED

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#led-91)

max_lens: BleSettingFacade[MaxLens]

Max Lens

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#max-lens-162)

max_lens_mod: BleSettingFacade[MaxLensMod]

Max Lens Mod

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#max-lens-mod-189)

max_lens_mod_enable: BleSettingFacade[MaxLensModEnable]

Max Lens Mod Enable

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#max-lens-mod-enable-190)

media_format: BleSettingFacade[MediaFormat]

Media Format

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#media-format-128)

multi_shot_aspect_ratio: BleSettingFacade[MultiShotAspectRatio]

Multi Shot Aspect Ratio

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#multi-shot-aspect-ratio-192)

multi_shot_framing: BleSettingFacade[MultiShotFraming]

Multi Shot Framing

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#multi-shot-framing-233)

nightlapse_rate: BleSettingFacade[NightlapseRate]

Nightlapse Rate

How frequently to take a video or photo when performing a Nightlapse.

This controls the Video or Photo Nightlapse rate if Setting 128 is set to 21 or 26 respectively.

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#nightlapse-rate-32)

photo_horizon_leveling: BleSettingFacade[PhotoHorizonLeveling]

Photo Horizon Leveling

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-horizon-leveling-151)

photo_interval_duration: BleSettingFacade[PhotoIntervalDuration]

Photo Interval Duration

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-interval-duration-172)

photo_lens: BleSettingFacade[PhotoLens]

Photo Lens

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-lens-122)

photo_mode: BleSettingFacade[PhotoMode]

Photo Mode

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-mode-227)

photo_output: BleSettingFacade[PhotoOutput]

Photo Output

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-output-125)

photo_single_interval: BleSettingFacade[PhotoSingleInterval]

Photo Single Interval

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-single-interval-171)

photo_timelapse_rate: BleSettingFacade[PhotoTimelapseRate]

Photo Timelapse Rate

How frequently to take a photo when performing a Photo Timelapse.

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-timelapse-rate-30)

profiles: BleSettingFacade[Profiles]

Profiles

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#profiles-184)

setup_language: BleSettingFacade[SetupLanguage]

Setup Language

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#setup-language-223)

setup_screen_saver: BleSettingFacade[SetupScreenSaver]

Setup Screen Saver

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#setup-screen-saver-219)

star_trails_length: BleSettingFacade[StarTrailsLength]

Star Trails Length

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#star-trails-length-179)

system_video_mode: BleSettingFacade[SystemVideoMode]

System Video Mode

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#system-video-mode-180)

time_lapse_digital_lenses: BleSettingFacade[TimeLapseDigitalLenses]

Time Lapse Digital Lenses

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#time-lapse-digital-lenses-123)

video_aspect_ratio: BleSettingFacade[VideoAspectRatio]

Video Aspect Ratio

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-aspect-ratio-108)

video_bit_rate: BleSettingFacade[VideoBitRate]

Video Bit Rate

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-bit-rate-182)

video_easy_mode: BleSettingFacade[VideoEasyMode]

Video Easy Mode

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-easy-mode-186)

video_framing: BleSettingFacade[VideoFraming]

Video Framing

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-framing-232)

video_horizon_leveling: BleSettingFacade[VideoHorizonLeveling]

Video Horizon Leveling

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-horizon-leveling-150)

video_lens: BleSettingFacade[VideoLens]

Video Lens

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-lens-121)

video_performance_mode: BleSettingFacade[VideoPerformanceMode]

Video Performance Mode

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-performance-mode-173)

video_resolution: BleSettingFacade[VideoResolution]

Video Resolution

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-resolution-2)

video_timelapse_rate: BleSettingFacade[VideoTimelapseRate]

Video Timelapse Rate

How frequently to take a video when performing a Video Timelapse

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-timelapse-rate-5)

webcam_digital_lenses: BleSettingFacade[WebcamDigitalLenses]

Webcam Digital Lenses

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#webcam-digital-lenses-43)

wireless_band: BleSettingFacade[WirelessBand]

Wireless Band

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#wireless-band-178)

class BleStatuses(communicator: GoProBle)

Bases: BleMessages[BleStatusMessageBase]

All of the BLE Statuses.

To be used by a GoProBle delegate to build status messages.

Parameters:

communicator (GoProBle) – Adapter to read / write settings

access_point_ssid: BleStatusFacade[str]

Access Point SSID

The name of the network that the camera sets up in AP mode for other devices to connect to.

When read via BLE, this value is big-endian byte-encoded int32.

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#access-point-ssid-30)

active_hilights: BleStatusFacade[int]

Active Hilights

The number of hilights in currently-encoding video (value is set to 0 when encoding stops)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#active-hilights-58)

ap_mode: BleStatusFacade[bool]

AP Mode

Is AP mode enabled?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#ap-mode-69)

battery_present: BleStatusFacade[bool]

Battery Present

Is the system’s internal battery present?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#battery-present-1)

busy: BleStatusFacade[bool]

Busy

Is the camera busy?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#busy-8)

camera_control_id: BleStatusFacade[CameraControlId]

Camera Control ID

Camera control status ID

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#camera-control-id-114)

capture_delay_active: BleStatusFacade[bool]

Capture Delay Active

Is Capture Delay currently active (i.e. counting down)?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#capture-delay-active-101)

cold: BleStatusFacade[bool]

Cold

Is the camera getting too cold to continue recording?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#cold-85)

connected_devices: BleStatusFacade[int]

Connected Devices

The number of wireless devices connected to the camera

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#connected-devices-31)

connected_wifi_ssid: BleStatusFacade[str]

Connected WiFi SSID

The name of the wireless network that the camera is connected to where the camera is acting as a client/station.

When read via BLE, this value is big-endian byte-encoded int32.

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#connected-wifi-ssid-29)

display_mod_status: BleStatusFacade[DisplayModStatus]

Display Mod Status

Note that this is a bitmasked value.

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#display-mod-status-110)

encoding: BleStatusFacade[bool]

Encoding

Is the system currently encoding?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#encoding-10)

flatmode: BleStatusFacade[int]

Flatmode

Current Flatmode ID

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#flatmode-89)

ftu: BleStatusFacade[bool]

FTU

Is the camera currently in First Time Use (FTU) UI flow?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#ftu-79)

gps_lock: BleStatusFacade[bool]

GPS Lock

Does the camera currently have a GPS lock?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#gps-lock-68)

hindsight: BleStatusFacade[bool]

Hindsight

Is Video Hindsight Capture Active?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#hindsight-106)

last_pairing_success: BleStatusFacade[int]

Last Pairing Success

Time since boot (milliseconds) of last successful pairing complete action

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#last-pairing-success-21)

last_pairing_type: BleStatusFacade[LastPairingType]

Last Pairing Type

The last type of pairing in which the camera was engaged

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#last-pairing-type-20)

last_wifi_scan_success: BleStatusFacade[int]

Last Wifi Scan Success

Time since boot (milliseconds) that the WiFi Access Point scan completed

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#last-wifi-scan-success-23)

lcd_lock: BleStatusFacade[bool]

LCD Lock

Is LCD lock active?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#lcd-lock-11)

lens_type: BleStatusFacade[LensType]

Lens Type

Camera lens type (reflects changes to lens settings such as 162, 189, 194, …)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#lens-type-105)

linux_core: BleStatusFacade[bool]

Linux Core

Is the system’s Linux core active?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#linux-core-104)

live_bursts: BleStatusFacade[int]

Live Bursts

Total number of Live Bursts on sdcard

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#live-bursts-100)

liveview_exposure_select_mode: BleStatusFacade[LiveviewExposureSelectMode]

Liveview Exposure Select Mode

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#liveview-exposure-select-mode-65)

liveview_x: BleStatusFacade[int]

Liveview X

Liveview Exposure Select: y-coordinate (percent)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#liveview-x-67)

liveview_y: BleStatusFacade[int]

Liveview Y

Liveview Exposure Select: y-coordinate (percent)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#liveview-y-66)

locate: BleStatusFacade[bool]

Locate

Is locate camera feature active?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#locate-45)

media_mod_state: BleStatusFacade[MediaModState]

Media Mod State

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#media-mod-state-102)

microphone_accessory: BleStatusFacade[MicrophoneAccessory]

Microphone Accessory

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#microphone-accessory-74)

minimum_status_poll_period: BleStatusFacade[int]

Minimum Status Poll Period

The minimum time between camera status updates (milliseconds). Best practice is to not poll for status more

often than this

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#minimum-status-poll-period-60)

mobile_friendly: BleStatusFacade[bool]

Mobile Friendly

Are current video settings mobile friendly? (related to video compression and frame rate)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#mobile-friendly-78)

num_5ghz_available: BleStatusFacade[bool]

5GHZ Available

Is 5GHz wireless band available?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#5ghz-available-81)

ota: BleStatusFacade[Ota]

OTA

The current status of Over The Air (OTA) update

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#ota-41)

ota_charged: BleStatusFacade[bool]

OTA Charged

Is the internal battery charged sufficiently to start Over The Air (OTA) update?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#ota-charged-83)

overheating: BleStatusFacade[bool]

Overheating

Is the system currently overheating?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#overheating-6)

pairing_state: BleStatusFacade[PairingState]

Pairing State

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#pairing-state-19)

pending_fw_update_cancel: BleStatusFacade[bool]

Pending FW Update Cancel

Is there a pending request to cancel a firmware update download?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#pending-fw-update-cancel-42)

photo_interval_capture_count: BleStatusFacade[int]

Photo Interval Capture Count

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#photo-interval-capture-count-118)

photo_preset: BleStatusFacade[int]

Photo Preset

Current Photo Preset (ID)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#photo-preset-94)

photos: BleStatusFacade[int]

Photos

Total number of photos on sdcard

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#photos-38)

preset: BleStatusFacade[int]

Preset

Current Preset (ID)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#preset-97)

preset_group: BleStatusFacade[int]

Preset Group

Current Preset Group (ID) (corresponds to ui_mode_groups in settings.json)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#preset-group-96)

preset_modified: BleStatusFacade[int]

Preset Modified

Preset Modified Status, which contains an event ID and a Preset (Group) ID

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#preset-modified-98)

preview_stream: BleStatusFacade[bool]

Preview Stream

Is Preview Stream enabled?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#preview-stream-32)

preview_stream_available: BleStatusFacade[bool]

Preview Stream Available

Is preview stream supported in current recording/mode/secondary-stream?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#preview-stream-available-55)

primary_storage: BleStatusFacade[PrimaryStorage]

Primary Storage

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#primary-storage-33)

quick_capture: BleStatusFacade[bool]

Quick Capture

Is Quick Capture feature enabled?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#quick-capture-9)

ready: BleStatusFacade[bool]

Ready

Is the system fully booted and ready to accept commands?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#ready-82)

remaining_live_bursts: BleStatusFacade[int]

Remaining Live Bursts

The number of Live Bursts can be captured with current settings before sdcard is full

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#remaining-live-bursts-99)

remaining_photos: BleStatusFacade[int]

Remaining Photos

How many photos can be taken with current settings before sdcard is full.

Alternatively, this is:

  • the remaining timelapse capability if Setting 128 is set to Timelapse Photo

  • the remaining nightlapse capability if Setting 128 is set to Nightlapse Photo

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#remaining-photos-34)

remaining_video_time: BleStatusFacade[int]

Remaining Video Time

How many seconds of video can be captured with current settings before sdcard is full

Alternatively, this is:

  • the remaining timelapse capability if Setting 128 is set to Timelapse Video

  • the remaining nightlapse capability if Setting 128 is set to Nightlapse Video

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#remaining-video-time-35)

remote_connected: BleStatusFacade[bool]

Remote Connected

Is a wireless remote control connected?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#remote-connected-27)

remote_version: BleStatusFacade[int]

Remote Version

Wireless remote control version

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#remote-version-26)

rotation: BleStatusFacade[Rotation]

Rotation

Rotational orientation of the camera

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#rotation-86)

scheduled_capture: BleStatusFacade[bool]

Scheduled Capture

Is Scheduled Capture set?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#scheduled-capture-108)

scheduled_capture_preset_id: BleStatusFacade[int]

Scheduled Capture Preset ID

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#scheduled-capture-preset-id-107)

sd_card_capacity: BleStatusFacade[int]

SD Card Capacity

Total SD card capacity in Kilobytes

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#sd-card-capacity-117)

sd_card_errors: BleStatusFacade[int]

SD Card Errors

Number of sdcard write speed errors since device booted

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#sd-card-errors-112)

sd_card_remaining: BleStatusFacade[int]

SD Card Remaining

Remaining space on the sdcard in Kilobytes

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#sd-card-remaining-54)

sd_card_write_speed_error: BleStatusFacade[bool]

SD Card Write Speed Error

Is there an SD Card minimum write speed error?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#sd-card-write-speed-error-111)

time_since_last_hilight: BleStatusFacade[int]

Time Since Last Hilight

Time since boot (milliseconds) of most recent hilight in encoding video (set to 0 when encoding stops)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#time-since-last-hilight-59)

time_warp_speed: BleStatusFacade[TimeWarpSpeed]

Time Warp Speed

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#time-warp-speed-103)

timelapse_interval_countdown: BleStatusFacade[int]

Timelapse Interval Countdown

The current timelapse interval countdown value (e.g. 5…4…3…2…1…)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#timelapse-interval-countdown-49)

timelapse_preset: BleStatusFacade[int]

Timelapse Preset

Current Time Lapse Preset (ID)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#timelapse-preset-95)

turbo_transfer: BleStatusFacade[bool]

Turbo Transfer

Is Turbo Transfer active?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#turbo-transfer-113)

usb_connected: BleStatusFacade[bool]

USB Connected

Is the camera connected to a PC via USB?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#usb-connected-115)

usb_controlled: BleStatusFacade[UsbControlled]

USB Controlled

Camera control over USB state

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#usb-controlled-116)

video_encoding_duration: BleStatusFacade[int]

Video Encoding Duration

When encoding video, this is the duration (seconds) of the video so far; 0 otherwise

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#video-encoding-duration-13)

video_preset: BleStatusFacade[int]

Video Preset

Current Video Preset (ID)

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#video-preset-93)

videos: BleStatusFacade[int]

Videos

Total number of videos on sdcard

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#videos-39)

wifi_bars: BleStatusFacade[int]

Wifi Bars

WiFi signal strength in bars

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#wifi-bars-56)

wifi_provisioning_state: BleStatusFacade[WifiProvisioningState]

Wifi Provisioning State

WiFi AP provisioning state

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#wifi-provisioning-state-24)

wifi_scan_state: BleStatusFacade[WifiScanState]

Wifi Scan State

State of current scan for WiFi Access Points

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#wifi-scan-state-22)

wireless_band: BleStatusFacade[WirelessBand]

Wireless Band

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#wireless-band-76)

wireless_connections_enabled: BleStatusFacade[bool]

Wireless Connections Enabled

Are Wireless Connections enabled?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#wireless-connections-enabled-17)

zoom_available: BleStatusFacade[bool]

Zoom Available

Is Digital Zoom feature available?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#zoom-available-77)

zoom_level: BleStatusFacade[int]

Zoom Level

Digital Zoom level as percentage

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#zoom-level-75)

zoom_while_encoding: BleStatusFacade[bool]

Zoom while Encoding

Is this camera model capable of zooming while encoding?

See [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/statuses.html#zoom-while-encoding-88)

class HttpCommands(communicator: CommunicatorType)

Bases: HttpMessages[HttpMessage]

All of the HTTP commands.

To be used as a delegate for a GoProHttp to build commands

async add_file_hilight(*, file: str, offset: int | None = None) GoProResp[None]

Add a hilight to a media file (.mp4)

Parameters:
  • file (str) – the media to add the hilight to

  • offset (int | None) – offset in ms from start of media

Returns:

command status

Return type:

GoProResp[None]

async delete_all() GoProResp[None]

Delete all files on the SD card.

Returns:

command status

Return type:

GoProResp[None]

async delete_file(*, path: str) GoProResp[None]

Delete a single file including single files that are part of a group.

Parameters:

path (str) – path to file to delete

Returns:

command status

Return type:

GoProResp[None]

async delete_group(*, path: str) GoProResp[None]

Delete all contents of a group. Should not be used on non-group files.

Parameters:

path (str) – path to first file in the group.

Returns:

command status

Return type:

GoProResp[None]

async download_file(*, camera_file: str, local_file: Path | None = None) GoProResp[Path]

Download a video from the camera to a local file.

If local_file is none, the output location will be the same name as the camera_file.

Parameters:
  • camera_file (str) – filename on camera to operate on

  • local_file (Path | None) – Location on computer to write output. Defaults to None.

Returns:

Path to local_file that output was written to

Return type:

GoProResp[Path]

async get_camera_info() GoProResp[CameraInfo]

Get general information about the camera such as firmware version

Returns:

status and settings as JSON

Return type:

GoProResp[CameraInfo]

async get_camera_state() GoProResp[dict[SettingId | StatusId, Any]]

Get all camera statuses and settings

Returns:

status and settings as JSON

Return type:

GoProResp[CameraState]

async get_date_time() GoProResp[datetime]

Get the date and time of the camera (Non timezone / DST aware)

Returns:

current date and time on camera

Return type:

GoProResp[datetime.datetime]

async get_gpmf_data(*, camera_file: str, local_file: Path | None = None) GoProResp[Path]

Get GPMF data for a file.

If local_file is none, the output location will be the same name as the camera_file.

Parameters:
  • camera_file (str) – filename on camera to operate on

  • local_file (Path | None) – Location on computer to write output. Defaults to None.

Returns:

Path to local_file that output was written to

Return type:

GoProResp[Path]

async get_last_captured_media() GoProResp[MediaPath]

Get the last captured media file.

Returns:

path of last captured media file

Return type:

GoProResp[MediaPath]

async get_media_list() GoProResp[MediaList]

Get a list of media on the camera.

Returns:

Media list JSON structure

Return type:

GoProResp[MediaList]

async get_media_metadata(*, path: str) GoProResp[MediaMetadata]

Get media metadata for a file.

Parameters:

path (str) – Path on camera of media file to get metadata for

Returns:

Media metadata JSON structure

Return type:

GoProResp[MediaMetadata]

async get_open_gopro_api_version() GoProResp[str]

Get Open GoPro API version

Returns:

Open GoPro Version

Return type:

GoProResp[str]

async get_preset_status() GoProResp[dict[str, Any]]

Get status of current presets

Returns:

JSON describing currently available presets and preset groups

Return type:

GoProResp[JsonDict]

async get_screennail__call__(*, camera_file: str, local_file: Path | None = None) GoProResp[Path]

Get screennail for a file.

If local_file is none, the output location will be the same name as the camera_file.

Parameters:
  • camera_file (str) – filename on camera to operate on

  • local_file (Path | None) – Location on computer to write output. Defaults to None.

Returns:

Path to local_file that output was written to

Return type:

GoProResp[Path]

async get_telemetry(*, camera_file: str, local_file: Path | None = None) GoProResp[Path]

Download the telemetry data for a camera file and store in a local file.

If local_file is none, the output location will be the same name as the camera_file.

Parameters:
  • camera_file (str) – filename on camera to operate on

  • local_file (Path | None) – Location on computer to write output. Defaults to None.

Returns:

Path to local_file that output was written to

Return type:

GoProResp[Path]

async get_thumbnail(*, camera_file: str, local_file: Path | None = None) GoProResp[Path]

Get thumbnail for a file.

If local_file is none, the output location will be the same name as the camera_file.

Parameters:
  • camera_file (str) – filename on camera to operate on

  • local_file (Path | None) – Location on computer to write output. Defaults to None.

Returns:

Path to local_file that output was written to

Return type:

GoProResp[Path]

async get_webcam_version() GoProResp[str]

Get the version of the webcam implementation

Returns:

version

Return type:

GoProResp[str]

async load_preset(*, preset: int) GoProResp[None]

Set camera to a given preset

The preset ID can be found from open_gopro.api.http_commands.HttpCommands.get_preset_status

Parameters:

preset (int) – preset to load

Returns:

command status

Return type:

GoProResp[None]

async load_preset_group(*, group: int) GoProResp[None]

Set the active preset group.

The most recently used Preset in this group will be set.

Parameters:

group (proto.EnumPresetGroup.ValueType) – desired Preset Group

Returns:

command status

Return type:

GoProResp[None]

async remove_file_hilight(*, file: str, offset: int | None = None) GoProResp[None]

Remove a hilight from a media file (.mp4)

Parameters:
  • file (str) – the media to remove the hilight from

  • offset (int | None) – offset in ms from start of media

Returns:

command status

Return type:

GoProResp[None]

async set_camera_control(*, mode: CameraControl) GoProResp[None]

Configure global behaviors by setting camera control (to i.e. Idle, External)

Parameters:

mode (constants.CameraControl) – desired camera control value

Returns:

command status

Return type:

GoProResp[None]

async set_date_time(*, date_time: datetime, tz_offset: int = 0, is_dst: bool = False) GoProResp[None]

Update the date and time of the camera

Parameters:
  • date_time (datetime.datetime) – date and time

  • tz_offset (int) – timezone (as UTC offset). Defaults to 0.

  • is_dst (bool) – is daylight savings time?. Defaults to False.

Returns:

command status

Return type:

GoProResp[None]

async set_digital_zoom(*, percent: int) GoProResp[None]

Set digital zoom in percent.

Parameters:

percent (int) – Desired zoom as a percentage

Returns:

command status

Return type:

GoProResp[None]

async set_keep_alive() GoProResp[None]

Send the keep alive signal to maintain the connection.

Returns:

command status

Return type:

GoProResp[None]

async set_preview_stream(*, mode: Toggle, port: int | None = None) GoProResp[None]

Start or stop the preview stream

Parameters:
  • mode (constants.Toggle) – enable to start or disable to stop

  • port (int | None) – Port to use for Preview Stream. Defaults to 8554 if None. Only relevant when starting the stream.

Returns:

command status

Return type:

GoProResp[None]

async set_shutter(*, shutter: Toggle) GoProResp[None]

Set the shutter on or off

Parameters:

shutter (constants.Toggle) – on or off (i.e. start or stop encoding)

Returns:

command status

Return type:

GoProResp[None]

async set_third_party_client_info() GoProResp[None]

Flag as third party app

Returns:

command status

Return type:

GoProResp[None]

async set_turbo_mode(*, mode: Toggle) GoProResp[None]

Enable or disable Turbo transfer mode.

Parameters:

mode (constants.Toggle) – enable / disable turbo mode

Returns:

Status

Return type:

GoProResp[None]

async update_custom_preset(*, icon_id: int | None = None, title_id: str | int | None = None, custom_name: str | None = None) GoProResp[None]

For a custom preset, update the Icon and / or the Title

Parameters:
  • icon_id (proto.EnumPresetIcon.ValueType | None) – Icon to use. Defaults to None.

  • title_id (str | proto.EnumPresetTitle.ValueType | None) – Title to use. Defaults to None.

  • custom_name (str | None) – Custom name to use if title_id is set to proto.EnumPresetTitle.PRESET_TITLE_USER_DEFINED_CUSTOM_NAME. Defaults to None.

Returns:

command status

Return type:

GoProResp[None]

async webcam_exit() GoProResp[WebcamResponse]

Exit the webcam.

Returns:

command status

Return type:

GoProResp[WebcamResponse]

async webcam_preview() GoProResp[WebcamResponse]

Start the webcam preview.

Returns:

command status

Return type:

GoProResp[WebcamResponse]

async webcam_start(*, resolution: WebcamResolution | None = None, fov: WebcamFOV | None = None, port: int | None = None, protocol: WebcamProtocol | None = None) GoProResp[WebcamResponse]

Start the webcam.

Parameters:
  • resolution (constants.WebcamResolution | None) – resolution to use. If not set, camera default will be used.

  • fov (constants.WebcamFOV | None) – field of view to use. If not set, camera default will be used.

  • port (int | None) – port to use for streaming. If not set, camera default of 8554 will be used.

  • protocol (constants.WebcamProtocol | None) – streaming protocol to use. If not set, camera default of TS will be used.

Returns:

command status

Return type:

GoProResp[WebcamResponse]

async webcam_status() GoProResp[WebcamResponse]

Get the current status of the webcam

Returns:

command status including the webcam status

Return type:

GoProResp[WebcamResponse]

async webcam_stop() GoProResp[WebcamResponse]

Stop the webcam.

Returns:

command status

Return type:

GoProResp[WebcamResponse]

async wired_usb_control(*, control: Toggle) GoProResp[None]

Enable / disable wired usb control

Parameters:

control (constants.Toggle) – enable or disable

Returns:

command status

Return type:

GoProResp[None]

class HttpSettings(communicator: GoProHttp)

Bases: HttpMessages[HttpSetting]

The collection of all HTTP Settings

Parameters:

communicator (GoProHttp) – Adapter to read / write settings

anti_flicker: HttpSetting[Anti_Flicker]

Anti-Flicker

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#anti-flicker-134)

auto_power_down: HttpSetting[AutoPowerDown]

Auto Power Down

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#auto-power-down-59)

bit_depth: HttpSetting[BitDepth]

Bit Depth

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#bit-depth-183)

camera_volume: HttpSetting[CameraVolume]

Camera Volume

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#camera-volume-216)

controls: HttpSetting[Controls]

Controls

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#controls-175)

easy_mode_speed: HttpSetting[EasyModeSpeed]

Easy Mode Speed

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#easy-mode-speed-176)

easy_night_photo: HttpSetting[EasyNightPhoto]

Easy Night Photo

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#easy-night-photo-191)

enable_night_photo: HttpSetting[EnableNightPhoto]

Enable Night Photo

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#enable-night-photo-177)

frame_rate: HttpSetting[FrameRate]

Frame Rate

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#frame-rate-234)

frames_per_second: HttpSetting[FramesPerSecond]

Frames Per Second

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#frames-per-second-3)

framing: HttpSetting[Framing]

Framing

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#framing-193)

gps: HttpSetting[Gps]

GPS

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#gps-83)

hindsight: HttpSetting[Hindsight]

HindSight

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#hindsight-167)

hypersmooth: HttpSetting[Hypersmooth]

Hypersmooth

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#hypersmooth-135)

lapse_mode: HttpSetting[LapseMode]

Lapse Mode

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#lapse-mode-187)

led: HttpSetting[Led]

LED

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#led-91)

max_lens: HttpSetting[MaxLens]

Max Lens

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#max-lens-162)

max_lens_mod: HttpSetting[MaxLensMod]

Max Lens Mod

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#max-lens-mod-189)

max_lens_mod_enable: HttpSetting[MaxLensModEnable]

Max Lens Mod Enable

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#max-lens-mod-enable-190)

media_format: HttpSetting[MediaFormat]

Media Format

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#media-format-128)

multi_shot_aspect_ratio: HttpSetting[MultiShotAspectRatio]

Multi Shot Aspect Ratio

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#multi-shot-aspect-ratio-192)

multi_shot_framing: HttpSetting[MultiShotFraming]

Multi Shot Framing

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#multi-shot-framing-233)

nightlapse_rate: HttpSetting[NightlapseRate]

Nightlapse Rate

How frequently to take a video or photo when performing a Nightlapse.

This controls the Video or Photo Nightlapse rate if Setting 128 is set to 21 or 26 respectively.

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#nightlapse-rate-32)

photo_horizon_leveling: HttpSetting[PhotoHorizonLeveling]

Photo Horizon Leveling

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-horizon-leveling-151)

photo_interval_duration: HttpSetting[PhotoIntervalDuration]

Photo Interval Duration

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-interval-duration-172)

photo_lens: HttpSetting[PhotoLens]

Photo Lens

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-lens-122)

photo_mode: HttpSetting[PhotoMode]

Photo Mode

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-mode-227)

photo_output: HttpSetting[PhotoOutput]

Photo Output

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-output-125)

photo_single_interval: HttpSetting[PhotoSingleInterval]

Photo Single Interval

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-single-interval-171)

photo_timelapse_rate: HttpSetting[PhotoTimelapseRate]

Photo Timelapse Rate

How frequently to take a photo when performing a Photo Timelapse.

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#photo-timelapse-rate-30)

profiles: HttpSetting[Profiles]

Profiles

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#profiles-184)

setup_language: HttpSetting[SetupLanguage]

Setup Language

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#setup-language-223)

setup_screen_saver: HttpSetting[SetupScreenSaver]

Setup Screen Saver

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#setup-screen-saver-219)

star_trails_length: HttpSetting[StarTrailsLength]

Star Trails Length

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#star-trails-length-179)

system_video_mode: HttpSetting[SystemVideoMode]

System Video Mode

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#system-video-mode-180)

time_lapse_digital_lenses: HttpSetting[TimeLapseDigitalLenses]

Time Lapse Digital Lenses

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#time-lapse-digital-lenses-123)

video_aspect_ratio: HttpSetting[VideoAspectRatio]

Video Aspect Ratio

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-aspect-ratio-108)

video_bit_rate: HttpSetting[VideoBitRate]

Video Bit Rate

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-bit-rate-182)

video_easy_mode: HttpSetting[VideoEasyMode]

Video Easy Mode

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-easy-mode-186)

video_framing: HttpSetting[VideoFraming]

Video Framing

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-framing-232)

video_horizon_leveling: HttpSetting[VideoHorizonLeveling]

Video Horizon Leveling

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-horizon-leveling-150)

video_lens: HttpSetting[VideoLens]

Video Lens

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-lens-121)

video_performance_mode: HttpSetting[VideoPerformanceMode]

Video Performance Mode

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-performance-mode-173)

video_resolution: HttpSetting[VideoResolution]

Video Resolution

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-resolution-2)

video_timelapse_rate: HttpSetting[VideoTimelapseRate]

Video Timelapse Rate

How frequently to take a video when performing a Video Timelapse

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#video-timelapse-rate-5)

webcam_digital_lenses: HttpSetting[WebcamDigitalLenses]

Webcam Digital Lenses

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#webcam-digital-lenses-43)

wireless_band: HttpSetting[WirelessBand]

Wireless Band

@see [Open GoPro Spec](https://gopro.github.io/OpenGoPro/ble/features/settings.html#wireless-band-178)

Base Types

Commonly reused type aliases

CameraState

Status / setting id-to-value mappings

alias of dict[SettingId | StatusId, Any]

CmdType: TypeAlias = open_gopro.constants.constants.CmdId | open_gopro.constants.constants.QueryCmdId | open_gopro.constants.constants.ActionId

Types that identify a command.

IdType: TypeAlias = open_gopro.constants.settings.SettingId | open_gopro.constants.statuses.StatusId | open_gopro.constants.constants.ActionId | open_gopro.constants.constants.CmdId | open_gopro.ble.services.BleUUID | str

Message Identifier Type

JsonDict

Generic JSON dictionary

alias of dict[str, Any]

ProducerType

Types that can be registered for.

alias of tuple[QueryCmdId, SettingId | StatusId]

ResponseType: TypeAlias = open_gopro.constants.constants.CmdId | open_gopro.constants.constants.QueryCmdId | open_gopro.constants.constants.ActionId | open_gopro.constants.statuses.StatusId | open_gopro.constants.settings.SettingId | open_gopro.ble.services.BleUUID | str | construct.core.Enum

Types that are used to identify a response.

UpdateCb

Callback definition for update handlers

alias of Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]

UpdateType: TypeAlias = open_gopro.constants.settings.SettingId | open_gopro.constants.statuses.StatusId | open_gopro.constants.constants.ActionId

Identifier Type of an asynchronous update

GoPro Enum

class GoProEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
class GoProIntEnum(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

BLE Setting

Inheritance diagram of open_gopro.api.builders.BleSettingFacade
class BleSettingFacade(communicator: GoProBle, identifier: SettingId, parser_builder: Construct | type[GoProIntEnum] | BytesParserBuilder)

Wrapper around BleSetting since a BleSetting’s message definition changes based on how it is being operated on.

Raises:

TypeError – Parser builder is not a valid type

SETTER_UUID

UUID used to perform set operation

Type:

Final[BleUUID]

READER_UUID

UUID used to perform read operation

Type:

Final[BleUUID]

Parameters:
  • communicator (GoProBle) – BLE communicator that will operate on this object.

  • identifier (SettingId) – Setting Identifier

  • parser_builder (QueryParserType) – Parses responses from bytes and builds requests to bytes.

class BleSettingMessageBase(uuid: BleUUID, identifier: SettingId | QueryCmdId, setting_id: SettingId, builder: BuilderProtocol)

Actual BLE Setting Message that is wrapped by the facade.

Parameters:
  • uuid (BleUUID) – UUID to access this setting.

  • identifier (SettingId | QueryCmdId) – How responses to operations on this message will be identified.

  • setting_id (SettingId) – Setting identifier. May match identifier in some cases.

  • builder (BuilderProtocol) – Build request bytes from the current message.

async get_capabilities_values() GoProResp[list[ValueType]]

Get currently supported settings capabilities values.

Returns:

settings capabilities values

Return type:

GoProResp[list[ValueType]]

async get_value() GoProResp[ValueType]

Get the settings value.

Returns:

settings value

Return type:

GoProResp[ValueType]

async register_capability_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Register for asynchronous notifications when a given setting ID’s capabilities update.

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

Current capabilities of respective setting ID

Return type:

GoProResp[None]

async register_value_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Register for asynchronous notifications when a given setting ID’s value updates.

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

Current value of respective setting ID

Return type:

GoProResp[None]

async set(value: ValueType) GoProResp[None]

Set the value of the setting.

Parameters:

value (ValueType) – The argument to use to set the setting value.

Returns:

Status of set

Return type:

GoProResp[None]

async unregister_capability_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Stop receiving notifications when a given setting ID’s capabilities change.

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

Status of unregister

Return type:

GoProResp[None]

async unregister_value_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Stop receiving notifications when a given setting ID’s value updates.

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

Status of unregister

Return type:

GoProResp[None]

BLE Status

Inheritance diagram of open_gopro.api.builders.BleStatusFacade
class BleStatusFacade(communicator: GoProBle, identifier: StatusId, parser: Construct | type[GoProIntEnum] | BytesParserBuilder)

Wrapper around BleStatus since a BleStatus’s message definition changes based on how it is being operated on.

UUID

attribute ID used to perform set operation

Type:

Final[BleUUID]

Parameters:
  • communicator (GoProBle) – BLE communicator that will operate on this object.

  • identifier (StatusId) – Status identifier

  • parser (QueryParserType) – Parser responses from bytes

Raises:

TypeError – Attempted to pass an invalid parser type

class BleStatusMessageBase(uuid: BleUUID, identifier: StatusId | QueryCmdId, status_id: StatusId, builder: Callable[[Any], bytearray])

An individual camera status that is interacted with via BLE.

Parameters:
  • uuid (BleUUID) – UUID to access this status.

  • identifier (StatusId | QueryCmdId) – How responses to operations on this message will be identified.

  • status_id (StatusId) – Status identifier. May match identifier in some cases.

  • builder (Callable[[Any], bytearray]) – Build request bytes from the current message.

async get_value() GoProResp[ValueType]

Get the current value of a status.

Returns:

current status value

Return type:

GoProResp[ValueType]

async register_value_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[ValueType]

Register for asynchronous notifications when a status changes.

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

current status value

Return type:

GoProResp[ValueType]

async unregister_value_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]]) GoProResp[None]

Stop receiving notifications when status changes.

Parameters:

callback (UpdateCb) – callback to be notified with

Returns:

Status of unregister

Return type:

GoProResp[None]

HTTP Setting

Inheritance diagram of open_gopro.api.builders.HttpSetting
class HttpSetting(communicator: GoProHttp, identifier: SettingId)

An individual camera setting that is interacted with via Wifi.

build_url(**kwargs: Any) str

Build the endpoint from the current arguments

Parameters:

**kwargs (Any) – run-time arguments

Returns:

built URL

Return type:

str

async set(value: ValueType) GoProResp

Set the value of the setting.

Parameters:

value (ValueType) – value to set setting

Returns:

Status of set

Return type:

GoProResp

Method Protocols

class BuilderProtocol(*args, **kwargs)

Protocol definition of data building methods

Message Bases

These are the base types that are used to implement version-specific API’s. These are published for reference but the end user should never need to use these directly.

class Message(identifier: SettingId | StatusId | ActionId | CmdId | BleUUID | str, parser: Parser | None = None)

Bases: ABC

Base class for all messages that will be contained in a Messages class

class HttpMessage(endpoint: str, identifier: SettingId | StatusId | ActionId | CmdId | BleUUID | str | None, components: list[str] | None = None, arguments: list[str] | None = None, body_args: list[str] | None = None, headers: dict[str, Any] | None = None, certificate: Path | None = None, parser: Parser | None = None)

Bases: Message

The base class for all HTTP messages. Stores common information.

Parameters:
  • endpoint (str) – base endpoint

  • identifier (IdType | None) – explicit message identifier. If None, will be generated from endpoint.

  • components (list[str] | None) – Additional path components (i.e. endpoint/{COMPONENT}). Defaults to None.

  • arguments (list[str] | None) – Any arguments to be appended after endpoint (i.e. endpoint?{ARGUMENT}). Defaults to None.

  • body_args (list[str] | None) – Arguments to be added to the body JSON. Defaults to None.

  • headers (dict[str, Any] | None) – A dict of values to be set in the HTTP operation headers. Defaults to None.

  • certificate (Path | None) – Path to SSL certificate bundle. Defaults to None.

  • parser (Parser | None) – Parser to interpret HTTP responses. Defaults to None.

build_body(**kwargs: Any) dict[str, Any]

Build JSON body from run-time body arguments

Parameters:

**kwargs (Any) – run-time arguments to check to see if each should be added to the body

Returns:

built JSON body

Return type:

dict[str, Any]

build_url(**kwargs: Any) str

Build the URL string from the passed in components and arguments

Parameters:

**kwargs (Any) – additional entries for the dict

Returns:

built URL

Return type:

str

class BleMessage(uuid: BleUUID, identifier: SettingId | StatusId | ActionId | CmdId | BleUUID | str, parser: Parser | None)

Bases: Message

The base class for all BLE messages to store common info

Parameters:
  • uuid (BleUUID) – BLE client to read / write

  • identifier (IdType) – BleUUID to read / write to

  • parser (Parser | None) – parser to interpret message

class Messages(communicator: CommunicatorType)

Bases: ABC, dict, Generic[MessageType, CommunicatorType]

Base class for setting and status containers

Allows message groups to be iterable and supports dict-like access.

Instance attributes that are an instance (or subclass) of Message are automatically accumulated during instantiation

Parameters:

communicator (CommunicatorType) – communicator that will send messages

class BleMessages(communicator: CommunicatorType)

Bases: Messages[MessageType, GoProBle]

A container of BLE Messages.

Identical to Messages and it just used for typing

class HttpMessages(communicator: CommunicatorType)

Bases: Messages[MessageType, GoProHttp]

A container of HTTP Messages.

Identical to Messages and it just used for typing

class MessageRules(fastpass_analyzer: Analyzer = <function MessageRules.<lambda>>, wait_for_encoding_analyzer: Analyzer = <function MessageRules.<lambda>>)

Message Rules Manager

always_false

helper analyzer for a property that is always false

Type:

Analyzer

always_true

helper analyzer for a property that is always true

Type:

Analyzer

Parameters:
  • fastpass_analyzer (Analyzer) – Analyzer to decide if the message is fastpass. Defaults to always_false.

  • wait_for_encoding_analyzer (Analyzer) – Analyzer to decide if the message should wait for encoding. Defaults to always_false.

class Analyzer(*args, **kwargs)

Protocol definition of message rules analyzer

is_fastpass(**kwargs: Any) bool

Is this command fastpass?

Parameters:

**kwargs (Any) – Arguments passed into the message

Returns:

result of rule check

Return type:

bool

should_wait_for_encoding_start(**kwargs: Any) bool

Should this message wait for encoding to start?

Parameters:

**kwargs (Any) – Arguments passed into the message

Returns:

result of rule check

Return type:

bool

Responses

Generic common response container:

This can be imported via:

from open_gopro import GoProResp
class GoProResp(protocol: Protocol, status: ErrorCode, data: T, identifier: CmdId | QueryCmdId | ActionId | StatusId | SettingId | BleUUID | str | Enum)

The object used to encapsulate all GoPro responses.

It consists of several common properties / attribute and a data attribute that varies per response.

>>> gopro = WirelessGoPro()
>>> await gopro.open()
>>> response = await (gopro.ble_setting.resolution).get_value()
>>> print(response)

Now let’s inspect the responses various attributes / properties:

>>> print(response.status)
ErrorCode.SUCCESS
>>> print(response.ok)
True
>>> print(response.identifier)
QueryCmdId.GET_SETTING_VAL
>>> print(response.protocol)
Protocol.BLE

Now let’s print it’s data as (as JSON):

>>> print(response)
{
    "id" : "QueryCmdId.GET_SETTING_VAL",
    "status" : "ErrorCode.SUCCESS",
    "protocol" : "Protocol.BLE",
    "data" : {
        "SettingId.RESOLUTION" : "Resolution.RES_4K_16_9",
    },
}
protocol

protocol response was received on

Type:

GoProResp.Protocol

status

status of response

Type:

ErrorCode

data

parsed response data

Type:

T

identifier

response identifier, the type of which will vary depending on the response

Type:

ResponseType

class Protocol(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Protocol that Command will be sent on.

property ok: bool

Are there any errors in this response?

Returns:

True if the response is ok (i.e. there are no errors), False otherwise

Return type:

bool

Data Models

These are the various models that are returned in responses, used in commands, etc. They can be imported with:

from open_gopro.models import ***
pydantic model MediaPath

Model to represent media path

Fields:
field file: str [Required]

media file name (including file extension)

field folder: str [Required]

directory that media lives in

property as_path: str

Return the model as a camera path (folder/file)

Returns:

camera path

Return type:

str

pydantic model MediaMetadata

Base Media Metadata class

Fields:
field content_type: str [Required] (alias 'ct')

Media content type

field creation_timestamp: str [Required] (alias 'cre')

Creation time in seconds since epoch

field field_of_view: str | None = None (alias 'fov')

Field of View

field file_size: str [Required] (alias 's')

File size in bytes

field gumi: str [Required]

Globally Unique Media ID

field height: str [Required] (alias 'h')

Height of media in pixels

field hilight_count: str [Required] (alias 'hc')

Number of hilights in media

field image_stabilization: str [Required] (alias 'eis')

1 if stabilized, 0 otherwise

field lens_config: str | None = None (alias 'lc')

Lens configuration

field lens_projection: str | None = None (alias 'prjn')

Lens projection

field media_offload_state: list[str] | None = None (alias 'mos')

List of offload states

field metadata_present: str [Required] (alias 'mp')

1 if metadata is present, 0 otherwise

field parent_gumi: str | None = None (alias 'pgumi')

Only present if in a clip

field rotate: str [Required] (alias 'rot')

Media rotation

field transcoded: str [Required] (alias 'tr')

1 if file is transcoded, 0 otherwise

field upload_status: str [Required] (alias 'us')

Whether or not the media file has been uploaded

field width: str [Required] (alias 'w')

Width of media in pixels

classmethod from_json(json_str: dict[str, Any]) MediaMetadata

Build a metadata object given JSON input

Parameters:

json_str (JsonDict) – raw JSON

Returns:

parsed metadata

Return type:

MediaMetadata

pydantic model PhotoMetadata

Bases: MediaMetadata

Metadata for a Photo file

Fields:
field high_dynamic_range: str | None = None (alias 'hdr')
field raw: str | None = None

1 if photo taken with wide dynamic range, 0 otherwise

field wide_dynamic_range: str | None = None (alias 'wdr')

1 if photo taken with high dynamic range, 0 otherwise

pydantic model VideoMetadata

Bases: MediaMetadata

Metadata for a video file

Fields:
field audio_option: str [Required] (alias 'ao')

Auto, wind, or stereo

field avc_level: str [Required] (alias 'profile')

Advanced Video Codec Level

field avc_profile: str [Required]

Advanced Video Code Profile

field clipped: str [Required] (alias 'cl')

1 if clipped, 0 otherwise

field duration: str [Required] (alias 'dur')

Video duration in seconds

field frame_rate: str [Required] (alias 'fps')
field frame_rate_divisor: str [Required] (alias 'fps_denom')

Used to modify frame rate

field hilight_list: list[str] [Required] (alias 'hi')

List of hlights in ms offset from start of video

field lrv_file_size: str [Required] (alias 'ls')

Low Resolution Video file size in bytes. -1 if there is no LRV

field max_auto_hilight_score: str [Required] (alias 'mahs')

Maximum auto-hilight score

field progressive: str | None = None (alias 'progr')

1 if progressive, 0 otherwise

field protune_audio: str [Required] (alias 'pta')

1 if protune audio is present, 0 otherwise

field subsample: str [Required]

1 if subsampled from other video, 0 otherwise

pydantic model MediaItem

Base Media Item class

Fields:
field creation_timestamp: str [Required] (alias 'cre')

Creation time in seconds since epoch

field filename: str [Required] (alias 'n')

Name of media item

field low_res_video_size: str | None = None (alias 'glrv')

Low resolution video size

field lrv_file_size: str | None = None (alias 'ls')

Low resolution file size

field modified_time: str [Required] (alias 'mod')

Time file was last modified in seconds since epoch

field raw: str | None = None

1 if photo has raw version, 0 (or omitted) otherwise

field session_id: str | None = None (alias 'id')
pydantic model GroupedMediaItem

Bases: MediaItem

Media Item that is also a grouped item.

An example of a grouped item is a burst photo.

Fields:
field group_first_member_id: str | None = None (alias 'b')
field group_id: str | None = None (alias 'g')

Group Identifier

field group_last_member_id: str | None = None (alias 'l')

ID of last member in the group

field group_missing_ids: list[str] | None = None (alias 'm')

(b -> burst, c -> continuous shot, n -> night lapse, t -> time lapse)

field group_size: str | None = None (alias 's')
field group_type: str | None = None (alias 't')
pydantic model MediaFileSystem

Grouping of media items into filesystem(s)

Fields:
field directory: str [Required] (alias 'd')
field file_system: list[MediaItem] [Required] (alias 'fs')

List of files

classmethod identify_item(item: dict[str, Any]) MediaItem

Extent item into GroupedMediaItem if it such an item

A group item is identified by the presence of a “g” field

Parameters:

item (JsonDict) – input JSON

Returns:

parsed media item

Return type:

MediaItem

pydantic model MediaList

Top level media list object

Fields:
field identifier: str [Required] (alias 'id')

String identifier of this media list

field media: list[MediaFileSystem] [Required]

Media filesystem(s)

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

property files: list[MediaItem]

Helper method to get list of media items

Returns:

all media items in this media list

Return type:

list[MediaItem]

pydantic model TzDstDateTime

DST aware datetime

Fields:
field datetime: datetime.datetime [Required]
field dst: bool [Required]
field tzone: int [Required]
pydantic model CameraInfo

General camera info

Config:
  • protected_namespaces: tuple = ()

Fields:
field ap_mac_addr: str [Required]

Camera access point MAC address

field ap_ssid: str [Required]

Camera access point SSID name

field firmware_version: str [Required]

Complete firmware version

field model_name: str [Required]

Camera model name as string

field model_number: int [Required]

Camera model number

field serial_number: str [Required]

Camera serial number

pydantic model WebcamResponse

Common Response from Webcam Commands

Fields:
field error: WebcamError [Required]
field setting_id: str | None = None
field status: WebcamStatus | None = None
field supported_options: list[SupportedOption] | None = None
pydantic model SupportedOption

A supported option in an invalid setting response

Fields:
field display_name: str [Required]
field id: int [Required]

Constants

These can be imported as:

from open_gopro import constants

Constants module

Constant numbers shared across the GoPro module. These do not change across Open GoPro Versions

class ActionId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
GET_AP_ENTRIES = 3
GET_AP_ENTRIES_RSP = 131
GET_LIVESTREAM_STATUS = 116
GET_PRESET_STATUS = 114
GET_PRESET_STATUS_RSP = 242
LIVESTREAM_STATUS_NOTIF = 245
LIVESTREAM_STATUS_RSP = 244
NOTIF_PROVIS_STATE = 12
NOTIF_START_SCAN = 11
PRESET_MODIFIED_NOTIFICATION = 243
RELEASE_NETWORK = 120
RELEASE_NETWORK_RSP = 248
REQUEST_CLEAR_COHN_CERT = 102
REQUEST_COHN_SETTING = 101
REQUEST_CREATE_COHN_CERT = 103
REQUEST_GET_COHN_CERT = 110
REQUEST_GET_COHN_STATUS = 111
REQUEST_GET_LAST_MEDIA = 109
REQUEST_PRESET_UPDATE_CUSTOM = 100
REQUEST_WIFI_CONNECT = 4
REQUEST_WIFI_CONNECT_NEW = 5
REQUEST_WIFI_CONNECT_NEW_RSP = 133
REQUEST_WIFI_CONNECT_RSP = 132
RESPONSE_CLEAR_COHN_CERT = 230
RESPONSE_COHN_SETTING = 229
RESPONSE_CREATE_COHN_CERT = 231
RESPONSE_GET_COHN_CERT = 238
RESPONSE_GET_COHN_STATUS = 239
RESPONSE_GET_LAST_MEDIA = 237
RESPONSE_PRESET_UPDATE_CUSTOM = 228
SCAN_WIFI_NETWORKS = 2
SCAN_WIFI_NETWORKS_RSP = 130
SET_CAMERA_CONTROL = 105
SET_CAMERA_CONTROL_RSP = 233
SET_LIVESTREAM_MODE = 121
SET_LIVESTREAM_MODE_RSP = 249
SET_TURBO_MODE = 107
SET_TURBO_MODE_RSP = 235
class CameraControl(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
CAMERA = 1
EXTERNAL = 2
IDLE = 0
class CmdId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
GET_CAMERA_CAPABILITIES = 50
GET_CAMERA_SETTINGS = 18
GET_CAMERA_STATUSES = 19
GET_DATE_TIME = 14
GET_DATE_TIME_DST = 16
GET_HW_INFO = 60
GET_SETTINGS_JSON = 59
GET_THIRD_PARTY_API_VERSION = 81
LOAD_PRESET = 64
LOAD_PRESET_GROUP = 62
POWER_DOWN = 4
REGISTER_ALL_CAPABILITIES = 98
REGISTER_ALL_SETTINGS = 82
REGISTER_ALL_STATUSES = 83
SET_DATE_TIME = 13
SET_DATE_TIME_DST = 15
SET_PAIRING_COMPLETE = 3
SET_SHUTTER = 1
SET_THIRD_PARTY_CLIENT_INFO = 80
SET_WIFI = 23
SLEEP = 5
TAG_HILIGHT = 24
UNREGISTER_ALL_CAPABILITIES = 130
UNREGISTER_ALL_SETTINGS = 114
UNREGISTER_ALL_STATUSES = 115
class ErrorCode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ERROR = 1
INVALID_PARAM = 2
SUCCESS = 0
UNKNOWN = -1
class FeatureId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
COMMAND = 241
NETWORK_MANAGEMENT = 2
QUERY = 245
SETTING = 243
class LED_SPECIAL(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
BLE_KEEP_ALIVE = 66
class QueryCmdId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
GET_CAPABILITIES_NAME = 66
GET_CAPABILITIES_VAL = 50
GET_SETTING_NAME = 34
GET_SETTING_VAL = 18
GET_STATUS_VAL = 19
PROTOBUF_QUERY = 245
REG_CAPABILITIES_UPDATE = 98
REG_SETTING_VAL_UPDATE = 82
REG_STATUS_VAL_UPDATE = 83
SETTING_CAPABILITY_PUSH = 162
SETTING_VAL_PUSH = 146
STATUS_VAL_PUSH = 147
UNREG_CAPABILITIES_UPDATE = 130
UNREG_SETTING_VAL_UPDATE = 114
UNREG_STATUS_VAL_UPDATE = 115
class Toggle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
DISABLE = 0
ENABLE = 1
class WebcamError(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
COM_TIMEOUT = 5
EXEC_STREAM = 3
EXIT = 8
INVALID_PARAM = 6
SET_PRESET = 1
SET_WINDOW_SIZE = 2
SHUTTER = 4
SUCCESS = 0
UNAVAILABLE = 7
class WebcamFOV(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LINEAR = 4
NARROW = 2
SUPERVIEW = 3
WIDE = 0
class WebcamProtocol(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
RTSP = 'RTSP'
TS = 'TS'
class WebcamResolution(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NOT_APPLICABLE = 0
RES_1080 = 12
RES_480 = 4
RES_720 = 7
class WebcamStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
HIGH_POWER_PREVIEW = 2
IDLE = 1
LOW_POWER_PREVIEW = 3
OFF = 0

Setting-related constants

class Anti_Flicker(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NTSC = 0
NUM_50HZ = 3
NUM_60HZ = 2
PAL = 1
class AutoPowerDown(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NEVER = 0
NUM_15_MIN = 6
NUM_1_MIN = 1
NUM_30_MIN = 7
NUM_30_SECONDS = 12
NUM_5_MIN = 4
NUM_8_SECONDS = 11
class BitDepth(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_10_BIT = 2
NUM_8_BIT = 0
class CameraVolume(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
HIGH = 100
LOW = 70
MEDIUM = 85
class Controls(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
EASY = 0
PRO = 1
class EasyModeSpeed(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_100_4X_SUPER_SLO_MO_SPEED_21_9_4K_V2_ = 151
NUM_100_4X_SUPER_SLO_MO_SPEED_2_7K_4_3_V2_ = 159
NUM_120_4X_SUPER_SLO_MO_SPEED_21_9_4K_V2_ = 150
NUM_120_4X_SUPER_SLO_MO_SPEED_2_7K_4_3_V2_ = 158
NUM_1X_NORMAL_SPEED_1_1_25_FPS_4K_V2_ = 139
NUM_1X_NORMAL_SPEED_1_1_30_FPS_4K_V2_ = 138
NUM_1X_NORMAL_SPEED_21_9_25_FPS_4K_V2_ = 147
NUM_1X_NORMAL_SPEED_21_9_25_FPS_5_3K_V2_ = 143
NUM_1X_NORMAL_SPEED_21_9_30_FPS_4K_V2_ = 146
NUM_1X_NORMAL_SPEED_21_9_30_FPS_5_3K_V2_ = 142
NUM_1X_NORMAL_SPEED_25_FPS_4_3_4K_V2_ = 155
NUM_1X_NORMAL_SPEED_25_FPS_4_3_5_3K_V2_ = 153
NUM_1X_NORMAL_SPEED_30_FPS_4_3_4K_V2_ = 154
NUM_1X_NORMAL_SPEED_30_FPS_4_3_5_3K_V2_ = 152
NUM_1X_SPEED_2_7K_50HZ_LOW_LIGHT_V2_ = 129
NUM_1X_SPEED_2_7K_LOW_LIGHT_V2_ = 128
NUM_1X_SPEED_4K_50HZ_FULL_FRAME_LOW_LIGHT_V2_ = 137
NUM_1X_SPEED_4K_50HZ_LOW_LIGHT_V2_ = 127
NUM_1X_SPEED_4K_FULL_FRAME_LOW_LIGHT_V2_ = 136
NUM_1X_SPEED_4K_LOW_LIGHT_V2_ = 126
NUM_1X_SPEED_50HZ_EXT_BATT_LOW_LIGHT_ = 13
NUM_1X_SPEED_50HZ_FULL_FRAME_LOW_LIGHT_V2_ = 123
NUM_1X_SPEED_50HZ_LONG_BATT_LOW_LIGHT_ = 23
NUM_1X_SPEED_50HZ_LONG_BATT_LOW_LIGHT_V2_ = 115
NUM_1X_SPEED_50HZ_LONG_BATT_LOW_LIGHT_V2_VERTICAL_ = 135
NUM_1X_SPEED_50HZ_LOW_LIGHT_ = 10
NUM_1X_SPEED_50HZ_LOW_LIGHT_V2_ = 107
NUM_1X_SPEED_50HZ_LOW_LIGHT_V2_VERTICAL_ = 119
NUM_1X_SPEED_EXT_BATT_LOW_LIGHT_ = 6
NUM_1X_SPEED_FULL_FRAME_LOW_LIGHT_V2_ = 122
NUM_1X_SPEED_LONG_BATT_LOW_LIGHT_ = 19
NUM_1X_SPEED_LONG_BATT_LOW_LIGHT_V2_ = 111
NUM_1X_SPEED_LONG_BATT_LOW_LIGHT_V2_VERTICAL_ = 134
NUM_1X_SPEED_LOW_LIGHT_ = 3
NUM_1X_SPEED_LOW_LIGHT_V2_ = 103
NUM_1X_SPEED_LOW_LIGHT_V2_VERTICAL_ = 118
NUM_2X_SLO_MO = 2
NUM_2X_SLO_MO_2_7K_50HZ_V2_ = 131
NUM_2X_SLO_MO_2_7K_V2_ = 130
NUM_2X_SLO_MO_4K_ = 24
NUM_2X_SLO_MO_4K_50HZ_ = 26
NUM_2X_SLO_MO_4K_50HZ_V2_ = 117
NUM_2X_SLO_MO_4K_V2_ = 116
NUM_2X_SLO_MO_50HZ_ = 9
NUM_2X_SLO_MO_50HZ_EXT_BATT_ = 12
NUM_2X_SLO_MO_50HZ_FULL_FRAME_V2_ = 125
NUM_2X_SLO_MO_50HZ_LONG_BATT_ = 22
NUM_2X_SLO_MO_50HZ_LONG_BATT_V2_ = 114
NUM_2X_SLO_MO_50HZ_LONG_BATT_V2_VERTICAL_ = 133
NUM_2X_SLO_MO_50HZ_V2_ = 106
NUM_2X_SLO_MO_50HZ_V2_VERTICAL_ = 121
NUM_2X_SLO_MO_EXT_BATT_ = 5
NUM_2X_SLO_MO_FULL_FRAME_V2_ = 124
NUM_2X_SLO_MO_LONG_BATT_ = 18
NUM_2X_SLO_MO_LONG_BATT_V2_ = 110
NUM_2X_SLO_MO_LONG_BATT_V2_VERTICAL_ = 132
NUM_2X_SLO_MO_SPEED_1_1_4K_50_FPS_V2_ = 141
NUM_2X_SLO_MO_SPEED_1_1_4K_60_FPS_V2_ = 140
NUM_2X_SLO_MO_SPEED_21_9_4K_50_FPS_V2_ = 149
NUM_2X_SLO_MO_SPEED_21_9_4K_60_FPS_V2_ = 148
NUM_2X_SLO_MO_SPEED_21_9_5_3K_50_FPS_V2_ = 145
NUM_2X_SLO_MO_SPEED_21_9_5_3K_60_FPS_V2_ = 144
NUM_2X_SLO_MO_SPEED_4_3_4K_50_FPS_V2_ = 157
NUM_2X_SLO_MO_SPEED_4_3_4K_60_FPS_V2_ = 156
NUM_2X_SLO_MO_V2_ = 102
NUM_2X_SLO_MO_V2_VERTICAL_ = 120
NUM_4X_SUPER_SLO_MO = 1
NUM_4X_SUPER_SLO_MO_2_7K_ = 25
NUM_4X_SUPER_SLO_MO_2_7K_50HZ_ = 27
NUM_4X_SUPER_SLO_MO_50HZ_ = 8
NUM_4X_SUPER_SLO_MO_50HZ_EXT_BATT_ = 11
NUM_4X_SUPER_SLO_MO_50HZ_LONG_BATT_ = 21
NUM_4X_SUPER_SLO_MO_50HZ_LONG_BATT_V2_ = 113
NUM_4X_SUPER_SLO_MO_50HZ_V2_ = 105
NUM_4X_SUPER_SLO_MO_EXT_BATT_ = 4
NUM_4X_SUPER_SLO_MO_LONG_BATT_ = 17
NUM_4X_SUPER_SLO_MO_LONG_BATT_V2_ = 109
NUM_4X_SUPER_SLO_MO_V2_ = 101
NUM_8X_ULTRA_SLO_MO = 0
NUM_8X_ULTRA_SLO_MO_50HZ_ = 7
NUM_8X_ULTRA_SLO_MO_50HZ_EXT_BATT_ = 15
NUM_8X_ULTRA_SLO_MO_50HZ_LONG_BATT_ = 20
NUM_8X_ULTRA_SLO_MO_50HZ_LONG_BATT_V2_ = 112
NUM_8X_ULTRA_SLO_MO_50HZ_V2_ = 104
NUM_8X_ULTRA_SLO_MO_EXT_BATT_ = 14
NUM_8X_ULTRA_SLO_MO_LONG_BATT_ = 16
NUM_8X_ULTRA_SLO_MO_LONG_BATT_V2_ = 108
NUM_8X_ULTRA_SLO_MO_V2_ = 100
class EasyNightPhoto(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
BURST = 2
NIGHT_PHOTO = 1
SUPER_PHOTO = 0
class EnableNightPhoto(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
OFF = 0
ON = 1
class FrameRate(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_100_0 = 2
NUM_120_0 = 1
NUM_200_0 = 13
NUM_240_0 = 0
NUM_24_0 = 10
NUM_25_0 = 9
NUM_300_0 = 17
NUM_30_0 = 8
NUM_360_0 = 16
NUM_400_0 = 15
NUM_50_0 = 6
NUM_60_0 = 5
class FramesPerSecond(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_100_0 = 2
NUM_120_0 = 1
NUM_200_0 = 13
NUM_240_0 = 0
NUM_24_0 = 10
NUM_25_0 = 9
NUM_300_0 = 17
NUM_30_0 = 8
NUM_360_0 = 16
NUM_400_0 = 15
NUM_50_0 = 6
NUM_60_0 = 5
class Framing(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
FULL_FRAME = 2
FULL_FRAME_1_1_V2 = 106
FULL_FRAME_8_7_V2 = 103
TRADITIONAL_4_3_V2 = 100
ULTRA_WIDESCREEN_21_9_V2 = 105
VERTICAL = 1
VERTICAL_9_16_V2 = 104
WIDESCREEN = 0
WIDESCREEN_16_9_V2 = 101
class Gps(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
OFF = 0
ON = 1
class Hindsight(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_15_SECONDS = 2
NUM_30_SECONDS = 3
OFF = 4
class Hypersmooth(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
AUTO_BOOST = 4
BOOST = 3
HIGH = 2
LOW = 1
OFF = 0
STANDARD = 100
class LapseMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LIGHT_PAINTING = 2
MAX_LIGHT_PAINTING = 6
MAX_STAR_TRAILS = 5
MAX_TIMEWARP = 4
MAX_VEHICLE_LIGHTS = 7
NIGHT_LAPSE_VIDEO = 9
STAR_TRAILS = 1
TIMEWARP = 0
TIME_LAPSE_VIDEO = 8
VEHICLE_LIGHTS = 3
class Led(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ALL_OFF = 4
ALL_ON = 3
BACK_ONLY = 100
FRONT_OFF_ONLY = 5
OFF = 0
ON = 2
class MaxLens(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
OFF = 0
ON = 1
class MaxLensMod(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ANAMORPHIC = 5
AUTO_DETECT = 100
MACRO = 4
MAX_LENS_1_0 = 1
MAX_LENS_2_0 = 2
MAX_LENS_2_5 = 3
ND_16 = 8
ND_32 = 9
ND_4 = 6
ND_8 = 7
NONE = 0
STANDARD_LENS = 10
class MaxLensModEnable(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
OFF = 0
ON = 1
class MediaFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NIGHT_LAPSE_PHOTO = 21
NIGHT_LAPSE_VIDEO = 26
TIME_LAPSE_PHOTO = 20
TIME_LAPSE_VIDEO = 13
class MultiShotAspectRatio(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_16_9 = 1
NUM_4_3 = 0
NUM_8_7 = 3
NUM_9_16 = 4
class MultiShotFraming(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_16_9 = 1
NUM_4_3 = 0
NUM_8_7 = 3
NUM_9_16 = 4
class NightlapseRate(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
AUTO = 3601
NUM_10_SECONDS = 10
NUM_15_SECONDS = 15
NUM_20_SECONDS = 20
NUM_2_MINUTES = 120
NUM_30_MINUTES = 1800
NUM_30_SECONDS = 30
NUM_4_SECONDS = 4
NUM_5_MINUTES = 300
NUM_5_SECONDS = 5
NUM_60_MINUTES = 3600
NUM_60_SECONDS = 100
class PhotoHorizonLeveling(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LOCKED = 2
OFF = 0
class PhotoIntervalDuration(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_15_MINUTES = 5
NUM_15_SECONDS = 1
NUM_1_HOUR = 7
NUM_1_MINUTE = 3
NUM_2_HOURS = 8
NUM_30_MINUTES = 6
NUM_30_SECONDS = 2
NUM_3_HOURS = 9
NUM_5_MINUTES = 4
OFF = 0
class PhotoLens(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LINEAR = 102
LINEAR_12_MP = 10
LINEAR_23_MP = 28
LINEAR_27_MP = 32
MAX_SUPERVIEW = 100
NARROW = 19
NUM_13MP_LINEAR = 38
NUM_13MP_ULTRA_LINEAR = 44
NUM_13MP_ULTRA_WIDE = 40
NUM_13MP_WIDE = 39
ULTRA_WIDE_12_MP = 41
WIDE = 101
WIDE_12_MP = 0
WIDE_23_MP = 27
WIDE_27_MP = 31
class PhotoMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
BURST = 2
NIGHT_PHOTO = 1
SUPERPHOTO = 0
class PhotoOutput(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
HDR = 2
RAW = 1
STANDARD = 0
SUPERPHOTO = 3
class PhotoSingleInterval(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_0_5S = 2
NUM_10S = 6
NUM_120S = 9
NUM_1S = 3
NUM_2S = 4
NUM_30S = 7
NUM_3S = 10
NUM_5S = 5
NUM_60S = 8
OFF = 0
class PhotoTimelapseRate(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_0_5_SECONDS = 110
NUM_10_SECONDS = 106
NUM_1_SECOND = 109
NUM_2_MINUTES = 103
NUM_2_SECONDS = 108
NUM_30_MINUTES = 101
NUM_30_SECONDS = 105
NUM_3_SECONDS = 11
NUM_5_MINUTES = 102
NUM_5_SECONDS = 107
NUM_60_MINUTES = 100
NUM_60_SECONDS = 104
class Profiles(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
HDR = 1
HLG_HDR = 101
LOG = 2
STANDARD = 0
class SettingId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ANTI_FLICKER = 134
AUTO_POWER_DOWN = 59
BIT_DEPTH = 183
CAMERA_VOLUME = 216
CONTROLS = 175
EASY_MODE_SPEED = 176
EASY_NIGHT_PHOTO = 191
ENABLE_NIGHT_PHOTO = 177
FRAMES_PER_SECOND = 3
FRAME_RATE = 234
FRAMING = 193
GPS = 83
HINDSIGHT = 167
HYPERSMOOTH = 135
LAPSE_MODE = 187
LED = 91
MAX_LENS = 162
MAX_LENS_MOD = 189
MAX_LENS_MOD_ENABLE = 190
MEDIA_FORMAT = 128
MULTI_SHOT_ASPECT_RATIO = 192
MULTI_SHOT_FRAMING = 233
NIGHTLAPSE_RATE = 32
PHOTO_HORIZON_LEVELING = 151
PHOTO_INTERVAL_DURATION = 172
PHOTO_LENS = 122
PHOTO_MODE = 227
PHOTO_OUTPUT = 125
PHOTO_SINGLE_INTERVAL = 171
PHOTO_TIMELAPSE_RATE = 30
PROFILES = 184
SETUP_LANGUAGE = 223
SETUP_SCREEN_SAVER = 219
STAR_TRAILS_LENGTH = 179
SYSTEM_VIDEO_MODE = 180
TIME_LAPSE_DIGITAL_LENSES = 123
VIDEO_ASPECT_RATIO = 108
VIDEO_BIT_RATE = 182
VIDEO_EASY_MODE = 186
VIDEO_FRAMING = 232
VIDEO_HORIZON_LEVELING = 150
VIDEO_LENS = 121
VIDEO_PERFORMANCE_MODE = 173
VIDEO_RESOLUTION = 2
VIDEO_TIMELAPSE_RATE = 5
WEBCAM_DIGITAL_LENSES = 43
WIRELESS_BAND = 178
class SetupLanguage(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
CHINESE = 8
ENGLISH_AUS = 2
ENGLISH_IND = 13
ENGLISH_UK = 1
ENGLISH_US = 0
FRENCH = 4
GERMAN = 3
ITALIAN = 5
JAPANESE = 9
KOREAN = 10
PORTUGUESE = 11
RUSSIAN = 12
SPANISH = 6
SPANISH_NA = 7
SWEDISH = 14
class SetupScreenSaver(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_1_MIN = 1
NUM_2_MIN = 2
NUM_3_MIN = 3
NUM_5_MIN = 4
class StarTrailsLength(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LONG = 2
MAX = 3
SHORT = 1
class SystemVideoMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
BASIC_QUALITY = 112
EXTENDED_BATTERY = 101
HIGHEST_QUALITY = 0
LONGEST_BATTERY = 102
STANDARD_QUALITY = 111
class TimeLapseDigitalLenses(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LINEAR = 102
LINEAR_27_MP = 32
MAX_SUPERVIEW = 100
NARROW = 19
WIDE = 101
WIDE_27_MP = 31
class VideoAspectRatio(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_16_9 = 1
NUM_1_1 = 6
NUM_21_9 = 5
NUM_4_3 = 0
NUM_8_7 = 3
NUM_9_16 = 4
class VideoBitRate(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
HIGH = 1
STANDARD = 0
class VideoEasyMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
BASIC_QUALITY = 2
HDR_VIDEO = 4
HIGHEST_QUALITY = 0
STANDARD_QUALITY = 1
STANDARD_VIDEO = 3
class VideoFraming(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_16_9 = 1
NUM_1_1 = 6
NUM_21_9 = 5
NUM_4_3 = 0
NUM_8_7 = 3
NUM_9_16 = 4
class VideoHorizonLeveling(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LOCKED = 2
OFF = 0
class VideoLens(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
HYPERVIEW = 9
LINEAR = 4
LINEAR_HORIZON_LEVELING = 8
LINEAR_HORIZON_LOCK = 10
MAX_HYPERVIEW = 11
MAX_SUPERVIEW = 7
NARROW = 2
SUPERVIEW = 3
ULTRA_HYPERVIEW = 104
ULTRA_LINEAR = 14
ULTRA_SUPERVIEW = 12
ULTRA_WIDE = 13
WIDE = 0
class VideoPerformanceMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
EXTENDED_BATTERY = 1
MAXIMUM_VIDEO_PERFORMANCE = 0
TRIPOD_STATIONARY_VIDEO = 2
class VideoResolution(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_1080 = 9
NUM_1080_9_16_V2 = 110
NUM_1440 = 7
NUM_2_7K = 4
NUM_2_7K_4_3 = 6
NUM_2_7K_4_3_V2 = 111
NUM_4K = 1
NUM_4K_1_1 = 37
NUM_4K_21_9 = 36
NUM_4K_4_3 = 18
NUM_4K_4_3_V2 = 112
NUM_4K_8_7 = 28
NUM_4K_8_7_V2 = 108
NUM_4K_9_16_V2 = 109
NUM_5K = 24
NUM_5K_4_3 = 25
NUM_5_3K = 100
NUM_5_3K_21_9 = 35
NUM_5_3K_4_3 = 27
NUM_5_3K_4_3_V2 = 113
NUM_5_3K_8_7 = 26
NUM_5_3K_8_7_V2 = 107
NUM_720 = 12
NUM_900 = 38
class VideoTimelapseRate(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_0_5_SECONDS = 0
NUM_10_SECONDS = 4
NUM_1_SECOND = 1
NUM_2_MINUTES = 7
NUM_2_SECONDS = 2
NUM_30_MINUTES = 9
NUM_30_SECONDS = 5
NUM_3_SECONDS = 11
NUM_5_MINUTES = 8
NUM_5_SECONDS = 3
NUM_60_MINUTES = 10
NUM_60_SECONDS = 6
class WebcamDigitalLenses(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
LINEAR = 4
NARROW = 2
SUPERVIEW = 3
WIDE = 0
class WirelessBand(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_2_4GHZ = 0
NUM_5GHZ = 1

Status-related constants

class CameraControlId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
CAMERA_CONTROL_CAMERA_IS_IN_A_MENU_OR_CHANGING_SETTINGS_TO_INTERVENE_APP_MUST_REQUEST_CONTROL = 1
CAMERA_EXTERNAL_CONTROL_AN_OUTSIDE_ENTITY_APP_HAS_CONTROL_AND_IS_IN_A_MENU_OR_MODIFYING_SETTINGS = 2
CAMERA_IDLE_NO_ONE_IS_ATTEMPTING_TO_CHANGE_CAMERA_SETTINGS = 0
class DisplayModStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_000_DISPLAY_MOD_0_HDMI_0_DISPLAY_MOD_CONNECTED_FALSE = 0
NUM_001_DISPLAY_MOD_0_HDMI_0_DISPLAY_MOD_CONNECTED_TRUE = 1
NUM_010_DISPLAY_MOD_0_HDMI_1_DISPLAY_MOD_CONNECTED_FALSE = 2
NUM_011_DISPLAY_MOD_0_HDMI_1_DISPLAY_MOD_CONNECTED_TRUE = 3
NUM_100_DISPLAY_MOD_1_HDMI_0_DISPLAY_MOD_CONNECTED_FALSE = 4
NUM_101_DISPLAY_MOD_1_HDMI_0_DISPLAY_MOD_CONNECTED_TRUE = 5
NUM_110_DISPLAY_MOD_1_HDMI_1_DISPLAY_MOD_CONNECTED_FALSE = 6
NUM_111_DISPLAY_MOD_1_HDMI_1_DISPLAY_MOD_CONNECTED_TRUE = 7
class LastPairingType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NOT_PAIRING = 0
PAIRING_APP = 1
PAIRING_BLUETOOTH_DEVICE = 3
PAIRING_REMOTE_CONTROL = 2
class LensType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ANAMORPHIC_LENS = 5
DEFAULT = 0
MACRO_LENS = 4
MAX_LENS = 1
MAX_LENS_2_0 = 2
MAX_LENS_2_5 = 3
NEUTRAL_DENSITY_16 = 8
NEUTRAL_DENSITY_32 = 9
NEUTRAL_DENSITY_4 = 6
NEUTRAL_DENSITY_8 = 7
class LiveviewExposureSelectMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
AUTO = 1
DISABLED = 0
HEMISPHERE = 3
ISO_LOCK = 2
class MediaModState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
MICROPHONE_ONLY = 2
MICROPHONE_REMOVED = 0
MICROPHONE_WITH_EXTERNAL_MICROPHONE = 3
class MicrophoneAccessory(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ACCESSORY_CONNECTED = 1
ACCESSORY_CONNECTED_AND_A_MICROPHONE_IS_PLUGGED_INTO_THE_ACCESSORY = 2
ACCESSORY_NOT_CONNECTED = 0
class Ota(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
DOWNLOADING = 1
DOWNLOAD_FAILED = 3
GOPRO_APP_DOWNLOADING = 6
GOPRO_APP_DOWNLOAD_FAILED = 8
GOPRO_APP_READY = 10
GOPRO_APP_VERIFYING = 7
GOPRO_APP_VERIFY_FAILED = 9
IDLE = 0
READY = 5
VERIFYING = 2
VERIFY_FAILED = 4
class PairingState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ABORTED = 2
CANCELLED = 3
COMPLETED = 4
NEVER_STARTED = 0
STARTED = 1
class PrimaryStorage(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
OK = 0
SD_CARD_BUSY = 4
SD_CARD_FORMAT_ERROR = 3
SD_CARD_FULL = 1
SD_CARD_REMOVED = 2
SD_CARD_SWAPPED = 8
UNKNOWN = -1
class Rotation(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_0_DEGREES_UPRIGHT_ = 0
NUM_180_DEGREES_UPSIDE_DOWN_ = 1
NUM_270_DEGREES_LAYING_ON_LEFT_SIDE_ = 3
NUM_90_DEGREES_LAYING_ON_RIGHT_SIDE_ = 2
class StatusId(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ACCESS_POINT_SSID = 30
ACTIVE_HILIGHTS = 58
AP_MODE = 69
BATTERY_PRESENT = 1
BUSY = 8
CAMERA_CONTROL_ID = 114
CAPTURE_DELAY_ACTIVE = 101
COLD = 85
CONNECTED_DEVICES = 31
CONNECTED_WIFI_SSID = 29
DISPLAY_MOD_STATUS = 110
ENCODING = 10
FLATMODE = 89
FTU = 79
GPS_LOCK = 68
HINDSIGHT = 106
LAST_PAIRING_SUCCESS = 21
LAST_PAIRING_TYPE = 20
LAST_WIFI_SCAN_SUCCESS = 23
LCD_LOCK = 11
LENS_TYPE = 105
LINUX_CORE = 104
LIVEVIEW_EXPOSURE_SELECT_MODE = 65
LIVEVIEW_X = 67
LIVEVIEW_Y = 66
LIVE_BURSTS = 100
LOCATE = 45
MEDIA_MOD_STATE = 102
MICROPHONE_ACCESSORY = 74
MINIMUM_STATUS_POLL_PERIOD = 60
MOBILE_FRIENDLY = 78
NUM_5GHZ_AVAILABLE = 81
OTA = 41
OTA_CHARGED = 83
OVERHEATING = 6
PAIRING_STATE = 19
PENDING_FW_UPDATE_CANCEL = 42
PHOTOS = 38
PHOTO_INTERVAL_CAPTURE_COUNT = 118
PHOTO_PRESET = 94
PRESET = 97
PRESET_GROUP = 96
PRESET_MODIFIED = 98
PREVIEW_STREAM = 32
PREVIEW_STREAM_AVAILABLE = 55
PRIMARY_STORAGE = 33
QUICK_CAPTURE = 9
READY = 82
REMAINING_LIVE_BURSTS = 99
REMAINING_PHOTOS = 34
REMAINING_VIDEO_TIME = 35
REMOTE_CONNECTED = 27
REMOTE_VERSION = 26
ROTATION = 86
SCHEDULED_CAPTURE = 108
SCHEDULED_CAPTURE_PRESET_ID = 107
SD_CARD_CAPACITY = 117
SD_CARD_ERRORS = 112
SD_CARD_REMAINING = 54
SD_CARD_WRITE_SPEED_ERROR = 111
TIMELAPSE_INTERVAL_COUNTDOWN = 49
TIMELAPSE_PRESET = 95
TIME_SINCE_LAST_HILIGHT = 59
TIME_WARP_SPEED = 103
TURBO_TRANSFER = 113
USB_CONNECTED = 115
USB_CONTROLLED = 116
VIDEOS = 39
VIDEO_ENCODING_DURATION = 13
VIDEO_PRESET = 93
WIFI_BARS = 56
WIFI_PROVISIONING_STATE = 24
WIFI_SCAN_STATE = 22
WIRELESS_BAND = 76
WIRELESS_CONNECTIONS_ENABLED = 17
ZOOM_AVAILABLE = 77
ZOOM_LEVEL = 75
ZOOM_WHILE_ENCODING = 88
class TimeWarpSpeed(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
AUTO = 10
NUM_10X = 9
NUM_150X = 3
NUM_15X = 0
NUM_1800X = 6
NUM_1X_REALTIME_ = 11
NUM_1_2X_SLOW_MOTION_ = 12
NUM_2X = 7
NUM_300X = 4
NUM_30X = 1
NUM_5X = 8
NUM_60X = 2
NUM_900X = 5
class UsbControlled(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
DISABLED = 0
ENABLED = 1
class WifiProvisioningState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ABORTED = 2
CANCELED = 3
COMPLETED = 4
NEVER_STARTED = 0
STARTED = 1
class WifiScanState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
ABORTED = 2
CANCELED = 3
COMPLETED = 4
NEVER_STARTED = 0
STARTED = 1
class WirelessBand(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
NUM_2_4_GHZ = 0
NUM_5_GHZ = 1

Exceptions

Exceptions that pertain to Gopro-level functionality.

exception ConnectFailed(connection: str, timeout: float, retries: int)

A BLE connection failed to establish

Parameters:
  • connection (str) – type of connection that failed

  • timeout (float) – the timeout used for each attempt

  • retries (int) – how many retries were attempted

exception ConnectionTerminated(message: str)

A connection that was previously established has terminated.

ExceptionHandler

Exception handler callback type

alias of Callable[[Exception], None]

exception FailedToFindDevice

The scan failed without finding a device.

exception GoProError

Base class for other GoPro-level exceptions.

exception GoProNotOpened(message: str)

A command was attempted without waiting for the GoPro instance to open.

exception InterfaceConfigFailure

An error has occurred while setting up the communication interface

exception InvalidConfiguration(message: str)

Something was attempted that is not possible for the current configuration.

exception InvalidOpenGoProVersion(version: str)

Attempt to access an invalid Open GoPro API version

exception ResponseParseError(identifier: str, data: bytearray, msg: str = '')

Error when parsing received data.

exception ResponseTimeout(timeout: float)

A response has timed out.

Common Interface

Parser Protocol and Bases

class BaseParser

Base Parser Interface

A parser is something that transforms input into a different type

abstract parse(data: T) T_co

Parse data into output type

Parameters:

data (T) – input data to parse

Returns:

parsed output

Return type:

T_co

class BaseTransformer

Transformer interface.

A transformer is something that transforms the input into the same output type

abstract transform(data: T) T

Transform data into output matching the input type

Parameters:

data (T) – data to transform

Returns:

transformed data

Return type:

T

class BytesBuilder(*args, **kwargs)

Base bytes serializer protocol definition

build(obj: Any) bytes

Build bytestream from object

Parameters:

obj (Any) – object to serialize

Returns:

serialized bytestream

Return type:

bytes

class BytesParser

Bytes to Target Type Parser Interface

class BytesParserBuilder(*args, **kwargs)

Class capable of both building / parsing bytes to / from object

abstract build(obj: Any) bytes

Build bytestream from object

Parameters:

obj (Any) – object to serialize

Returns:

serialized bytestream

Return type:

bytes

abstract parse(data: bytes) T_co

Parse input bytes to output

Parameters:

data (bytes) – data to parsed

Returns:

parsed output

Return type:

T_co

class BytesTransformer

Bytes to Bytes transformer interface

class GlobalParsers

Parsers that relate globally to ID’s as opposed to contextualized per-message

This is intended to be used as a singleton, i.e. not instantiated

classmethod add(identifier: CmdId | QueryCmdId | ActionId | StatusId | SettingId | BleUUID | str | Enum, parser: Parser) None

Add a global parser that can be accessed by this class’s class methods

Parameters:
  • identifier (ResponseType) – identifier to add parser for

  • parser (Parser) – parser to add

classmethod add_feature_action_id_mapping(feature_id: FeatureId, action_id: ActionId) None

Add a feature id-to-action id mapping entry

Parameters:
  • feature_id (FeatureId) – Feature ID of protobuf command

  • action_id (ActionId) – Action ID of protobuf command

classmethod get_parser(identifier: CmdId | QueryCmdId | ActionId | StatusId | SettingId | BleUUID | str | Enum) Parser | None

Get a globally defined parser for the given ID.

Currently, only BLE uses globally defined parsers

Parameters:

identifier (ResponseType) – ID to get parser for

Returns:

parser if found, else None

Return type:

Parser | None

classmethod get_query_container(identifier: CmdId | QueryCmdId | ActionId | StatusId | SettingId | BleUUID | str | Enum) Callable | None

Attempt to get a callable that will translate an input value to the ID-appropriate value.

For example, _get_query_container(SettingId.VIDEO_RESOLUTION) will return open_gopro.constants.settings.VideoResolution

As another example, _get_query_container(StatusId.TURBO_TRANSFER) will return bool()

Note! Not all ID’s are currently parsed so None will be returned if the container does not exist

Parameters:

identifier (ResponseType) – identifier to find container for

Returns:

container if found else None

Return type:

Callable | None

class JsonParser

Json to Target Type Parser Interface

class JsonTransformer

Json to json transformer interface

class Parser(byte_transformers: list[BytesTransformer] | None = None, byte_json_adapter: BytesParser[dict[str, Any]] | None = None, json_transformers: list[JsonTransformer] | None = None, json_parser: JsonParser[T] | None = None)

The common monolithic Parser that is used for all byte and json parsing / transforming

Algorithm is:
  1. Variable number of byte transformers (bytes –> bytes)

  2. One bytes Json adapter (bytes –> json)

  3. Variable number of json transformers (json –> json)

  4. One JSON parser (json -> Any)

Parameters:
  • byte_transformers (list[BytesTransformer] | None) – bytes –> bytes. Defaults to None.

  • byte_json_adapter (BytesParser[JsonDict] | None) – bytes –> json. Defaults to None.

  • json_transformers (list[JsonTransformer] | None) – json –> json. Defaults to None.

  • json_parser (JsonParser[T] | None) – json –> T. Defaults to None.

parse(data: bytes | bytearray | dict[str, Any]) T

Perform the parsing using the stored transformers and parsers

Parameters:

data (bytes | bytearray | JsonDict) – input bytes or json to parse

Raises:

RuntimeError – attempted to parse bytes when a byte-json adapter does not exist

Returns:

final parsed output

Return type:

T

class GoProBase(**kwargs: Any)

The base class for communicating with all GoPro Clients

abstract property ble_command: BleCommands

Used to call the BLE commands

Returns:

the commands

Return type:

BleCommands

abstract property ble_setting: BleSettings

Used to access the BLE settings

Returns:

the settings

Return type:

BleSettings

abstract property ble_status: BleStatuses

Used to access the BLE statuses

Returns:

the statuses

Return type:

BleStatuses

abstract async close() None

Gracefully close the GoPro Client connection

abstract async configure_cohn(timeout: int = 60) bool

Prepare Camera on the Home Network

Provision if not provisioned Then wait for COHN to be connected and ready

Parameters:

timeout (int) – time in seconds to wait for COHN to be ready. Defaults to 60.

Returns:

True if success, False otherwise

Return type:

bool

abstract property http_command: HttpCommands

Used to access the Wifi commands

Returns:

the commands

Return type:

HttpCommands

abstract property http_setting: HttpSettings

Used to access the Wifi settings

Returns:

the settings

Return type:

HttpSettings

abstract property identifier: str

Unique identifier for the connected GoPro Client

Returns:

identifier

Return type:

str

abstract property is_ble_connected: bool

Are we connected via BLE to the GoPro device?

Returns:

True if yes, False if no

Return type:

bool

abstract property is_cohn_provisioned: bool

Is COHN currently provisioned?

Get the current COHN status from the camera

Returns:

True if COHN is provisioned, False otherwise

Return type:

bool

abstract property is_http_connected: bool

Are we connected via HTTP to the GoPro device?

Returns:

True if yes, False if no

Return type:

bool

abstract property is_open: bool

Is this client ready for communication?

Returns:

True if yes, False if no

Return type:

bool

abstract property is_ready: bool

Is gopro ready to receive commands

Returns:

yes if ready, no otherwise

Return type:

bool

abstract async open(timeout: int = 10, retries: int = 5) None

Connect to the GoPro Client and prepare it for communication

Parameters:
  • timeout (int) – time before considering connection a failure. Defaults to 10.

  • retries (int) – number of connection retries. Defaults to 5.

property version: str

The API version that the connected camera supports

Only 2.0 is currently supported

Returns:

supported version

Return type:

str

class GoProBle(controller: BLEController, disconnected_cb: Callable[[BleDevice], None], notification_cb: Callable[[int, bytearray], None], target: Pattern | BleDevice)

GoPro specific BLE Client

Parameters:
  • controller (BLEController) – controller implementation to use for this client

  • disconnected_cb (DisconnectHandlerType) – disconnected callback

  • notification_cb (NotiHandlerType) – notification callback

  • target (Pattern | BleDevice) – regex or device to connect to

class GoProHttp

Interface definition for all HTTP communicators

class GoProWifi(controller: WifiController)

GoPro specific WiFi Client

Parameters:

controller (WifiController) – instance of Wifi Controller to use for this client

property password: str | None

Get the GoPro AP’s password

Returns:

password or None if it is not known

Return type:

str | None

property ssid: str | None

Get the GoPro AP’s WiFi SSID

Returns:

SSID or None if it is not known

Return type:

str | None

class GoProWiredInterface

The top-level interface for a Wired Open GoPro controller

class GoProWirelessInterface(ble_controller: BLEController, wifi_controller: WifiController | None, disconnected_cb: Callable[[BleDevice], None], notification_cb: Callable[[int, bytearray], None], target: Pattern | BleDevice)

The top-level interface for a Wireless Open GoPro controller

This always supports BLE and can optionally support Wifi

Parameters:
  • ble_controller (BLEController) – BLE controller instance

  • wifi_controller (WifiController | None) – Wifi controller instance

  • disconnected_cb (DisconnectHandlerType) – callback for BLE disconnects

  • notification_cb (NotiHandlerType) – callback for BLE received notifications

  • target (Pattern | BleDevice) – BLE device to search for

class BaseGoProCommunicator

Common Communicator interface

abstract register_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]], update: SettingId | StatusId | ActionId) None

Register for callbacks when an update occurs

Parameters:
  • callback (UpdateCb) – callback to be notified in

  • update (UpdateType) – update to register for

abstract unregister_update(callback: Callable[[SettingId | StatusId | ActionId, Any], Coroutine[Any, Any, None]], update: SettingId | StatusId | ActionId | None = None) None

Unregister for asynchronous update(s)

Parameters:
  • callback (UpdateCb) – callback to stop receiving update(s) on

  • update (UpdateType | None) – updates to unsubscribe for. Defaults to None (all updates that use this callback will be unsubscribed).

BLE Interface

BLE Controller Interface Definition.

class BLEController(exception_handler: Callable | None = None)

Interface definition for a BLE driver to be used by GoPro.

abstract async connect(disconnect_cb: Callable[[BleDevice], None], device: BleDevice, timeout: int = 15) BleHandle

Connect to a BLE device.

Parameters:
  • disconnect_cb (DisconnectHandlerType) – function to call when disconnect is received

  • device (BleDevice) – device to connect to

  • timeout (int) – How long to attempt connecting before giving up. Defaults to 15.

Returns:

handle that has been connected to

Return type:

BleHandle

abstract async disconnect(handle: BleHandle) None

Terminate the BLE connection.

Parameters:

handle (BleHandle) – handle to disconnect from

abstract async discover_chars(handle: BleHandle, uuids: type[UUIDs] | None = None) GattDB

Discover all characteristics for a connected handle.

By default, the BLE controller only knows Spec-Defined BleUUID’s so any additional BleUUID’s should be passed in with the uuids argument

Parameters:
  • handle (BleHandle) – BLE handle to discover for

  • uuids (type[UUIDs] | None) – Additional BleUUID information to use when building the Gatt Database. Defaults to None.

Returns:

Gatt Database

Return type:

GattDB

abstract async enable_notifications(handle: BleHandle, handler: Callable[[int, bytearray], None]) None

Enable notifications for all notifiable characteristics.

The handler is used to register for notifications. It will be called when a a notification is received.

Parameters:
  • handle (BleHandle) – handle to enable notifications on

  • handler (NotiHandlerType) – notification handler

abstract async pair(handle: BleHandle) None

Pair to an already connected handle.

Parameters:

handle (BleHandle) – handle to pair to

abstract async read(handle: BleHandle, uuid: BleUUID) bytes

Read a bytestream response from a BleUUID.

Parameters:
  • handle (BleHandle) – handle to pair to

  • uuid (BleUUID) – BleUUID to read from

Returns:

response

Return type:

bytes

abstract async scan(token: Pattern, timeout: int = 5, service_uuids: list[BleUUID] | None = None) BleDevice

Scan BLE device with a regex in it’s device name.

Parameters:
  • token (Pattern) – Regex to scan for

  • timeout (int) – Time to scan (in seconds) before considering scanning as failed. Defaults to 5.

  • service_uuids (list[BleUUID] | None) – The list of BleUUID’s to filter on. Defaults to None.

Returns:

discovered device (shall not be multiple devices)

Return type:

BleDevice

abstract async write(handle: BleHandle, uuid: BleUUID, data: bytes) None

Write a bytestream to a BleUUID.

Parameters:
  • handle (BleHandle) – handle to pair to

  • uuid (BleUUID) – BleUUID to write to

  • data (bytes) – bytestream to write

Generic BLE Client definition that is composed of a BLE Controller.

class BleClient(controller: BLEController, disconnected_cb: Callable[[BleDevice], None], notification_cb: Callable[[int, bytearray], None], target: tuple[Pattern | BleDevice, list[BleUUID] | None], uuids: type[UUIDs] | None = None)

A BLE device that is to be connected to.

Parameters:
  • controller (BLEController) – controller implementation to use for this client

  • disconnected_cb (DisconnectHandlerType) – disconnected callback

  • notification_cb (NotiHandlerType) – notification callback

  • target (tuple[Pattern | BleDevice, list[BleUUID] | None]) – Tuple of: (device, service_uuids) where device is the BLE device (or regex) to connect to and service_uuids is a list of service uuid’s to filter for

  • uuids (type[UUIDs] | None) – Additional UUIDs that will be used when discovering characteristic. Defaults to None in which case any unknown UUIDs will be set to “unknown”.

Raises:

ValueError – Must pass a valid target

async close() None

Close the client resource.

This should always be called before exiting.

property gatt_db: GattDB

Return the attribute table

Raises:

RuntimeError – GATT table hasn’t been discovered

Returns:

table of BLE attributes

Return type:

GattDB

property identifier: str | None

A string that identifies the GoPro

Returns:

identifier or None if client has not yet been discovered

Return type:

Optional[str]

property is_connected: bool

Is BLE currently connected?

Returns:

True if yes, False if no

Return type:

bool

property is_discovered: bool

Has the target been discovered (via BLE scanning)?

Returns:

True if yes, False if no

Return type:

bool

async open(timeout: int = 10, retries: int = 5) None

Open the client resource so that it is ready to send and receive data.

Parameters:
  • timeout (int) – How long to try connecting (in seconds) before retrying. Defaults to 10.

  • retries (int) – How many retries to attempt before giving up. Defaults to 5

Raises:

ConnectFailed – The BLE connection was not able to establish

async read(uuid: BleUUID) bytes

Read byte data from a characteristic (identified by BleUUID)

Parameters:

uuid (BleUUID) – characteristic to read

Returns:

byte data that was read

Return type:

bytes

services_as_csv(file: Path = PosixPath('services.csv')) None

Dump the services as a .csv

Parameters:

file (Path) – Where to dump the csv. Defaults to Path(“services.csv”).

async write(uuid: BleUUID, data: bytes) None

Write byte data to a characteristic (identified by BleUUID)

Parameters:
  • uuid (BleUUID) – characteristic to write to

  • data (bytes) – byte data to write

BLEServices

Objects to nicely interact with BLE services, characteristics, and attributes.

class BleUUID(name: str, format: Format = Format.BIT_128, hex: str | None = None, bytes: bytes | None = None, bytes_le: bytes | None = None, int: int | None = None)

An extension of the standard UUID to associate a string name with the UUID and allow 8-bit UUID input

Can only be initialized with one of [hex, bytes, bytes_le, int]

Parameters:
  • name (str) – human readable name

  • format (BleUUID.Format) – 16 or 128 bit format. Defaults to BleUUID.Format.BIT_128.

  • hex (str | None) – build from hex string. Defaults to None.

  • bytes (bytes | None) – build from big-endian bytes. Defaults to None.

  • bytes_le (bytes | None) – build from little-endian bytes. Defaults to None.

  • int (int | None) – build from int. Defaults to None.

Raises:

ValueError – Attempt to initialize with more than one option or badly formed input

class Format(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Used to specify 8-bit or 128-bit UUIDs

property format: Format

Is this a 16 bit or 128 bit UUID?

Returns:

format of UUID

Return type:

BleUUID.Format

class CharProps(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

BLE Spec-Defined Characteristic Property bitmask values

class Characteristic(handle: int, uuid: BleUUID, props: CharProps, value: bytes | None = None, init_descriptors: dataclasses.InitVar[list[open_gopro.ble.services.Descriptor] | None] = None, descriptor_handle: int | None = None)

A BLE characteristic.

handle

the handle of the attribute table that the characteristic resides at

Type:

int

uuid

the BleUUID of the characteristic

Type:

BleUUID

props

the characteristic’s properties (READ, WRITE, NOTIFY, etc)

Type:

CharProps

value

the current byte stream value of the characteristic value

Type:

bytes | None

init_descriptors

Descriptors known at initialization (can also be set later using the descriptors property)

Type:

InitVar[list[Descriptor] | None]

descriptor_handle

handle of this characteristic’s declaration descriptor. If not passed, defaults to handle + 1

Type:

int | None

property cccd_handle: int

What is this characteristics CCCD (client characteristic configuration descriptor) handle

Returns:

the CCCD handle

Return type:

int

property descriptors: dict[BleUUID, Descriptor]

Return uuid-to-descriptor mapping

Returns:

dictionary of descriptors indexed by BleUUID

Return type:

dict[BleUUID, Descriptor]

property is_indicatable: bool

Does this characteristic have indicatable property?

Returns:

True if indicatable, False if not

Return type:

bool

property is_notifiable: bool

Does this characteristic have notifiable property?

Returns:

True if notifiable, False if not

Return type:

bool

property is_readable: bool

Does this characteristic have readable property?

Returns:

True if readable, False if not

Return type:

bool

property is_writeable: bool

Does this characteristic have writeable property?

That is, does it have writeable-with-response or writeable-without-response property

Returns:

True if writeable, False if not

Return type:

bool

property is_writeable_with_response: bool

Does this characteristic have writeable-with-response property?

Returns:

True if writeable-with-response, False if not

Return type:

bool

property is_writeable_without_response: bool

Does this characteristic have writeable-without-response property?

Returns:

True if writeable-without-response, False if not

Return type:

bool

property name: str

What is the human-readable name of this characteristic?

Returns:

characteristic’s name

Return type:

str

class Descriptor(handle: int, uuid: BleUUID, value: bytes | None = None)

A characteristic descriptor.

handle

the handle of the attribute table that the descriptor resides at

Type:

int

uuid

BleUUID of this descriptor

Type:

BleUUID

value

the byte stream value of the descriptor

Type:

bytes | None

property name: str

What is the human-readable name of this characteristic?

Returns:

characteristic’s name

Return type:

str

class GattDB(init_services: list[Service])

The attribute table to store / look up BLE services, characteristics, and attributes.

Parameters:

init_services (list[Service]) – A list of services known at instantiation time. Can be updated later with the services property

class CharacteristicView(db: GattDB)

Represent the GattDB mapping as characteristics indexed by BleUUID

items() Generator[tuple[BleUUID, Characteristic], None, None]

Generate dict-like items view

Returns:

items generator

Return type:

Generator[tuple[BleUUID, Characteristic], None, None]

keys() Generator[BleUUID, None, None]

Generate dict-like keys view

Returns:

keys generator

Return type:

Generator[BleUUID, None, None]

values() Generator[Characteristic, None, None]

Generate dict-like values view

Returns:

values generator

Return type:

Generator[Characteristic, None, None]

dump_to_csv(file: Path = PosixPath('attributes.csv')) None

Dump discovered services to a csv file.

Parameters:

file (Path) – File to write to. Defaults to “./attributes.csv”.

handle2uuid(handle: int) BleUUID

Get a BleUUID from a handle.

Parameters:

handle (int) – the handle to search for

Raises:

KeyError – No characteristic was found at this handle

Returns:

The found BleUUID

Return type:

BleUUID

property services: dict[BleUUID, Service]

Return uuid-to-service mapping

Returns:

Dict of services indexed by uuid

Return type:

dict[BleUUID, Service]

uuid2handle(ble_uuid: BleUUID) int

Convert a handle to a BleUUID

Parameters:

ble_uuid (BleUUID) – BleUUID to translate

Returns:

the handle in the Gatt Database where this BleUUID resides

Return type:

int

class Service(uuid: BleUUID, start_handle: int, end_handle: int = 65535, init_chars: dataclasses.InitVar[Optional[list[open_gopro.ble.services.Characteristic]]] = None)

A BLE service or grouping of Characteristics.

uuid

the service’s BleUUID

Type:

BleUUID

start_handle

the attribute handle where the service begins

Type:

int

end_handle

the attribute handle where the service ends. Defaults to 0xFFFF.

Type:

int

init_chars

list of characteristics known at service instantiation. Can be set later with the characteristics property

Type:

InitVar[Optional[list[Characteristic]]]

property characteristics: dict[BleUUID, Characteristic]

Return uuid-to-characteristic mapping

Returns:

Dict of characteristics indexed by uuid

Return type:

dict[BleUUID, Characteristic]

property name: str

What is the human-readable name of this characteristic?

Returns:

characteristic’s name

Return type:

str

class SpecUuidNumber(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

BLE Spec-Defined BleUUID Number values as ints

class UUIDs(*_: Any)

BLE Spec-defined UUIDs that are common across all applications.

Also functions as a dict to look up UUID’s by str, int, or BleUUID

class UUIDsMeta(name, bases, dct)

The metaclass used to build a UUIDs container

Upon creation of a new UUIDs class, this will store the BleUUID names in an internal mapping indexed by UUID as int

WiFi Interface

Wifi Controller Interface Definition.

class SsidState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Current state of the SSID

class WifiController(interface: str | None = None, password: str | None = None)

Interface definition for a Wifi driver to be used by GoPro.

Parameters:
  • interface (str | None) – Wifi interface to use. Defaults to None (auto-detect).

  • password (str | None) – user password to use for sudo. Defaults to None.

abstract available_interfaces() list[str]

Return a list of available Wifi Interface strings

Returns:

list of interfaces

Return type:

list[str]

abstract connect(ssid: str, password: str, timeout: float = 15) bool

Connect to a network.

Parameters:
  • ssid (str) – SSID of network to connect to

  • password (str) – password of network to connect to

  • timeout (float) – Time before considering connection failed (in seconds). Defaults to 15.

Returns:

True if successful, False otherwise

Return type:

bool

abstract current() tuple[str | None, SsidState]

Return the SSID and state of the current network.

Returns:

Tuple of SSID str and state. If SSID is None, there is no current connection.

Return type:

tuple[Optional[str], SsidState]

abstract disconnect() bool

Disconnect from a network.

Returns:

True if successful, False otherwise

Return type:

bool

property interface: str

Get the Wifi Interface

Returns:

interface

Return type:

str

abstract property is_on: bool

Is the wireless driver currently enabled.

Returns:

True if yes. False if no.

Return type:

bool

abstract power(power: bool) bool

Enable / disable the wireless driver.

Parameters:

power (bool) – Enable if True. Disable if False.

Returns:

was the power request successful?

Return type:

bool

property sudo: str

Return the sudo encapsulated password

Returns:

echo “******” | sudo -S

Return type:

str

Open GoPro WiFi Client Implementation

class WifiClient(controller: WifiController)

A Wifi client that is composed of, among other things, a Wifi interface

The interface is generic and can be set with the ‘controller’ argument

Parameters:

controller (WifiController) – controller implementation to use for this client

close() None

Close the client resource.

This should always be called before exiting.

property is_connected: bool

Is the WiFi connection currently established?

Returns:

True if yes, False if no

Return type:

bool

open(ssid: str, password: str, timeout: int = 15, retries: int = 5) None

Open the WiFi client resource so that it is ready to send and receive data

Parameters:
  • ssid (str) – [description]

  • password (str) – [description]

  • timeout (int) – [description]. Defaults to 15.

  • retries (int) – [description]. Defaults to 5.

Raises:

ConnectFailed – [description]