A media player component for Home Assistant that controls each LG Horizon Settopbox in your account. After configuration you should see:
- one media player entity for each physical device in your account.
- one sensor entity with the used recording capacity, only if recording is enabled
- Media browser enabled for recordings
- Extended logging
Country | Provider | Box name | Confirmed working |
---|---|---|---|
Netherlands | Ziggo | Mediabox Next, Mediabox Next mini | yes |
Austria | Magenta | Entertain box 4K | yes |
Switzerland | UPC/Sunrise Switzerland | Sunrise (IP)TV Box | yes (For Sunrise users, use Mobile number as username. For former UPC users, use e-mailaddress as username) |
Ireland | Virgin Media | 360 box | yes |
Belgium | Telenet | Telenet TV-Box | yes |
Great Britain | Virgin Media | Virgin TV 360 | yes |
Poland | UPC Poland | UPC TV Box | yes |
- The energy mode needs to be set to high, otherwise you are not able to switch the device on in the media player.
- Make sure you've installed HACS
- In the integrations tab, search for LG Horizon.
- Install the Integration. Please consider enabling beta versions to keep track of the latest (experimental) features.
- Configure the integration using the HA integration page, Search for LG Horizon.
- Open the directory (folder) for your HA configuration (where you find configuration.yaml).
- If you do not have a custom_components directory (folder) there, you need to create it.
- In the custom_components directory (folder) create a new folder called lghorizon.
- Download all the files from the custom_components/lghorizon/ directory (folder) in this repository.
- Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- Configure the integration using the HA integration page, Search for LG Horizon.
- In HA Click on settings
- Click on Integrations
- Click on button 'Add integration'
- Search for 'LG Horizon' and click
Parameter | Required | Description |
---|---|---|
Username | yes | Your provider username |
Password | yes | Your provider password |
Provider | yes (default 'Ziggo') | Your Provider |
Identifier | no (only for Telenet) | Your account identifier (see below) |
Refresh Token | no (only for GB & CH) | A JWT Token (see below) |
When you can't connect to your Telenet account it's possible that you have multiple accounts and you have to provide your account identifier. You can find your identifier by opening your browser in incognito mode and login to your telenet TV environment. After entering your credentials an account selection screen will popup:
- Find the account with the option 'Digital Base Telenet TV2'
- Right click the radio button before that account and click inspect element
- In the source code find the value of the box. Usually starts with DTV
- Use that code in the config of your telenet account in HA
For the Virgin GB and the Sunrise CH integration the Password is not used, instead, you need JWT token. To get the JWT token you need to download a plugin and then login to your Virgin Box from a web browser as follows.
- Download a Plug to get access to the tokens:
- For Firefox use JWT Debugger
- For Chrome use JWT Inspector
- For Edge use JwtToken
-
Login to your Virgin box using the web browser GB: https://virgintvgo.virginmedia.com/ CH: https://www.sunrisetv.ch/
-
Open the JWT extension and copy the JWT token. Firefox example: (you need the bit starting
eyJ0...
- make sure you get all of it - its quite long. NOTE: Keep this token secure/treat as a password - it gives full access to your virgin / sunrise box. -
Paste the JWT token into the Refresh Token parameter
service: media_player.play_media
data:
media_content_type: channel # 'channel' when media_content_id is channelnumber, 'app' when media_content_id is 'Netflix' or 'Videoland'
media_content_id: "401" # Any channel number, 'Netflix' or 'Videoland'
target:
entity_id: media_player.ziggo_beneden
This service can be called to start a recording. Note that this shows a pop-up on screen and confirmation is required.
service: lghorizon.record
data:
entity_id: media_player.ziggo_beneden
This service can be called to rewind or fast-forward. Note that this command can be called multiple times to speed up. To stop this action, you can call the standard media_player.play service on the same entity.
service: lghorizon.rewind
data:
entity_id: media_player.ziggo_beneden
service: lghorizon.fast_forward
data:
entity_id: media_player.ziggo_beneden
This service can be called to emulate a key press on the remote control.
service: lghorizon.remote_key_press
data:
entity_id: media_player.ziggo_beneden
remote_key: "MediaTopMenu"
This component is not provided, supported or maintained by any of the companies named above. They can change their hardware, software or web services at a way that can break this component. Fingers crossed!
- The excellent start from IIStevowII for a single settopbox inspired me!
- The nodejs script NextRemoteJs from basst85 used as reference to compare results.
- The input from Jochen Siegenthaler. His Homebridge development helped me forward.
- Contributions on this project and the lghorizon-api package by:
- Testing by:
- Craig McGowan (GB)
- Jarne Roussard (BE)
- Sammy Verdonck (BE)
- Jordi Smolders (BE)
- Majkel Łacina (PL)
- Colin Robbins (UK)