MQTT interface to Hisense televisions.
Project description
A work-in-progress python API for Hisense televisions based off of mqtt-hisensetv.
Installation
Linux
sudo -H python3.8 -m pip install hisensetv
Windows
py -3.8 -m pip install hisensetv
CLI Usage
usage: hisensetv [-h] [--authorize] [--get {sources,volume}] [--key {back,down,exit,left,menu,power,right,up}] [--no-ssl] [-v] hostname Hisense TV control. positional arguments: hostname Hostname or IP for the TV. optional arguments: -h, --help show this help message and exit --authorize Authorize this API to access the TV. --get {sources,volume} Gets a value from the TV. --key {back,down,exit,left,menu,power,right,up} Sends a keypress to the TV. --no-ssl Do not connect with SSL (required for some models). -v, --verbose Logging verbosity.
One Time Setup
Note: This is not required for all models!
hisensetv 10.0.0.128 --authorize Please enter the 4-digit code: 7815
Keypresses
hisensetv 10.0.0.28 --key up [2020-02-29 13:48:52,064] [INFO ] sending keypress: up
Gets
hisensetv 10.0.0.28 --get volume [2020-02-29 13:49:00,800] [INFO ] volume: { "volume_type": 0, "volume_value": 1 }
No SSL
Some models do not have self-signed certificates and will fail to connect without --no-ssl.
Please open an issue if yours is not listed here!
H43A6250UK
Limitations
Concurrency
Multiple instances of this class will conflict with one-another.
Not thread-safe.
This API really should be asyncio in 2020, but asyncio is not yet part of the paho mqtt library (see 455).
Reliability
The concurrency issues contribute to reliability issues in general.
Unit tests do not exist yet.
Security
The self-signed certificates from the TV are completely bypassed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hisensetv-0.3.0.tar.gz
.
File metadata
- Download URL: hisensetv-0.3.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.10.105
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e16598223a4f8e7cefd50bccef1903b022f14419811bb829edaadc175ba56d3 |
|
MD5 | c310eb37d7a59f0fda45d172fa962679 |
|
BLAKE2b-256 | 6a1721655dd826948668e28d6e79fb9f0e8c1908f45ae501f60a80451f46d32f |
File details
Details for the file hisensetv-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: hisensetv-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.10.105
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7e2ecd2bcc46c7776bf75b82465e23624821cbee527cb24fd7cbaa3eb0a0719 |
|
MD5 | 7ec5b58f19be45122aaf81fd989c2175 |
|
BLAKE2b-256 | 568e1548341aac60330890c6a05c0032b99558345533fe1956fd6c2648a8b3b3 |