Skip to main content

Python SDK for Oppo UDP Devices

Project description

oppoudpsdk

Python SDK for Oppo UDP-20x media devices. The primary goal is to use this to power integrations for Home Assistant.

Installation

pip install oppoudpsdk

Usage

Simple example

async def main():
  logging.basicConfig(level=logging.DEBUG, format='%(asctime)-15s %(levelname)-8s %(message)s')

  loop = asyncio.get_event_loop()
  client = OppoClient(HOST_NAME, 23, loop)
  client.add_event_handler(EVENT_DEVICE_STATE_UPDATED, on_device_state_updated)
  await asyncio.ensure_future(client.async_run_client(), loop=loop)

if __name__ == "__main__":
  asyncio.run(main())

Please see simple_example.py for a full working example of usage of this library.

Objects

OppoClient(host_name, port_number = 23, mac_address = None, event_loop = None)

The main client class that initiates and maintains a connection with the Oppo device. Handles the raw communications between the client and the device.

OppoDevice(client, mac_addr)

A class that describes a media device. This is abstracted from the client so that the media functionality is isolated from the communications infrastructure.

API Overview

Please refer to this document for the Oppo IP control API: http://download.oppodigital.com/UDP203/OPPO_UDP-20X_RS-232_and_IP_Control_Protocol.pdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oppoudpsdk-0.1.19.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oppoudpsdk-0.1.19-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file oppoudpsdk-0.1.19.tar.gz.

File metadata

  • Download URL: oppoudpsdk-0.1.19.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for oppoudpsdk-0.1.19.tar.gz
Algorithm Hash digest
SHA256 6c6934b3990a962ba93196cf0fb61f20344ed05d6a983b6d7d5d4ab5132e48de
MD5 d28c84bceac8675d131cab19a144ee9e
BLAKE2b-256 87a087398be57a24644c7843ecafca9d5d11887d4e80874e20727b86a673eb7b

See more details on using hashes here.

File details

Details for the file oppoudpsdk-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: oppoudpsdk-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for oppoudpsdk-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 0370bb26a906fb1e5476a0da6f34c98b7062b62bd6479811c28eaca1b7de0b07
MD5 658069195784e342e72c97c2892d41cb
BLAKE2b-256 7921b114a514841f9af29ebdfdea17b0a7e5dc2b392a9d61321b3d90f9a8b65a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page