Updated external content (Jenkins build 1245)

pull/1969/head
openHAB Build Server 2022-12-07 05:35:12 +00:00
parent 4eb84f629d
commit f9ca0b3d37
5 changed files with 319 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@ title: Bond Home - Bindings
type: binding
description: "This binding connects the [Bond Home](https://bondhome.io/) Bridge to openHAB using the [BOND V2 Local HTTP API](http://docs-local.appbond.com)."
since: 3x
logo: images/addons/bondhome.png
install: manual
---

View File

@ -171,10 +171,10 @@ The controller bridge has the following channels:
A lightpanel thing has the following channels:
| Channel | Type | Description | Read Only |
|---------------------|-----------|----------------------------------------------------------------------------------------------------------|-----------|
| color | Color | Color of the individual light panel | No |
| tap | Trigger | [Canvas / Shapes Only] Sends events of gestures. SHORT_PRESSED and DOUBLE_PRESSED events are supported. | Yes |
| Channel | Type | Description | Read Only |
|---------------------|-----------|-----------------------------------------------------------------------------------------------------------------------|-----------|
| color | Color | Color of the individual light panel | No |
| tap | Trigger | [Canvas / Shapes Only] Sends events of gestures. SHORT_PRESSED, LONG_PRESSED and DOUBLE_PRESSED events are supported. | Yes |
The color channels support full color control with hue, saturation and brightness values.
For example, brightness of *all* panels at once can be controlled by defining a dimmer item for the color channel of the *controller thing*.

View File

@ -0,0 +1,196 @@
---
id: vizio
label: Vizio
title: Vizio - Bindings
type: binding
description: "This binding connects Vizio TVs to openHAB."
since: 3x
logo: images/addons/vizio.png
install: manual
---
<!-- Attention authors: Do not edit directly. Please add your changes to the appropriate source repository -->
{% include base.html %}
# Vizio Binding
This binding connects Vizio TVs to openHAB.
The TV must support the Vizio SmartCast API that is found on 2016 and later models.
## Supported Things
There is currently only one supported thing type, which represents a Vizio TV using the `vizio_tv` id.
Multiple Things can be added if more than one Vizio TV is to be controlled.
## Discovery
Auto-discovery is supported if the Vizio TV can be located on the local network using mDNS.
Otherwise the thing must be manually added.
When the TV is discovered, a pairing process to obtain an authentication token from the TV must be completed using the openHAB console. See below for details.
## Thing Configuration
The thing has a few configuration parameters:
| Parameter | Description |
|-------------|--------------------------------------------------------------------------------------------------------------------------------------|
| hostName | The host name or IP address of the Vizio TV. Mandatory. |
| port | The port on the Vizio TV that listens for https connections. Default 7345; Use 9000 for older model TVs. |
| authToken | The token that is used to authenticate all commands sent to the TV. See below for instructions to obtain via the openHAB console. |
| appListJson | A JSON string that defines the apps that are available in the `activeApp` channel drop down. See below for instructions for editing. |
### Console Commands for Pairing:
To obtain an authorization token that enables openHAB to authenticate with the TV, the following console commands must be used while the TV is turned on.
The first command will send a pairing start request to the TV. This triggers the TV to display a 4-digit pairing code on screen that must be sent with the second command.
Start Pairing:
```
openhab:vizio <thingUID> start_pairing <deviceName>
```
Substitute `<thingUID>` with thing's id, ie: `vizio_tv:00bc3e711660`
Substitute `<deviceName>` the desired device name that will appear in the TV's settings, under Mobile Devices, ie: `Vizio-openHAB`
Submit Pairing Code:
```
openhab:vizio <thingUID> submit_code <pairingCode>
```
Substitute `<thingUID>` with the same thing id used above
Substitute `<pairingCode>` with the 4-digit pairing code displayed on the TV, ie: `1234`
The console should then indicate that pairing was successful (token will be displayed) and that the token was saved to the thing configuration.
If using file-based provisioning of the thing, the authorization token must be added to the thing configuration manually.
With an authorization token in place, the binding can now control the TV.
The authorization token text can be re-used in the event that it becomes necessary to setup the binding again.
By simply adding the token that is already recognized by the TV to the thing configuration, the pairing process can be bypassed.
## Channels
The following channels are available:
| Channel ID | Item Type | Description |
|-------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| power | Switch | Turn the power on the TV on or off. Note: TV may not turn on if power is switched off and the TV is configured for Eco mode. |
| volume | Dimmer | Control the volume on the TV (0-100%). |
| mute | Switch | Mute or unmute the volume on the TV. |
| source | String | Select the source input on the TV. The dropdown list is automatically populated from the TV. |
| activeApp | String | A dropdown containing a list of streaming apps defined by the `appListJson` config option that can be launched by the binding. An app started via remote control is automatically selected. |
| control | Player | Control Playback e.g. Play/Pause/Next/Previous/FForward/Rewind |
| button | String | Sends a remote control command the TV. See list of available commands below. |
### List of available button commands for Vizio TVs:
PowerOn
PowerOff
PowerToggle
VolumeUp
VolumeDown
MuteOn **(may only work as a toggle)**
MuteOff **(may only work as a toggle)**
MuteToggle
ChannelUp
ChannelDown
PreviousCh
InputToggle
SeekFwd
SeekBack
Play
Pause
Up
Down
Left
Right
Ok
Back
Info
Menu
Home
Exit
Smartcast
ccToggle
PictureMode
WideMode
WideToggle
### App List Configuration:
The Vizio API to launch and identify currently running apps on the TV is very complex.
To handle this, the binding maintains a JSON database of applications and their associated metadata in order to populate the `activeApp` dropdown with available apps.
When the thing is started for the first time, this JSON database is saved into the `appListJson` configuration parameter.
This list of apps can be edited via the script editor on the thing configuration.
By editing the JSON, apps that are not desired can be removed from the `activeApp` dropdown and newly discovered apps can be added.
An entry for an application has a `name` element and a `config` element containing `APP_ID`, `NAME_SPACE` and `MESSAGE` (null for most apps):
```
{
"name": "Crackle",
"config": {
"APP_ID": "5",
"NAME_SPACE": 4,
"MESSAGE": null
}
},
```
If an app is running that is not currently recognized by the binding, the `activeApp` channel will display a message that contains the `APP_ID` and `NAME_SPACE` which can be used to create the missing record for that app in the JSON.
If an app that is in the JSON database fails to start when selected, try adjusting the `NAME_SPACE` value for that app.
`NAME_SPACE` seems to be a version number and adjusting the number up or down may correct the mismatch between the TV and the binding.
A current list of `APP_ID`'s can be found at http://hometest.buddytv.netdna-cdn.com/appservice/vizio_apps_prod.json
and `NAME_SPACE` &amp; `MESSAGE` values needed can be found at http://hometest.buddytv.netdna-cdn.com/appservice/app_availability_prod.json
If there is an error in the user supplied `appListJson`, the thing will fail to start and display a CONFIGURATION_PENDING message.
If all text in `appListJson` is removed (set to null) and the thing configuration saved, the binding will restore `appListJson` from the binding's JSON db.
## Full Example
vizio.things:
```
// Vizio TV
vizio:vizio_tv:mytv1 "My Vizio TV" [ hostName="192.168.10.1", port=7345, authToken="idspisp0pd" ]
```
vizio.items:
```
// Vizio TV items:
Switch TV_Power "Power" { channel="vizio:vizio_tv:mytv1:power" }
Dimmer TV_Volume "Volume [%d %%]" { channel="vizio:vizio_tv:mytv1:volume" }
Switch TV_Mute "Mute" { channel="vizio:vizio_tv:mytv1:mute" }
String TV_Source "Source Input [%s]" { channel="vizio:vizio_tv:mytv1:source" }
String TV_ActiveApp "Current App: [%s]" { channel="vizio:vizio_tv:mytv1:activeApp" }
Player TV_Control "Playback Control" { channel="vizio:vizio_tv:mytv1:control" }
String TV_Button "Send Command to TV" { channel="vizio:vizio_tv:mytv1:button" }
```
vizio.sitemap:
```
sitemap vizio label="Vizio" {
Frame label="My Vizio TV" {
Switch item=TV_Power
// Volume can be a Setpoint also
Slider item=TV_Volume minValue=0 maxValue=100 step=1 icon="soundvolume"
Switch item=TV_Mute icon="soundvolume_mute"
Selection item=TV_Source icon="screen"
Selection item=TV_ActiveApp icon="screen"
Default item=TV_Control
Selection item=TV_Button
}
}
```

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="vizio"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Vizio TV Thing -->
<thing-type id="vizio_tv">
<label>Vizio TV</label>
<description>
A Vizio SmartCast TV
</description>
<channels>
<channel id="power" typeId="system.power"/>
<channel id="volume" typeId="system.volume"/>
<channel id="mute" typeId="system.mute"/>
<channel id="source" typeId="source"/>
<channel id="activeApp" typeId="activeApp"/>
<channel id="control" typeId="control"/>
<channel id="button" typeId="buttonTv"/>
</channels>
<properties>
<property name="modelId">unknown</property>
</properties>
<representation-property>uuid</representation-property>
<config-description>
<parameter name="hostName" type="text" required="true">
<context>network-address</context>
<label>Host Name/IP Address</label>
<description>Host Name or IP Address of the Vizio TV</description>
</parameter>
<parameter name="port" type="integer" min="1" max="65535" required="true">
<label>Port</label>
<description>Port for the Vizio TV</description>
<default>7345</default>
<limitToOptions>true</limitToOptions>
<options>
<option value="7345">7345 (Newer Models)</option>
<option value="9000">9000 (Older Models)</option>
</options>
</parameter>
<parameter name="authToken" type="text" required="false">
<label>Auth Token</label>
<description>Auth Token that is obtained via the pairing process; See documentation for details</description>
</parameter>
<parameter name="appListJson" type="text" required="false">
<context>script</context>
<label>App List Configuration</label>
<description>The JSON configuration string for the list of apps available in the activeApp channel drop down</description>
</parameter>
</config-description>
</thing-type>
<channel-type id="source">
<item-type>String</item-type>
<label>Source Input</label>
<description>Select the Source Input for the TV</description>
</channel-type>
<channel-type id="activeApp">
<item-type>String</item-type>
<label>Active App</label>
<description>The currently running App on the TV</description>
</channel-type>
<channel-type id="control">
<item-type>Player</item-type>
<label>Control</label>
<description>Transport Controls e.g. Play/Pause/Next/Previous/FForward/Rewind</description>
<category>Player</category>
</channel-type>
<channel-type id="buttonTv">
<item-type>String</item-type>
<label>Remote Button</label>
<description>A Remote Button press to send to the TV</description>
<state>
<options>
<option value="PowerOn">Power On</option>
<option value="PowerOff">Power Off</option>
<option value="PowerToggle">Power Toggle</option>
<option value="VolumeUp">Volume Up</option>
<option value="VolumeDown">Volume Down</option>
<option value="MuteOn">Mute On</option>
<option value="MuteOff">Mute Off</option>
<option value="MuteToggle">Mute Toggle</option>
<option value="ChannelUp">Channel Up</option>
<option value="ChannelDown">Channel Down</option>
<option value="PreviousCh">Previous Channel</option>
<option value="InputToggle">Input Toggle</option>
<option value="SeekFwd">Seek Fwd</option>
<option value="SeekBack">Seek Back</option>
<option value="Play">Play</option>
<option value="Pause">Pause</option>
<option value="Up">Up</option>
<option value="Down">Down</option>
<option value="Left">Left</option>
<option value="Right">Right</option>
<option value="Ok">Ok</option>
<option value="Back">Back</option>
<option value="Info">Info</option>
<option value="Menu">Menu</option>
<option value="Home">Home</option>
<option value="Exit">Exit</option>
<option value="Smartcast">Smartcast</option>
<option value="ccToggle">CC Toggle</option>
<option value="PictureMode">Picture Mode</option>
<option value="WideMode">Wide Mode</option>
<option value="WideToggle">Wide Toggle</option>
</options>
</state>
</channel-type>
</thing:thing-descriptions>