Skip to main content

Python library for interfacing with Vizio SmartCast Sound Bars

Project description

Description

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

Installation

PyPi

pip3 install pyviziosoundbar

GitHub Code

Either through pip

pip3 install git+https://github.com/raman325/pyviziosoundbar.git@master

or checkout repo and run

pip3 install -I .

CLI Usage

To avoid repeating IP param, you can add it to environment variables as VIZIO_SOUNDBAR_IP

Pairing

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

pyviziosoundbar --ip=0 discover

and note it's IP address.

Turning on/off

pyviziosoundbar --ip={ip} power {on|off|toggle}

To get current power state simply call

pyviziosoundbar --ip={ip} power

Volume operations

You could change volume

pyviziosoundbar --ip={ip} volume {up|down} amount

and get current level (0-100)

pyviziosoundbar --ip={ip} volume-current

In addition mute command is available

pyviziosoundbar --ip={ip} mute {on|off|toggle}

Input sources

You can get current source

pyviziosoundbar --ip={ip} input-current

List all sources

pyviziosoundbar --ip={ip} input-list

And using Name column from this list switch input

pyviziosoundbar --ip={ip} input-set {name}

Other options is to circle through all inputs

pyviziosoundbar --ip={ip} input-next

Control Media

Play media

pyviziosoundbar --ip={ip} play

Pause media

pyviziosoundbar --ip={ip} pause

Next track

pyviziosoundbar --ip={ip} next

Previous track

pyviziosoundbar --ip={ip} previous

Contribution

  • Thanks to @vkorn whose pyvizio I used as a base. Most of the code is theirs, including most of this documentation
  • Thanks for great research uploaded here and absolutely awesome SSDP discovery snippet

Project details


Release history Release notifications

This version
History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyviziosoundbar-0.0.1-py3-none-any.whl (11.5 kB) Copy SHA256 hash SHA256 Wheel py3
pyviziosoundbar-0.0.1.tar.gz (8.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page