Giter VIP home page Giter VIP logo

hisensetv's Introduction

Python API for Hisense Televisions

A MQTT service to interact with HiSense TVs.

This fork provides support for the Homebridge-Hisense-TV and it is not available as separate distribution.

Dependencies

  • Python 3.8 or later.
  • paho-mqtt 1.5.0 or higher.
  • netifaces 0.11.0 or higher.

CLI Usage

usage: hisensetv.py [-h] [--authorize] [--ifname IFNAME]
                [--get {sources,volume,state}]
                [--key {power,up,down,left,right,menu,back,exit,ok,volume_up,volume_down,channel_up,channel_down,fast_forward,rewind,stop,play,pause,mute,home,subtitle,netflix,youtube,amazon,0,1,2,3,4,5,6,7,8,9,source_0,source_1,source_2,source_3,source_4,source_5,source_6,source_7}]
                [--no-ssl] [--certfile CERTFILE] [--keyfile KEYFILE] [-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.
  --ifname IFNAME       Name of the network interface to use
  --get {sources,volume,state}
                        Gets a value from the TV.
  --key {power,up,down,left,right,menu,back,exit,ok,volume_up,volume_down,channel_up,channel_down,fast_forward,rewind,stop,play,pause,mute,home,subtitle,netflix,youtube,amazon,0,1,2,3,4,5,6,7,8,9,source_0,source_1,source_2,source_3,source_4,source_5,source_6,source_7}
                        Sends a keypress to the TV.
  --no-ssl              Do not connect with SSL (required for some models).
  --certfile CERTFILE   Absolute path to the .cer file (required for some
                        models). Works only when --keyfile is also specified.
                        Will be ignored if --no-ssl is specified.
  --keyfile KEYFILE     Absolute path to the .pkcs8 file (required for some
                        models). Works only when --certfile is also specified.
                        Will be ignored if --no-ssl is specified.
  -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
}

hisensetv's People

Contributors

newam avatar mrasterisco avatar ejonesnospam avatar timo8042 avatar julianstremel avatar octa22 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.