Control TiVo box over telnet

@Wishywash

So I have confirmed and tested that my box HA now turns over my Tivo box. Thanks for all your help

Now for the sexy bit - Do you have a link or guide so I can now get Alexa integrated so I can turn the channel over via the echo

First I would just try to setup the Emulate Hue component - that the easiest way - if you get that up and running your echo should just discover all your switches (channels) as devices and then you can tell them to ‘turn on channel name’.

If that doesn’t work (as it didn’t for me) - you can go down the Haaska route - but that is a bit harder and needs more manual work to get it working - the setup instructions are all on the Github page here and Bruh also made a good video for this here - the only change I had to make was when setting up the Lambda (you’ll get to that bit) you have to select a server in N. Virginia - I had to change this to Ireland for it to work in the UK) but seriously TRY EMULATED HUE FIRST.

Ok so I added the command @Wishywash

emulated_hue:
type: alexa
listen_port: 80

to my config file but am not at home to test at the moment so tried the 2 url’s in the guide

http://:8300/description.xml and http://:8300/api/pi/lights

However both bought page hmmm we cant find that page

reading further down the page I saw I might need to do this on the raspberry pi

sudo setcap ‘cap_net_bind_service=+ep’ /srv/homeassistant/homeassistant_venv/bin/python3

BUT when I ran this I got the error below

Failed to set capabilities on file `/srv/homeassistant/homeassistant_venv/bin/python3’ (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

Im doing some more digging at the moment but wondered if im going along the same lines as you were

I know it sounds crazy because Haaska is the harder option, but I honestly didn’t try that hard with Hue - I saw Bruh had a video for Haaska, trusted his other videos and decided to do that (trust me I regretted it, but 3 hours in it was to late to turn back) - I’m sat at my desk at work at the moment, so I can’t see my config, but I suspect that last command file because your file structure is slightly different (depends how you installed - hasbian, Jessie + HA etc…) - I’ll have a look at mine when I get home or you can use winSCP to look for the homeassistant_venv folder and go from there.

I’d also search this community for Emulated Hue set up problems - people have probably had and flagged these issues before.

1 Like

2 Likes

Thanks @Rich_Paul

Other than that small bit of config is there anything else that needs to be done for the Alexa integration ??

Also is the listening port always 8300 assuming I have installed everything via default setting ?

Also is there any way to test the functionality other than asking Alexa the questions ?

Emulated hue never worked? How come?

You need to discover devices on your alexa. Either by using the app or asking her. Politely of course.

If the switch works in ha it will work in alexa as long as she finds the devices. I never had any problems with hue personally. In fact, it was probably the only component which worked first time for me.

@Rich_Paul

So on my Alexa app on my phone I have been into the smart home options I have clicked discover devices and all it finds is my Philips Hue lights (it is asking for me to hit the button on my hue bridge) which I did

Do I need to do anything ??

Also is the port 8300 (as on your set up the default listening port)

emulated_hue:
type: alexa
host_ip: 192.168.0.2
listen_port: 8300
exposed_domains:
- light
- switch
- media_player

Is that your pi ip?

Needs to be your pi ip. Check the documentation on the site for config.

They use port 80 in there example. Nit sure why mines on a different one, but it works for me

What’s your log say?

1 Like

@Wishywash @Rich_Paul

Guys , I love you all. after playing for a little bit yesterday this is now all up and running

Many thanks for your help and patience

1 Like

What did you fix?

You all up and running mate?

@Rich_Paul , Yes mate many thanks, I had the right port but I thought it was the ip address of the echo not the home assistant server (school boy error). Once I corrected this it is all good

One thing now just so I can add some extra functionality.

  1. I looked in your code and couldn’t find anything to bring the guide up. I did you the syntax for the pause switch and replaced the pause with guide but that didn’t seem to work ??

  2. I have parental controls (pin) on the channels for after 10pm or for films that are 15 , 18 etc , is their any code for adding numbers for a pin number ?

thanks again for all you help

I got most my ir commands from that page I posted initially. Alot of those were found from trial and error.

My advice to you would be to telnet into virgin box from command line

telnet ip 31339

And simply try all the variations guide could be

IRCODE GUIDE
… OPENGUIDE

Could be anything really. Whilst your looking for that, last channel or recall would be a good one to find if you have time! I tried but couldn’t find anything…

Parental controls… I’m guessing not using a cmd line statement. However, you can can call scripts in ha (which is what I was doing to change channel before running it straight on the command line) so I guess if you new all the buttons you needed to push to set a parental lock, you could script it in either python or shell.

I wouldn’t be able to help with that though, google us your best bet.

The above took me quite alot of research and test before I nailed it. My previous attempts tool over 18 seconds to change the channel, then I got it 8 seconds, then 3, now under one. It’s quite fun aswell.

Thanks @Rich_Paul, must admit I’m having lots of fun trialing and erroring with the commands I will continue to develop and see how I get on

If I get I find the other codes I will keep you informed

@Wishywash and @Rich_Paul

So just an update for you. The IROCDE GUIDE does work via telnet so that is correct syntax although at moment still cant get it working with Alexa but I will continue to play and get that right

I have also moved on to my Plex Server and has some questions about that.

I do have discovery turned on and for some reason it discovers 2 instances of Plex Media Server. It is asking me to configure. When I select configure it is asking me for my X-Plex-Token key. I have followed the instructions and found this using the xml function within the plex library item. However when I copy and paste this code into either of the 2 discovered Plex functions it says code failed to register

I turned off discover and created a plex.conf (see below)

{“192.168.0.13:32400”: {“token”: “MY TOKEN IN HERE”}} but then i didnt get anything appear in my console

Any of you guys had any issues with Plex ?

@Paul_Duggins

Glad you got it sorted and Alexa is working.
I didn’t have any problems with Plex - it just found the one and took the token.

When you say it finds nothing, did you add the below back into your configuration after you turned discovery off?

media_player:

  • platform: plex

Also have you changed the default group at all? Because nothing will ‘automatically’ show once you’ve done that, you have to put everything in a group to have it show up.

BTW - you should really start a new thread for this issue, since it’s unrelated to the TIVO/Alexa piece.

1 Like

Hello @Wishywash ,

Did you ever share all your switches for all the channels you added? I wanted to add some more and remembered you said you had added a few?

Cheers mate

Quick note to this which no-one seems to have mentioned: if this doesn’t work, try turning on Network Remote Control in Home > Help & Settings > Settings > Network > Change Network Settings as this doesn’t seem to be on by default in recent standard Tivos. Port 31339 isn’t discoverable using nmap as it’s passive.

Also port 443 is open and accessible through a web browser with a self-signed SSL certificate. It is password protected but the username is tivo and the password is your media key. According to this: http://adriancallaghan.co.uk/remote-controlling-tivo/ it is accessible with the standard Tivo API.

Tivos are discoverable through avahi and return the following services:

  • Web Sites
  • _tivo-device._tcp
  • _tivo-videostream._tcp
  • _tivo-mindrcp._tcp
  • _tivo-remote._tcp