Control TiVo box over telnet


#203

You’d think so but sadly even when the box is on standby it returns CH_FAILED NO_LIVE.


#204

A number of services are now available for automations: find_remote, ircode, keyboard, last_channel, live_tv, plus_one_on, plus_one_off, search, subtitles_on, subtitles_off, teleport.

Hopefully all reasonably self explanatory (Google teleport or refer to the Tivo documentation). There are 2 optional parameters, entity_id and command. If no entity_id is supplied all the Tivos are sent the same commands. The command parameter is used with ircode, keyboard, search and teleport.

An example with search would be:

media_player.virgintivo_search

{
  "entity_id": "media_player.virgin_v6",
  "command": "family guy"
}

Specifically for search, I’m in two minds as to whether to go the whole way to the programme’s page, or whether to just do the search and let the user do the rest. I’ll take any feedback on board.


#205

**Deleted

never mind it was my fault. Re-downloaded the virgintivo.py and fixed


#206

@Bertbert

hi mate mines just stopped working all of a sudden - iv rebooted everything and still nothing - im on 74.0 now - not sure if its related

2018-07-26 21:14:32 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform virgintivo
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
    return fut.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/media_player/virgintivo.py", line 152, in setup_platform
    force_hd_on_tv, guide, keep_connected))
  File "/home/homeassistant/.homeassistant/custom_components/media_player/virgintivo.py", line 243, in __init__
    self.get_guide_channels()
  File "/home/homeassistant/.homeassistant/custom_components/media_player/virgintivo.py", line 262, in get_guide_channels
    "url": next(iter([a["url"] for a in urls if a["assetType"] == "imageStream"]), None),
  File "/home/homeassistant/.homeassistant/custom_components/media_player/virgintivo.py", line 262, in <listcomp>
    "url": next(iter([a["url"] for a in urls if a["assetType"] == "imageStream"]), None),
KeyError: 'assetType'

#207

I don’t think it is 0.74.0 although I haven’t upgraded yet myself. From the trace, I’d say some of the elements in the guide feed are missing, probably for a particular channel. Which channel are you on (it only loads when you switch to that channel)? I think i can easily fix it but best if I can replicate it first.

Edit:

I’ve gone through every channel and none of them should give that error. If it isn’t just one channel, could you switch on debug logging for the component and send me the log for say a dozen lines up to the error?

logger:
  default: error
  logs:
    custom_components.media_player.virgintivo: debug

#208

Yeah man I’ll do that shortly. Pretty sure I hadn’t changed my config either


#209

Mine has randomly stopped working as well. It happened the other day and i deleted the .py file and redownloaded again and it started working again untill today. Now it shows as being On (Its not) and i get a broken pip error again.

Edit****

I done a reboot and im now getting the same error as Rich_Paul


#210

I am at work at the moment and logged into my superhub. It doesn’t show the tivo box being connected. I know im on wifi with the tivo so this may be the problem. I will wire it up after work and let you know how i get on.


#211

Ok, found the problem with the component not starting. They seem to have mucked up channel 293 for some reason (they have a station logo with no asset type). Anyway I’ve updated the code to handle it. Should be working now.


#212

Nice one! Might be other issues soon - virgin removed channels and added a few more


#213

Yeah, I’ve updated example.yaml with the new/changed channels. I miss Dave already…


#214

Noticed alot of activity in the logbook…

its not affecting my automations luckily and the box isnt switching on and off like it says it is - odd


#215

Is this a new thing or has it always done it? Are there any warnings appearing in the logs, particularly ones where it says “will retry”? There are a limited number of places that could be coming from, so I think it’ll be because the connection attempt is timing out.


#216

Working great again. Thanks for making this!

I put an Ethernet cable in my V6 then restarted it. When it switched back on it came up with “Network Availability” and the component failed to start (Connection refused in logs) and i was unable to telnet to the V6 from my laptop either. Unplugged the ethernet, It connected back to the wifi automatically, Still getting errors so i went to Settings > network > connect to virgin media service now. This done its thing and the network availability error was gone and i could telnet again, restarted HA and everything working again. I plugged the ethernet cable back in and the same happened again. I tried setting the network up again through the settings etc but still wont work. Cant see how to forget my wifi settings on it either.

One small thing, I have turned Force HD off… If like me, You like to “flick through” the channels… You cant with force HD on. Say, You press 101… It then auto changes to 108 (as its HD)… then press channel up and instead of 102 you are on 113 STVHD… No big deal

Anyway, everything else is working great. I have it set up with alexa, to find my remote which is really really handy lol… Not that i need it if i can tell her to put on any channel

Thank you!


#217

I don’t channel surf like this but my wife does and complains about this too. One idea does come to mind but not sure how workable it’ll be. I’ll have a think.


#218

@Bertbert

https://www.moneysavingexpert.com/news/broadband/2018/08/uktv-channels-return-to-virgin-media

Another update required soon!


#219

Hooray! Ok, that’s the UKTV channels reinstated in the example.yaml. They haven’t published the channel number of Gold HD yet, but I’ll add that when available. I haven’t checked to see what mayhem is happening in the guide because of all this…


#220

@Bertbert

I have 2 automations which will skip a 3 or 5 minute break using my ADVANCE command and toggling the switch on/off ten times. Works most of the time, but sometimes it will only do 2 mins of the 5 etc…

Any chance of incorporating thst into this component?


#221

@Bertbert Sorry I’m a bit new to HA and am running Hass.io. What do I need to have installed aside from your .py code ? Do I need to have Telnet switch setup ? Tried with both a keepconnected Telnet connection and ad hoc.

Update: To answer my own question - yes as a pre-requisite you need to have the Telnet Switch add in installed and set up !


#222

Oh…Poo-sticks! I’m getting rid of Virgin, and it’s going tomorrow! Damn, I wish I’d seen this thread sooner :-/