npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

homebridge-vestel-network-remote

0.4.1 • Public • Published

Vestel TV Network Remote plugin for Homebridge

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.

(I wouldn't recommend these TVs as they have no security at all.)

npm install -g homebridge
npm install -g git+https://gitlab.fancy.org.uk/samuel/homebridge-vestel-network-remote
{
    "accessory": "vestel-network-remote.TV",
    "name": "Samuel's Bedroom TV",
    "ip_address": "192.168.3.223"
}

The TV generates a new UUID every time it is turned on so there's no way of discovering the IP address so you need to set a static IP address on the TV.

Features

Apparently Vestel TVs support a lot more commands. I haven't tested all of these.

Turning the TV on

To turn the TV on you need another device capable of turning the TV on with HDMI CEC or IR.

Apple TV 4th generation

Using an Apple TV 4th generation requires node-appletv. This isn't listed as a dependency so you need to install it seperately.

# https://github.com/socalrds/node-appletv uses a working sodium
npm install -g socalrds/node-appletv
  1. Run appletv pair to create a pairing identifier.
  2. Add the credentials string to your config.json. You can split it at the colons if you want.
{
    "accessory": "vestel-network-remote.TV",
    "name": "Samuel's Bedroom TV",
    "ip_address": "192.168.3.223",
    "apple_tv": {
        "unique_identifier": "00000000-0000-0000-0000-000000000000",
        "identifier": "000000000000000000000000000000000000000000000000000000000000000000000000",
        "pairing_id": "000000000000000000000000000000000000000000000000000000000000000000000000",
        "public_key": "0000000000000000000000000000000000000000000000000000000000000000",
        "encryption_key": "0000000000000000000000000000000000000000000000000000000000000000"
    }
}

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

{
    "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"
}

This will add a Speaker service. As the Speaker service is not supported by the Home app, you can also choose to use a Lightbulb service instead of or in addition to the Speaker service.

{
    "accessory": "vestel-network-remote.TV",
    "name": "Samuel's Bedroom TV",
    "ip_address": "192.168.3.231",
    "expose_speaker_service": false,
    "expose_speaker_lightbulb_service": true
}

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.

{
    "accessory": "vestel-network-remote.TV",
    "name": "Samuel's Bedroom TV",
    "ip_address": "192.168.3.231",
    "expose_television_service": true,
    "tv_sources": {
        "0": ["TV", "TUNER"],
        "1": ["EXT 1", "COMPOSITE_VIDEO"],
        "5": ["SIDE AV", "COMPOSITE_VIDEO"],
        "6": ["DVD", "APPLICATION", "PLAYBACK"],
        "7": ["HDMI 1", "HDMI"],
        "8": ["HDMI 2", "HDMI"],
        "11": ["YPbPr", "COMPONENT_VIDEO"],
        "12": ["VGA", "COMPONENT_VIDEO"]
    },
    "default_input": 0,
    "apple_tv_input": 4
}

The tv_sources object defines how the sources should be switched. The key is the internal identifier of the source. The value is either an array (the first item can be anything you can use to reference the source ("HDMI 1" is preferred over "Apple TV" for example as you can set your own name in the Home app), the second item being the name of an Input Source Type and the third being the name of an Input Device Type) or an object:

        ...,
        "6"{
            "name": "DVD",
            "input_source_type": "APPLICATION",
            "input_device_type": "PLAYBACK"
        },
        ...

You can find the internal identifier of the source by trying different identifiers. These are incremental and start from 0 but include sources for other hardware models, so some do nothing.

npm install -g git+https://gitlab.fancy.org.uk/samuel/vestel-network-remote
vestel-followme-tv 192.168.3.246 set-source 0

You can also set the picture zoom after changing the source, as this is sometimes set to auto:

        ...,
        "7"{
            "name": "HDMI 1",
            "input_source_type": "HDMI",
            "picture_zoom": "full"
        },
        ...

Values for picture_zoom can be found here.

The apple_tv_input property should be set to the index of the input the Apple TV used to turn the TV on is connected to. This is used to display the correct source after turning the TV on with an Apple TV (which should set the source to the Apple TV). The default is the first HDMI source.

The default_input property should be set to the index of the input to display when the plugin doesn't know what source is currently active. The default is 0 (the first source).

Enabling the Television service will disable the Switch and Speaker service. Set their flags explicitly to enable them.

{
    "accessory": "vestel-network-remote.TV",
    "name": "Samuel's Bedroom TV",
    "ip_address": "192.168.3.231",
    "expose_television_service": true,
    "tv_sources": ...,
    "expose_power_service": true,
    "expose_speaker_service": true
}

TV apps

You can add TV apps by adding them to the tv_apps object.

    ...,
    "tv_apps"[
        {
            "name": "Internet Portal",
            "input_source_type": "HOME_SCREEN",
            "remote_key": "INTERNET"
        },
        {
            "name": "Browser",
            "input_device_type": "OTHER",
            "app_url": "browser://open"
        }
    ],
    ...

TV channels

You can add TV channels by adding them to the tv_channels object. Channels names will be retrieved from the TV.

    ...,
    "tv_channels"[
        1,
        2,
        3
    ],
    ...

install

npm i homebridge-vestel-network-remote

Downloadsweekly downloads

15

version

0.4.1

license

MIT

repository

Gitgitlab

last publish

collaborators

  • avatar
Report a vulnerability