@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
could you elaborate a bit please ;p lol
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.
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
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
What approach are you using?
Try the example I gave
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
ok iām ready to mess with this again today
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
@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
Thanks for the heads-up. Iāve updated example.yaml accordingly.
ok got alexa finding them now i had put the automation in automation.yaml and it didnt like that
@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
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
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
Btw is it normal to get 2 devices per switch in Alexa I think one is the automation and one is the switch?
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.
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?
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.