Commit 34d7e53b authored by Samuel Elliott's avatar Samuel Elliott

Update README.md

parent 1cbe6098
Vestel TV Network Remote plugin for Homebridge
===
Homebridge plugin for controlling Vestel smart TVs.
Homebridge plugin for controlling Vestel smart TVs. [Vestel manufactures TVs as a lot of brand names so if your TV is from a smaller brand or a store's own brand it's probably worth checking if it's a Vestel TV.](https://www.avforums.com/threads/how-to-tell-if-your-tvs-a-vestel.2019864/)
[(I wouldn't recommend these TVs as they have no security at all.)](https://www.av-comparatives.org/security-flaws-firmware-used-30-popular-tv-brands/)
```json
{
......@@ -11,7 +13,16 @@ Homebridge plugin for controlling Vestel smart TVs.
}
```
This allows you to check whether the TV is on and turn it off.
### Features
- Power ([requires HDMI CEC/IR device to turn the TV on](#turning-the-tv-on))
- Volume
- Television service (requires configuration)
- Setting current input/app/channel
Switching inputs works by iterating over a configured list of inputs.
[Apparently Vestel TVs support a lot more commands.](https://forum.digitalfernsehen.de/threads/medion-md-30465-42-led-backlight-tv-life%C2%AE-x17006.276321/page-64#post-7474289) I haven't tested any of these.
Turning the TV on
---
......@@ -20,7 +31,7 @@ To turn the TV on you need another device capable of turning the TV on with HDMI
### Apple TV 4th generation
1. Run `appletv pair` (from `node-appletv`) to create a pairing identifier.
1. Run `/usr/local/lib/node_modules/homebridge-vestel-network-remote/node_modules/.bin/appletv pair` (from `node-appletv`) to create a pairing identifier.
2. Add the credentials string to your `config.json`. You can split it at the colons if you want.
```json
......@@ -41,7 +52,7 @@ To turn the TV on you need another device capable of turning the TV on with HDMI
Controlling volume
---
If your TV exposes a RenderingControl service you can control the volume.
If your TV exposes a RenderingControl service you can control the volume. By default this will use `"http://{ip_address}:2869/dmr.xml"` - if it's different on your TV or it doesn't have a RenderingControl service you can change the location of the MediaRenderer description or set it to `null`.
```json
{
......@@ -59,7 +70,6 @@ This will add a Speaker service. As the Speaker service is not supported by the
"accessory": "vestel-network-remote.TV",
"name": "Samuel's Bedroom TV",
"ip_address": "192.168.3.231",
"media_renderer_location": "http://192.168.3.231:2869/dmr.xml",
"expose_speaker_service": false,
"expose_speaker_lightbulb_service": true
}
......@@ -70,12 +80,13 @@ iOS 12.2 Television service
You can enable the Television service (supported in the Home app on iOS 12.2 and later) by setting the `expose_television_service` flag.
I haven't updated to the iOS 12.2 beta so I haven't tested this properly.
```json
{
"accessory": "vestel-network-remote.TV",
"name": "Samuel's Bedroom TV",
"ip_address": "192.168.3.231",
"media_renderer_location": "http://192.168.3.231:2869/dmr.xml",
"expose_television_service": true,
"tv_sources": {
"TV": "TUNER",
......@@ -117,7 +128,6 @@ Enabling the Television service will disable the Switch and Speaker service. Set
"accessory": "vestel-network-remote.TV",
"name": "Samuel's Bedroom TV",
"ip_address": "192.168.3.231",
"media_renderer_location": "http://192.168.3.231:2869/dmr.xml",
"expose_television_service": true,
"tv_sources": ...,
"expose_power_service": true,
......
......@@ -55,6 +55,8 @@ class TVAccessory {
this.name = config.name;
this.mac_address = config.mac_address;
this.ip_address = config.ip_address;
this.media_renderer_location = config.media_renderer_location !== undefined
? config.media_renderer_location : 'http://' + this.ip_address + ':2869/dmr.xml';
this.storage_key = 'vestel-network-remote.TV.' + this.name + '.json';
......@@ -63,12 +65,12 @@ class TVAccessory {
: !!config.tv_sources;
this.expose_television_speaker_service = config.expose_television_speaker_service !== undefined
? config.expose_television_speaker_service
: this.expose_television_service && config.media_renderer_location;
: this.expose_television_service && this.media_renderer_location;
this.expose_power_service = config.expose_power_service !== undefined ? config.expose_power_service
: !this.expose_television_service;
this.expose_speaker_service = config.expose_speaker_service !== undefined ? config.expose_speaker_service
: !this.expose_television_speaker_service && config.media_renderer_location;
: !this.expose_television_speaker_service && this.media_renderer_location;
this.expose_speaker_lightbulb_service = config.expose_speaker_lightbulb_service !== undefined
? config.expose_speaker_lightbulb_service : false;
......@@ -109,8 +111,8 @@ class TVAccessory {
this.handleMediaRendererEvent = this.handleMediaRendererEvent.bind(this);
if (config.media_renderer_location) {
this.media_renderer_client = new UPnPClient(config.media_renderer_location);
if (this.media_renderer_location) {
this.media_renderer_client = new UPnPClient(this.media_renderer_location);
this.media_renderer_client.on('error', err => console.error('[UPnP] Error', err));
this.media_renderer_client.subscribe('RenderingControl', this.handleMediaRendererEvent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment