Wednesday, 15 January 2025

Virgin TV Automation

 Intro

In September 2024 it was time to participate in the annual Virgin vs Sky renewal debate.  Virgin come up with a deal each year to make it too much hassle for me to change over to Sky.  This year the deal required a mandatory upgrade from Tivo to Virgin TV Go 360.  Our set top box remains the same but the Tivo software has been replaced by Horizon from Liberty Global, Virgins parent company.  The new software looks more up-to-date / standard and has a few more features, for example personal profiles and voice control through the remote.

In addition to watching recordings on the TV from the  Virgin set-top box we also watch downloaded films / series from our home server.  Fiddling around with multiple remote controls is becoming more of a pain, particularly when the programme maybe on the Tivo, available via catchup or downloaded onto the local network.  I felt it was time to come up with a better solution based on a browser application.

Approach

Home Assistant (HA) can be used to control a wide variety of electronic devices.  As well as integrating with most vendors IoT apps, the open source community has added many more "integrations" for a myriad of devices.

In my scenario I would like a HA running on an iPad or phone to provide all the functions I currently use on the Samsung TV, Virgin V6 set-top-box and Yamaha Soundbar with remote controls.

Samsung TV has its own HA integration and also an IoT app called Smart Things which HA can utilise.
Virgin has its TV Go app which is closely integrated with the V6 box but isn't incorporated into HA.
The Yamaha soundbar only has an infra-red remote control interface so any automation would need to be integrated using a Broadlink IR sender.

Solution

My intention was to combine Samsung, Tivo and Soundbar(Broadlink) functions into a single web browser based HA dashboard.  The project seems to be never-ending so I will outline the solution as it currently stands and, maybe, provide more technical detail and describe enhancements later.  The screen layout changes, depending on whether you are using Samsung TV or Virgin Tivo functions and the two layouts are shown below.


In the top part of the app there are buttons to turn equipment on/off, choose a source to display on the TV and control volume.  The bottom half of the screen contains all necessary buttons "copied" from the Virgin (red) or Samsung (blue) remote controls.

The power button switches TV, Tivo and Soundbar on/off at the same time.  The green sound buttons allow you to change the soundbar volume or mute it.

The TV source is usually Virgin Tivo so the set of red buttons is displayed allowing you to change channels, obtain program info, look at the TV guide etc.  Lots of the virgin channels are password protected during the day and earlier evening so I added a "code" button which inserts the password for you.  I also added some preset channels which may be of use when channel hopping.
There is a single button to access the Tivo recording screen, you can then navigate and choose the recording you want using the red arrow and OK keys in the normal way.

The downloads button takes you to the top level menu for films and programs downloaded from the internet.  Again you use keys and ENTER as usual, this time using the blue buttons, to choose and play your recording.  During playback there are also fast forward, rewind and pause buttons.

There are also buttons for Netflix and Amazon so that their programs can be selected using the app.
We dont currently make use of them but I have included Youtube and Internet browser buttons to access the built in functions which Samsung provide.

Although we dont watch it much there are lots of programs, including a wide selection of filsm on Samsung TVPlus.  The blue buttons allow you to choose channels, and I have set up a number of presents - although, irritatingly, channel numbers appear to change regularly.

Conclusion

TheVirgin TV Remote project seemed to be quite straightforward to start off with but there are many functions which need to be implemented.  Each time I look at it I think of enhancements which could be made.  We are just starting to use the version which has been outlined above and it will need some "rough edges" smoothed out before going much further.

The current system is excellent in a number of ways, so it is meeting expectations already.  In particular:
  • All devices are powered on/off by a single button instead of using three different remotes.
  • Most days, the app is all we need, the remotes aren't required.
  • All viewing sources are grouped together making it easier to find/choose the one you need.
  • A single button press is required to access Virgin recordings - instead of about 6
  • A single button press is required to access download folders - instead of about 6
  • Presets are available for favorite Tivo channels as necessary
  • Parental codes can be entered with a single button
There is a lot more that can be added but I should be content with what we have for the moment.










Samsung TV

The HA Samsung integration can select between TV+ and HDMI sources, change channels and simulate pressing buttons on the remote control.  An improved integration is available on a github repository by ollo69. It has some extra features


In particular, it can use the SmartThings API to obtain better information about channels/sources and has more remote controller key-press capabilities.

Our main interest for the remote control is to set the "source", this is to choose what is displayed on the TV screen.  Most of the time we use the Virgin Set top box and the source is set to "Virgin".  However Youtube, Amazon, Netflix can also be used.
Our basic script to send one or more key presses uses the standard SamsungTV remote HA entity to send a command to the living room tv.  "{{ key_sequence}}" is an argument providing the key definitions.
For TV+ and Virgin, keys are KEY_TV and KEY_HDMI (as Virgin box is connected to HDMI1).

For YouTube and Internet we use the ollo69 Samsung media.player entity to play an application.
The Youtube app is "111299001912" and the Internet browser is "org.tizen.browser"

For Netflix and Amazon I couldn't get the apps to work, so I had to use a sequence of remote control keys.

The sequence of keys shown on the left: HOME, followed by right-arrow three times then Enter starts Amazon.

We can use the SmartThings Key ST_VD:RouterShare as a key_sequence for  the ollo69 entity media_player.samsungtv55 to select the RouterShare source.  Unfortunately, although there are other sources and Apps available in SmartThings I haven't had much luck in accessing them (yet).  In particular I have failed to access USB sticks.  As the source order changes if a USB stick is removed/inserted we cant use "arrow" keys automatically to select them.



No comments:

Post a Comment