bertbert72 / HomeAssistant_VirginTivo

HomeAssistant component for control of Virgin Media Tivo boxes
GNU General Public License v3.0
27 stars 22 forks source link

Change to a specific channel using a script? #105

Closed BryanChiTown closed 1 year ago

BryanChiTown commented 2 years ago

Hello! I am new to HA and I was able to set up this integreation for the most part. I wasn't able to figure out how to send commands to specific TiVo's (I have 3), so I removed the other 2 from the list and decided to focus on my main TV. I am trying to set up a script to change the TiVo to a specific channel. I was under the assumption that this was possible as the interface has a drop down of the channels and is updated with the specific channel the TiVo is set to at the moment. However changing the drop down does not change the channel (can't figure that out), and my attempts to send IR or keyboard command via script have been unsuccessful.

If someone can send me the specific code that I would use to change the TiVo to channel 205 that would be greatly appreciated. My TiVo name is "Living Room" and I am using the device IP to identify it 192.168.1.8

Thank you in advance for your help!

TheGosatron commented 2 years ago

Hi! Did you ever find a solution to this? Having the exact same issue, can’t seem to change channels (tried automations, scripts, calling services) nothing seems to work for me). Updates fine, super quick actually, as soon as I change on the remote HA updates instantly. Can send commands like pause just fine, just can’t change the channel. Thanks!

richard-scott commented 2 years ago

You need to use the media_player.select_source service call.

TheGosatron commented 2 years ago

Thanks yeah I tried that. Nothing in the logs. Other commands work which is strange, can pause and unpause for example. I’ll keep tinkering

richard-scott commented 2 years ago

Are you using the channel text rather than the number? Here is my automation to change to Channel 5 at 6.30am.

alias: Change to Channel 5 in the morning.
trigger:
  - at: '06:30:00'
    platform: time
condition: []
action:
  - data:
      entity_id: media_player.virgin_v6
    service: media_player.virgintivo_live_tv
  - delay: '00:00:5'
  - data:
      source: Channel 5
    entity_id: media_player.virgin_v6
    service: media_player.select_source
mode: single
TheGosatron commented 2 years ago

Thanks for that. Still can’t get this working though. My logs do look like it’s sending the command ok (logs show the TiVo on channel 102 and trying to change to 101)

2022-05-30 23:13:50 DEBUG (SyncWorker_8) [custom_components.virgintivo.media_player] Living room Virgin V6: guide found for channel 102 (102) 2022-05-30 23:13:50 DEBUG (SyncWorker_8) [custom_components.virgintivo.media_player] Channel [102] in listings: True 2022-05-30 23:13:51 DEBUG (SyncWorker_11) [custom_components.virgintivo.media_player] Living room Virgin V6: setting channel to [101] 2022-05-30 23:13:51 DEBUG (SyncWorker_11) [custom_components.virgintivo.media_player] Living room Virgin V6: connecting to socket 2022-05-30 23:13:51 DEBUG (SyncWorker_11) [custom_components.virgintivo.media_player] Living room Virgin V6: connected OK 2022-05-30 23:13:51 DEBUG (SyncWorker_11) [custom_components.virgintivo.media_player] Living room Virgin V6: reading data from socket 2022-05-30 23:13:51 DEBUG (SyncWorker_11) [custom_components.virgintivo.media_player] Living room Virgin V6: response data [CH_STATUS 0102 LOCAL ]

richard-scott commented 2 years ago

Have you enabled network remote in the VirginMedia boxes menu via your remote

TheGosatron commented 2 years ago

Thanks. Yeah, other things work fine like search and pausing TV. Feels like everything works apart from changing channel. I’ll keep trying

TheGosatron commented 2 years ago

Sorry to be clear, yes, I’ve enabled network remote

richard-scott commented 2 years ago

What about adding the media player card? You then get a dropdown for channels.

Also, are you requesting a channel by name or by number? The number way doesn't work.

TheGosatron commented 2 years ago

Thanks. Yeah the drop down does nothing for me. In the automation (or when I call the service in developer tools) I’m requesting by name (I’ve tried both ways). I’m getting the feeling it’s the TiVo, so strange. I can pause live TV for example from the media card, just can’t change channel

BryanChiTown commented 2 years ago

I am stuck at the same problem... Using dev tools: service: media_player.select_sourcedata: entity_id: media_player.family_room_tivo source: ABC ...nothing happens. All other functionality, including find remote are working. Pull down channel list shows all channels and switches to the current channel if I change it using the remote, but channels will not change when I use the pulldown. Here is my virgintivo.yaml:

Thanks. Yeah the drop down does nothing for me. In the automation (or when I call the service in developer tools) I’m requesting by name (I’ve tried both ways). I’m getting the feeling it’s the TiVo, so strange. I can pause live TV for example from the media card, just can’t change channel

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

richard-scott commented 2 years ago

Maybe try and strip out all the extra stuff, I just have this config:

- platform: virgintivo
  force_hd: true
  tvchannellists:
    enable: true
  guide:
    enable_guide: true
  tivos:
    1:
      name: Virgin V6
      host: TIVO-C68000022751B8C.home.lan
BryanChiTown commented 2 years ago

No luck...perhaps this is a function that only works with the "virgin tivo". I am using a US TiVo Edge. On Thursday, June 2, 2022, 02:53:17 PM CDT, Richard Scott @.***> wrote:

Maybe try and strip out all the extra stuff, I just have this config:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

richard-scott commented 2 years ago

Yes, this is specific to the VirginMedia TiVo used in the UK.

On Fri, 3 Jun 2022, at 22:08, BryanChiTown wrote:

No luck...perhaps this is a function that only works with the "virgin tivo". I am using a US TiVo Edge. On Thursday, June 2, 2022, 02:53:17 PM CDT, Richard Scott @.***> wrote:

Maybe try and strip out all the extra stuff, I just have this config:

  • platform: virgintivo force_hd: true tvchannellists: enable: true guide: enable_guide: true tivos: 1: name: Virgin V6 host: TIVO-C68000022751B8C.home.lan

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/bertbert72/HomeAssistant_VirginTivo/issues/105#issuecomment-1146363694, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHJJCTHKCIFN4PJF3S4UW3VNJX5LANCNFSM5VKTGBPQ. You are receiving this because you commented.Message ID: @.***>

TheGosatron commented 2 years ago

I'm on a VirginMedia TiVo. Got two (one wired and one wireless) and I can't change the channel on either. Everything else works just fine, can even use the "Media player: Pause" service to pause tv

richard-scott commented 2 years ago

I think this isn't an issue with this module, but rather the OP was using a US TiVo Edge. This module is for the UK devices.

TheGosatron commented 2 years ago

I’m using two UK VirginMedia devices