Control TiVo box over telnet


#243

@Rich_Paul
I have the component installed but not sure how to control via Alexa do i have to install something else to get it to work? if not what are the commands to change channel etc? Thanks in advance for any help given


#244

@garywilson4 try this

Everything you need is on th a thread


#245

could you elaborate a bit please ;p lol


#246
switch channel_28:
  platform: telnet
  assumed_state: True
  switches:
    e4_virgin:
     resource: '192.168.0.10'
     port: 31339
     command_on: 'SETCH 106'
     command_off: 'SETCH 106'
     name: Channel one

The above is using a cmd line switch.

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 above uses the component. Both found in this thread.


#247

More… im using an empty switch which does nothing ,as the trigger, that way i can use it through alexa

edit:

in the same automation i reset my switch to the off position each time it fires, so its ready for next time:

  • service: homeassistant.turn_off
    entity_id: switch.101_virgin
    Its a bit of a mouthful, but no different from using an input_select i guess

#248

ok before i try to go further i’m getting some errors in the log

Empty response for command:

12:13 AM components/switch/telnet.py (WARNING)

Command “” failed with exception: ConnectionResetError(104, ‘Connection reset by peer’)

12:13 AM components/switch/telnet.py (ERROR)

Update for switch.tivo_info fails

12:13 AM components/switch/telnet.py (ERROR)

Virgin: timeout on connection, will retry

12:13 AM custom_components/media_player/virgintivo.py (WARNING)

Empty response for command:

12:13 AM components/switch/telnet.py (WARNING)

Empty response for command:

12:13 AM components/switch/telnet.py (WARNING)

Updating virgintivo media_player took longer than the scheduled update interval 0:00:01

12:12 AM helpers/entity_platform.py (WARNING)

Updating virgintivo media_player took longer than the scheduled update interval 0:00:01

12:12 AM helpers/entity_platform.py (WARNING)

Update for switch.tivo_guide fails

12:12 AM components/switch/telnet.py (ERROR)

Update for switch.tivo_info fails

12:12 AM components/switch/telnet.py (ERROR)

Updating virgintivo media_player took longer than the scheduled update interval 0:00:01

12:12 AM helpers/entity_platform.py (WARNING)

Virgin: timeout on connection, will retry

12:12 AM custom_components/media_player/virgintivo.py (WARNING)

Empty response for command:

12:12 AM components/switch/telnet.py (WARNING)

Empty response for command:

12:12 AM components/switch/telnet.py (WARNING)

Virgin: timeout on connection, will retry

12:12 AM custom_components/media_player/virgintivo.py (WARNING)

any ideas what i’ve done wrong before i move on to the switches? this repeats over and over


#249

What approach are you using?

Try the example I gave


#250

i’m brand new to hass.io and i’m not entirely sure of what i’m doing, for the moment i’ve removed it all from my configuration.yaml file. as for your example i just don’t understand it and therefore how to implement it is beyond my scope for now. I’ll mess with it again later today


#251

ok i’m ready to mess with this again today :grinning:
as for approach i was hoping for a plug and play option with maybe a little bit of yaml coding but it seems that option isn’t available yet so I really need walking through things a little which approach would you recommend ?
using the component in your example looks complicated and i’m not sure where it all goes (and how it works) i.e do i have to set up the empty switch for each channel? maybe you could share the tivo sections of your yaml files to give me a base as to where to start? it would be very helpful rather than taking up a lot of your time trying to help in here


#252

@Bertbert seems your channel list is outdated again


#253

@Rich_Paul I don’t know where i’m going wrong I can’t get alexa to find the new switches in HA using the component version you posted and it’s took me all day to figure out that name should be friendly_name in that example too if i had much hair i’d be pulling it out now lol


#254

Thanks for the heads-up. I’ve updated example.yaml accordingly.


#255

ok got alexa finding them now i had put the automation in automation.yaml and it didnt like that


#256

@Bertbert don’t know if its possible but is there a way to have the channel list show depending on the package you have i.e mix or player or full house etc the way i envision it would be an input option for the packages and then it sets the show to true for the channels in that package (you could also include HD and +1 in that selection too)
also don’t know if you know of this site it may be of help to you


#257

Oh yea I have everything in one file. You’ll have to drop the automation xxx: and add an id as far as I know. I’m also on hassbian, not hassio.

Have you got it working now? I’d recommend using @Bertbert component over my switch. If you have both it can cause issues as telnet only really works with one connection at a time


#258

Yeah I think I got it now I’m mainly using the component but have guide and info set up using yours as I haven’t figured out how to do it the component way yet. I’m going to try splitting them out again tomorrow as I think it was the formatting I got wrong before. I can but try and if it doesn’t work I can put them back


#259

Btw is it normal to get 2 devices per switch in Alexa I think one is the automation and one is the switch?


#260

It would be possible to have something defined in the yaml, e.g.

  - platform: virgintivo
    default_is_hd: true
	show_packages: Free-to-air,Player,Mix,Fun,Full House
...
    channels:
      100:
        name: Virgin Media Previews
        package: Mix
...
      122:
        name: Sky Arts
        hd_channel: 206
		package: Mix
		show: false
...
      204:
        name: Netflix
		package: Premium
		show: true

Is that what you’re thinking? In the example above, it’d show everything bar the Premium and Pay-per-view packages and Sky Arts, but would include Netflix.


#261

yes that way you could just add the package you have and only those would show in the list. Is this something you need to implement in the python script or is it purely done in the yaml file?


#262

I’ve now implemented it in the component and updated the channel list with the package name. Usage is pretty much what I put above, e.g.

show_packages: Free-to-air,Player,Mix,Fun,Full House,Premium,Pay-per-view

This takes priority over the default_is_show setting if both are set. It’s optional, so if ommitted it’ll work as before.