pyvidaa
Python library (pyvidaa) and Docker MQTT bridge (hisense2mqtt) for controlling
Hisense/Vidaa Smart TVs over MQTT.
Home Assistant users: the native HA custom component now lives in its own repository, ha_vidaatv (installable via HACS). This repository is the underlying library and the standalone MQTT bridge.
Disclaimer: pyvidaa is an independent, community-maintained project and is not affiliated with, endorsed by, or sponsored by Hisense or VIDAA. "VIDAA" and "Hisense" are trademarks of their respective owners; their use here is purely descriptive.
Features
- SSDP Auto-Discovery - TVs automatically detected on network
- PIN Pairing - Secure authentication via TV screen
- Control Hisense/Vidaa TVs via MQTT (optional bridge mode)
- Power on/off (with Wake-on-LAN support)
- Volume control and mute
- Input source switching
- App launching (Netflix, YouTube, etc.)
- Navigation keys (up, down, left, right, ok, back, home, menu)
- Multi-TV support
- Docker deployment ready (MQTT bridge)
Obtaining the client certificate
Modern Vidaa TVs require mutual TLS — the client must present a certificate and private key that are built into the official Vidaa mobile app. For legal reasons pyvidaa does not ship this certificate; you supply your own copy. (Older, legacy-protocol TVs may connect without it; when it is missing pyvidaa logs a warning and falls back to plain TLS.)
Where pyvidaa looks for it
pyvidaa searches for vidaa_client.pem (certificate) and vidaa_client.key
(private key), in this order:
- Paths passed explicitly —
certfile=/keyfile=in the library, or the certificate step of the Home Assistant config flow. $PYVIDAA_CERT_DIR~/.config/pyvidaa/certs/← recommended for CLI / bridge installs./certs/next to a source checkout (development only)
mkdir -p ~/.config/pyvidaa/certs
cp vidaa_client.pem vidaa_client.key ~/.config/pyvidaa/certs/
For the Home Assistant integration, place the files under your HA config directory as prompted by the setup flow.
Extracting it from the Vidaa app
The certificate ships inside the Vidaa Android app as a PKCS#12 keystore
(client_mobile_android.p12):
-
Obtain the Vidaa app APK and unzip it (
unzip vidaa.apk). -
Locate
client_mobile_android.p12among the app's assets. -
Convert it to the PEM certificate + unencrypted key pyvidaa expects:
# certificate openssl pkcs12 -in client_mobile_android.p12 -clcerts -nokeys -out vidaa_client.pem # private key (unencrypted PKCS#8) openssl pkcs12 -in client_mobile_android.p12 -nocerts -nodes -out vidaa_client.key
The keystore password and further APK details are documented in
VIDAA_PROTOCOL_ANALYSIS.md. The certificate remains
the property of its owner and is not redistributed by this project.
Server certificate verification (optional)
The TV's own (self-signed) server certificate is issued by the same private
RemoteCA root. That root is a public certificate with no private key, so it
is shipped with pyvidaa. By default server verification is off (verify_ssl=False),
matching the official app's behavior. Pass verify_ssl=True to validate the TV's
certificate against the bundled RemoteCA (the hostname check is always skipped,
since the certificate's CN is RemoteCA rather than the TV's IP):
tv = VidaaTV("192.168.1.50", certfile=..., keyfile=..., verify_ssl=True)
Quick Start
1. Prerequisites
- Paired UUID: You must first pair a device with your TV using the official Vidaa app
- TV IP Address: Your TV's IP address (static IP recommended)
- MQTT Broker: Mosquitto or Home Assistant's built-in broker
- Docker (recommended) or Python 3.8+
2. Configure
Copy the example config and edit:
cp config.example.yaml config.yaml
nano config.yaml
Minimum required settings:
mqtt:
host: "192.168.1.100" # Your MQTT broker IP
tv:
host: "YOUR_TV_IP" # Your TV's IP address
uuid: "xx:xx:xx:xx:xx:xx" # UUID from Vidaa app pairing
mac: "XX:XX:XX:XX:XX:XX" # TV MAC for Wake-on-LAN
name: "Living Room TV"
3. Run with Docker
docker compose up -d
View logs:
docker compose logs -f
4. Home Assistant (via the MQTT bridge)
With the bridge running, the TV automatically appears in Home Assistant via MQTT discovery — no custom component required. You'll get:
- Media Player entity with power, volume, source controls
- Navigation Buttons for remote control
- App Launcher select for streaming apps
Manual Installation
If not using Docker:
# Install dependencies
pip install -r requirements.txt
# Run
python -m hisense2mqtt --config config.yaml
Configuration
See docs/CONFIGURATION.md for full configuration reference.
Environment Variables
Override config via environment:
| Variable | Description |
|---|---|
MQTT_HOST |
MQTT broker hostname |
MQTT_PORT |
MQTT broker port |
MQTT_USERNAME |
MQTT username |
MQTT_PASSWORD |
MQTT password |
TV_HOST |
TV IP address |
TV_UUID |
Paired UUID |
TV_MAC |
TV MAC address |
LOG_LEVEL |
Logging level |
MQTT Topics
Commands (publish to these)
| Topic | Payload | Description |
|---|---|---|
hisense2mqtt/{id}/set/power |
ON / OFF |
Power control |
hisense2mqtt/{id}/set/volume |
0-100 |
Set volume |
hisense2mqtt/{id}/set/mute |
ON / OFF |
Toggle mute |
hisense2mqtt/{id}/set/source |
hdmi1, hdmi2, etc. |
Change input |
hisense2mqtt/{id}/set/key |
up, down, ok, etc. |
Send remote key |
hisense2mqtt/{id}/set/app |
netflix, youtube, etc. |
Launch app |
State (subscribe to these)
| Topic | Payload | Description |
|---|---|---|
hisense2mqtt/{id}/state/power |
ON / OFF |
Power state |
hisense2mqtt/{id}/state/volume |
0-100 |
Current volume |
hisense2mqtt/{id}/state/mute |
ON / OFF |
Mute state |
hisense2mqtt/{id}/state/source |
Source name | Current input |
hisense2mqtt/{id}/state/available |
online / offline |
Availability |
Getting the UUID
The UUID is required for authentication. To get it:
- Install the official Vidaa app on your phone
- Pair the app with your TV (enter the PIN shown on TV)
- The UUID is your phone's Bluetooth/WiFi MAC address
- Check your phone's settings or use
adb logcatto find it
Alternatively, if you have a working UUID from previous pairing, use that.
Wake-on-LAN
To turn on the TV when it's off:
- Enable "Wake on LAN" or "Network Standby" in TV settings
- Set
tv.macin config to your TV's MAC address - Connect TV via Ethernet (WiFi WoL is unreliable)
- Set
options.wake_on_lan: true
Troubleshooting
See docs/TROUBLESHOOTING.md for common issues.
Quick Fixes
TV not responding:
- Ensure TV is on the same network
- Check TV IP address is correct
- Verify UUID is from a paired device
Discovery not appearing in HA:
- Check MQTT broker connection in HA
- Verify discovery_prefix matches HA config
- Check logs:
docker compose logs hisense2mqtt
Wake-on-LAN not working:
- TV must be connected via Ethernet
- Enable WoL in TV settings
- Verify MAC address is correct
Library Usage
Install the library:
pip install pyvidaa
Basic usage:
from pyvidaa import VidaaTV, discover_all
# Discover TVs on network
devices = discover_all(timeout=5.0)
for ip, device in devices.items():
print(f"Found: {ip} - {device.name}")
# Connect to TV
tv = VidaaTV(
host="YOUR_TV_IP",
mac_address="XX:XX:XX:XX:XX:XX",
use_dynamic_auth=True,
)
if tv.connect():
# Control TV
tv.power_on()
tv.volume_up()
tv.launch_app("netflix")
tv.disconnect()
See docs/API.md for full API reference.
Documentation
- API Reference
- Configuration Reference
- Home Assistant Integration (separate repository)
- MQTT Topics
- Troubleshooting
- Protocol Analysis
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Credits
Protocol reverse-engineered from the Vidaa Android app.
Metadata
Release files for pyvidaa 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyvidaa-2.2.0.tar.gz | 73.7 kB | Without provenance | Details for pyvidaa-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyvidaa-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for pyvidaa-2.2.0-py3-none-any.whl |
Total release size: 151.6 kB
Release files / pyvidaa-2.2.0.tar.gz
| Download URL | pyvidaa-2.2.0.tar.gz |
|---|---|
| Size | 73.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3697e5a93a6c3b78651cebad28fa5177de76570d6fe1cb7f82b9e6f13207fa2
|
|
BLAKE2b-256 checksum How to use checksums |
324c9886cbf52a42ed111330e145efd4ab77230affa058e875dfdcabc7b9144d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pyvidaa-2.2.0-py3-none-any.whl
| Download URL | pyvidaa-2.2.0-py3-none-any.whl |
|---|---|
| Size | 77.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a640d38b2d28219aaf0a4f199dcc62360e129ebe59141fdbd0f6b1f957702ba4
|
|
BLAKE2b-256 checksum How to use checksums |
04a691505331d621030f6b9c3615ddf7a40caba2731a78f3eb733a175b5cb081
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for pyvidaa 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.