GithubHelp home page GithubHelp logo

pyvizio's Introduction

Description

Simple cli and API implementation for Vizio SmartCast TV. Mainly created for integration with HASS.

Installation

Either through pip

pip3 install git+https://github.com/vkorn/pyvizio.git@master

or checkout repo and run

pip3 install -I .

CLI Usage

To avoid repeating IP and Auth params, you can add them to environment variables as VIZIO_IP and VIZIO_AUTH respectively

Pairing

First, find your device (yeah, I'm too lazy to add another cli group)

pyvizio --ip=0 --auth=0 discover

and note it's IP address. Using this IP address request pairing procedure:

pyvizio --ip={ip} pair

lookup PIN code on your TV and note challenge token in console.

Better to have device turned on as it's "forgetting" PIN sometimes if it was turned off prior to pairing command

Using these dafa finalize pairing procedure

pyvizio --ip={ip} pair_finish --token={challenge_token} --pin={tv_pin} 

If everything done correctly, you should see new connected device named Python Vizio in Vizio SmartCast mobile APP

You'll need auth code for any further commands

Turning on/off

pyvizio --ip={ip} --auth={auth_code} power {on|off|toggle}

To get current power state simply call

pyvizio --ip={ip} --auth={auth_code} power

Volume operations

You could change volume

pyvizio --ip={ip} --auth={auth_code} volume {up|down} amount

and get current level (0-100)

pyvizio --ip={ip} --auth={auth_code} volume_current

In addition mute command is available

get_inputmute {on|off|toggle}

Switching channels

pyvizio --ip={ip} --auth={auth_code} channel {up|down|prev} amount

Input sources

You can get current source

pyvizio --ip={ip} --auth={auth_code} input_get

List all connected devices

pyvizio --ip={ip} --auth={auth_code} input_list

And using Name column from this list switch input

pyvizio --ip={ip} --auth={auth_code} input --name={name}

Other options is to circle through all inputs

pyvizio --ip={ip} --auth={auth_code} input_next

Contribution

Thanks for great research uploaded here and absolutely awesome SSDP discovery snippet

pyvizio's People

Contributors

heathbar avatar vkorn avatar

Watchers

 avatar  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.