Skip to main content

Control Hisense VIDAA TVs via MQTT over TLS

Project description

vidaa-control

Python 3.9+ License: MIT

Python library for controlling Hisense/Vidaa Smart TVs. Communicates directly with the TV's built-in MQTT-over-TLS broker — no cloud, no external broker needed.

Used by the ha-vidaa-tv Home Assistant integration.

Features

  • Direct SSL connection to the TV's built-in broker (port 36669)
  • Auto-discovery via SSDP and UDP broadcast
  • PIN pairing — authenticate via TV screen, tokens persisted automatically
  • Protocol detection — supports modern, middle, and legacy Vidaa firmware
  • 48 remote keys — power, navigation, playback, numbers, colors, etc.
  • Volume control — get/set/mute with state tracking
  • Input source switching — HDMI, TV, AV, Component
  • App launching — Netflix, YouTube, Prime Video, Disney+, and more
  • Wake-on-LAN — power on from standby
  • Sync and async clientsVidaaTV and AsyncVidaaTV
  • CLI toolvidaa command for interactive control

Installation

pip install git+https://github.com/tombabolewski/vidaa-control.git

Quick Start

CLI

# Discover TVs on the network
vidaa discover

# Pair with a TV (shows PIN on TV screen)
vidaa pair 192.168.1.225

# Send commands
vidaa key home
vidaa volume 25
vidaa launch netflix
vidaa source hdmi1

Python (sync)

from vidaa import VidaaTV

tv = VidaaTV(
    host="192.168.1.225",
    mac_address="AA:BB:CC:DD:EE:FF",
    use_dynamic_auth=True,
)

if tv.connect():
    tv.power_on()
    tv.set_volume(25)
    tv.launch_app("netflix")
    tv.disconnect()

Python (async)

from vidaa import AsyncVidaaTV
from vidaa.config import TokenStorage

tv = AsyncVidaaTV(
    host="192.168.1.225",
    mac_address="AA:BB:CC:DD:EE:FF",
    use_dynamic_auth=True,
    enable_persistence=True,
    storage=TokenStorage("tokens.json"),
)

if await tv.async_connect():
    state = await tv.async_get_state()
    volume = await tv.async_get_volume()
    await tv.async_launch_app("youtube")
    await tv.async_disconnect()

Remote Keys

48 keys available via send_key() / async_send_key():

Category Keys
Power KEY_POWER
Navigation KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_OK, KEY_BACK, KEY_MENU, KEY_HOME, KEY_EXIT
Volume KEY_VOLUME_UP, KEY_VOLUME_DOWN, KEY_MUTE
Channel KEY_CHANNEL_UP, KEY_CHANNEL_DOWN
Playback KEY_PLAY, KEY_PAUSE, KEY_STOP, KEY_FAST_FORWARD, KEY_REWIND
Numbers KEY_0 through KEY_9
Colors KEY_RED, KEY_GREEN, KEY_YELLOW, KEY_BLUE
Extras KEY_INFO, KEY_SUBTITLE

Protocol

Communication uses MQTT over TLS on port 36669. The library bundles the required client certificates. Authentication is handled automatically:

  1. Discovery — SSDP or UDP broadcast finds TVs
  2. Protocol detection — HTTP probe determines firmware generation
  3. Pairing — TV displays PIN, client authenticates
  4. Token persistence — auth tokens stored for reconnection

See docs/PROTOCOL.md for the full protocol analysis.

License

MIT

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

vidaa_control-1.1.0.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

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

vidaa_control-1.1.0-py3-none-any.whl (55.0 kB view details)

Uploaded Python 3

File details

Details for the file vidaa_control-1.1.0.tar.gz.

File metadata

  • Download URL: vidaa_control-1.1.0.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for vidaa_control-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7870ed5a2783875a016bacad59e41f1f0edd3486a177cf13f4c5f4b898830ccf
MD5 f17c5e42c1c9b12f56c5e4aaafd3fbd0
BLAKE2b-256 cb52116286b73172c2090f8d1a2af78c1965b7b6bfe59f11fd7c64aec6b80b9a

See more details on using hashes here.

File details

Details for the file vidaa_control-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: vidaa_control-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for vidaa_control-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b54659e400a6509965bc928519750efa8849683d7c0d1f4d9b291a22a11c1e1
MD5 213a24ef4ee45fdbe35e2bbf7a306988
BLAKE2b-256 65e61e550b27425fc031ddc089fd61b7f8e70a4bc61c1f2876efd551e2213efe

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