Update Vizio docs to reflect improved discovery (#11935)

* update discovery and pairing instructions, clarify configuration options

* close code markup

* fix markdown

* small tweaks to hopefully get build to pass

* adhere to guidelines

* try removing block quote

* Update source/_integrations/vizio.markdown

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Update source/_integrations/vizio.markdown

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* readd block quote and make it clear users should be on the latest version of pyvizio

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Raman Gupta 2020-02-04 04:07:36 -05:00 committed by GitHub
parent 595a4fc7a6
commit 109f51dc4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,30 +14,21 @@ The `vizio` integration allows you to control [SmartCast](https://www.vizio.com/
## Find your device ## Find your device
Install the command line tool using `pip` (or download it manually): ### Install pyvizio locally
```bash > NOTE: If the `pip3` command is not found, try `pip` instead
$ pip3 install pyvizio
```
or - To install, run `pip3 install pyvizio` in your terminal.
- If `pyvizio` is already installed locally, make sure you are using the latest version by running `pip3 install --upgrade pyvizio` in your terminal.
```bash ### Discover devices
$ pip3 install git+https://github.com/vkorn/pyvizio.git@master
```
or
```bash
$ pip3 install -I .
```
Find your device using the following command: Find your device using the following command:
```txt ```bash
pyvizio --ip=0 discover $ pyvizio --ip=0 discover
``` ```
and note its IP address. If using the IP address by itself does not work, you may need to append `:9000` or `:7345` to it when using it as a parameter in future commands. and note its IP address and port number. If you have trouble finding a device you were expecting to, you can try increasing the discovery timeout period by adding the `--timeout` option (e.g. `pyvizio --ip=0 discover --timeout=10`).
## Pairing ## Pairing
@ -49,13 +40,13 @@ Make sure that your device is on before continuing.
| Parameter | Description | | Parameter | Description |
|:----------------|:---------------------| |:----------------|:---------------------|
| `ip` | IP address (possibly including port) obtained from the previous section | | `ip` | `IP Address:Port` (obtained from the previous section) |
| `device_type` | The type of device you are connecting to. Options are `tv` or `soundbar` | | `device_type` | The type of device you are connecting to. Options are `tv` or `soundbar` |
Enter the following command to initiate pairing: Enter the following command to initiate pairing:
```bash ```bash
$ pyvizio --ip={ip} --device_type={device_type} pair $ pyvizio --ip={ip:port} --device_type={device_type} pair
``` ```
Initiation will show you two different values: Initiation will show you two different values:
@ -68,7 +59,7 @@ Initiation will show you two different values:
At this point, a PIN code should be displayed at the top of your TV. With all these values, you can now finish pairing: At this point, a PIN code should be displayed at the top of your TV. With all these values, you can now finish pairing:
```bash ```bash
$ pyvizio --ip={ip} --device_type={device_type} pair-finish --token={challenge_token} --pin={pin} $ pyvizio --ip={ip:port} --device_type={device_type} pair-finish --token={challenge_token} --pin={pin}
``` ```
You will need the authentication token returned by this command to configure Home Assistant. You will need the authentication token returned by this command to configure Home Assistant.
@ -81,13 +72,13 @@ To add your Vizio TV to your installation, add the following to your `configurat
# Example configuration.yaml entry # Example configuration.yaml entry
media_player: media_player:
- platform: vizio - platform: vizio
host: IP_ADDRESS host: "DEVICE_IP:DEVICE_PORT"
access_token: AUTH_TOKEN access_token: YOUR_AUTH_TOKEN
``` ```
{% configuration %} {% configuration %}
host: host:
description: IP address of your device. description: "`IP Address:Port` for your device (port is optional but recommended)."
required: true required: true
type: string type: string
access_token: access_token:
@ -95,7 +86,7 @@ access_token:
required: false required: false
type: string type: string
device_class: device_class:
description: The class of your device. Valid options are `tv` or `soundbar` description: "The class of your device. Valid options are `tv` or `soundbar`."
required: false required: false
type: string type: string
default: tv default: tv