Control TiVo box over telnet

Hi
I have this working via hassio web interface but have just got a google home for Christmas. I can switch the Tivo on and off with Google Home (GH) but I can’t get GH to change channels looked at the alexa in the code and was wondering how to convert this or if it is needed to work with GH

You need to write automations to change the channel.

GH will trigger the automation in HA - you will need an automation for each channel. I posted this above somewhere, look at that

switch channel_101:
  platform: command_line
  switches:
    101_virgin:
     command_on: ''
     command_off: ''
     value_template: ""
     name: Channel one

 
automation channel1:
  - alias: Channel 1
    trigger:
      - platform: state
        to: 'on'
        entity_id: switch.101_virgin
    action:
      - service: media_player.select_source
        data:
         entity_id: media_player.virgin_v6
         source: BBC One

The switch.101_virgin acts as the trigger for the automation. By turning this on via GH will trigger the automation to change the channel.

You need one switch and one Automation per channel

Hi thanks for that I was thinking to create a script for each channel but using the included switches and automatons seams to be working ok some don’t work so some debugging is required

Thanks again

Work for me but I may have amended thst code since I posted it.

When I’m near my laptop I’ll share the updated version

going through the channels it is where you have SD and HD channels. If I say switch on BBC1 it doesn’t work but switch on BBC1 HD works I have set force_hd to false as when I said switch on radio 2 it would switch to radio 2 for a few seconds then switch back to what it was on before only problem with HD channels is they don’t show our local news.
I am busy working through the switches and just leaving the ones I would use but how do I have both HD and SD channels available?

It all depends on what you call your empty ‘trigger switches’

Mines channel 1, or e4, Dave, comedy central… Meaning I simply say, Alexa turn on channel one or, Alexa turn on Dave (fav)

Alexa, turn virgin on is also up there ha ha

1 Like

yes had to laugh the first time google replied turning the virgin on

code i have for BBC1 is

101_virgin:
   command_on: ''
   command_off: ''
   value_template: ""
   friendly_name: BBC one

and for BBC1 HD
108_virgin:
command_on: ‘’
command_off: ‘’
value_template: “”
friendly_name: BBC One HD

Just noticed the lowercase o in the first one but don’t think that would make a difference

also ITV and ITV HD do the same and they are both in capitals

This is because the example.yaml includes an example of how the source option works on channels 901 (Radio 1), 902 (Radio 2) and 903 (Radio 3). To disable it, just remove target and source from those channels.

thanks worked it out just after I posted all working fine now

Small update to the component to prevent an error appearing in the logs when the box is switched off (thanks @davesmeghead).

Also since the channel list seems to be an ever moving target and I can’t be @rsed trying to keep up with it, I’ve added a small tool (see the resources folder) which can be used to scrape the channel list site and produce a compatible .yaml file.

Hopefully it’s reasonably self-explanatory and has a config file that you should only have to set up once. Includes an override for the regional variations that are now becoming more prevalent.

Be warned that I have just thrown this together and it’s not likely to be terribly robust, but it should work well enough…

Another update, once again only for the brave. I’ve incorporated the scaping of channel information into the component itself. It’s currently in a dev branch if anyone would like to try it out.

[https://github.com/bertbert72/HomeAssistant_VirginTivo/tree/online_channel_lists]

The readme has a new section about it (tvchannellists) and example1.yaml should hopefully make it clear how to configure it.

The aim is that you make your customisations once and it’ll get the channel list each time Home Assistant starts then apply your customisations on top. The example shows how to configure most of the usual things, including the BBC One 101/108 difference for England.

Once I’m happy most of the bugs have been sorted and I finish tweaking it, I’ll merge it. Consider it as beta

I’ve been running this for the last week without any problems, so I’ve merged it in (along with a small fix for the default_is_show setting). This should make the configuration a bit smaller and more manageable. The minimal configuration required to run the component would be something like this now:

  - platform: virgintivo
    tivos:
      1:
        name: Virgin V6
        host: TIVO-C68000020000000
    tvchannellists:
      enable: True

Of course all the existing settings are still there and can be used, along with the manual channel list if desired.

@Bertbert hello mate

just played something from my HDD and the virgin box state was still reporting as playing? Something changed? Normally it goes to an off state, but its still showing whats on the last channel before i played the recording ha

Nothing that I know of. Still the same behaviour for me - playing a recording stops the box responding on the network interface. Is your scan_interval still set to 1? If not, maybe it just hasn’t updated.

any fix on the books for 0.88 update? i’m getting “platform not found virgintivo” now

Looks like quite a few breaking changes in 0.88 for custom components. I’ve pushed a change that’ll get everything back up and running for the moment with warnings. I’ll have to review what further changes will be needed and see if everything is still working ok.

Ok thanks will re download it