Skip to content

grubhunter66/Home_Assistant_SkyQ_MediaPlayer

 
 

Repository files navigation

Validate with hassfest Hacs Validate CodeFactor Downloads for latest release

GitHub release maintained maintainer hacs_badge Community Forum

Sky Q component for Home Assistant

The skyq platform allows you to control a Sky Q set top box.

Note: Whilst it will pull back information for current channel and live programme, it will do this for a very limited set of countries (currently UK, and any countries that use the same EPG/images, plus Italy and Germany). If you are in an unsupported country, or don't want this information set 'live_tv' to False in your config.

If you are able to supply details on where to reliably retrieve EPG information and images from, please raise a Feature Request with the relevant details and I'll look to include.

There is currently support for the following device types within Home Assistant:

  • Media Player

Screenshots

Component showing current TV with default media control

Component showing application with default media control

Component showing recording with Mini Media Player

Media Browser

Installation

You can use HACS by adding this repository as a custom Integration repository in HACS settings, or install the component manually:

  • Put the files from /custom_components/skyq/ in your folder <config directory>/custom_components/skyq/

For either install method you must also if you want to get application images (such as Netflix):

  • Put the files from /www/community/skyq/ in your folder <config directory>/www/community/skyq/

Media Player Configuration

There are two methods of configuration, via the Homa Assistant Integrations UI dialogue or via YAML. You cannot use both for the same Sky Q box, please use one or the other. Previous YAML configurations are not migrated to the UI method, please continue to use YAML, or delete YAML, reboot and add via UI.

Integrations UI (from v2.2.0)

On the Integrations page, click to add a new Integration and search for Sky Q. Sky Q will only be visible if you have previously installed via one of the methods above and have restarted Home Assistant.

You will be asked to enter a host (which must be contactable on your network and name). The name defaults to Sky Q. Assuming the Sky Q box is switched on and the details are correct a device and entity will be created and be useable. You can then configure other items by clicking on Options on the Sky Q Integration card. Details are below.

YAML

Add a skyq platform entry in your configuration.yaml as below.

Example of basic configuration.yaml

media_player:
 - platform:  skyq
   name: SkyQ Living Room
   host: 192.168.0.10
   live_tv: True
   sources:
      SkyOne: '1,0,6'
      SkyNews: '5,0,1'

Configuration variables

YAML UI Default Details
platform
(string)(Required)
n/a Must be set to skyq
host
(string)(Required)
Host The IP of the SkyQ set top box, e.g., 192.168.0.10.
name
(string)(Required)
Name The name you would like to give to the SkyQ set top box.
sources
(list)(Optional)
Custom Sources Empty List of channels or other commands that will appear in the source selection.
output_programme_image
(boolean)(Optional)
Show programme
image
True Allows you to disable returning images when watching recorded programmes. Useful if using a modified media player UI, where you don't want the background changing.
live_tv
(boolean)(Optional)
Show live TV
details
True Allowsyou to disable the retrieval of live TV programme information. Useful for people in those countries where the TV schedules are not available from current known sources.
country
(string)(Optional)
Override Country Empty Overrides the detected country from the SkyQ box. Currently supports "GBR", "ITA" and "DEU". In theory you shouldn't need to use this.
volume_entity
(string)(Optional)
Entity to control
volume of
Empty Specifies the entity for which volume control actions will be passed through to. No validation of the entity is done via the UI, warnings will show in the log if an invalid entity is used. Must be a media_player entity. e.g. media_player.braviatv
epg_cache_len
(integer)(Optional)
EPG Cache Length. 20 Allows you to configure the number of EPG channels to cache for the media browser. Larger numbers will cause slower initial load per day and consume more memory.

Sources

To configure sources, set as:

Via UI

{"<YourChanneName>": "<button>,<button>,<button>", "<YourChanneName2>": "<button>,<button>,<button>"}.

Example

{"BBC1HD": "1,1,5", "BBC2": "1,0,2"}

Via YAML

<YourChanneName> : ‘<button>,<button>,<button>’.

Example

  BBC1HD: "1,1,5"
  BBC2: "1,0,2"

Supported buttons

  • sky, power, tvguide or home, boxoffice, search, sidebar, up, down, left, right, select, channelup, channeldown, i, dismiss, text, help,
  • play, pause, rewind, fastforward, stop, record
  • red, green, yellow, blue
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Next/Previous Buttons

The behaviour of the next and previous buttons is fastforward and rewind (multiple presses to increase speed, play to resume)

Sending Button Commands

If you are using Mini Media Player or some other player that supports sending 'play_media' commands, you can configure this in the front-end rather than having to configure a source and then assigning it to a button. For example, the below will send the 'channelup' button command to the Sky box:

shortcuts:
  buttons:
    - icon: 'mdi:chevron-up'
      id: channelup
      type: skyq

Media Browser

Fetching data to support live programme information for the Media Browser is data intensive, so the information for upto 20 channels are cached to improve performance. The first media browser access per day will be slow (whilst the data is fetched), further accesses will utilise cached data. If the programme line up for a channel changes during the day, this will not be reflected in the media browser.

Images for the current live programme on each channel should show along with the title of each programme. These are identified via the channel number, so if you are using a 'custom' source with a Sky Q favourite it won't be able the live programme. Applications can be included, but for an image to show the image file name in your www directory needs to match the name of the custom source.

Switch Generation Helper

A utility function has been created to generate yaml configuration for SkyQ enabled media players to support easy usage with other home assistant integrations, e.g. google home

Usage based on google home: “turn on <source name / channel name> in the ”

Configuration

YAML UI Default Details
generate_switches_for_channels
(boolean)(Optional)
Generate switches for channels False Generate switches for each item listed in source. The files will be generated in /skyq.yaml
room
(string)(Optional)
Room name Default Room The room where the SkyQ set top box is located.

Avoid using [ ] in the name: or room: of your device. This field is required if you have more than one SkyQ box being configured with switches

Example configuration.yaml with switch generation

media_player:
 - platform:  skyq
   name: SkyQ Living Room
   host: 192.168.0.10
   sources:
      SkyOne: '1,0,6'
      SkyNews: '5,0,1'
   room: Living Room
   generate_switches_for_channels: true

To integrate these generated switch configuration files, add the generated yaml to your configuration.yaml. The following example configuration implements the generated switches from the generate_switches_for_channels function.

switch:
- platform: template
  switches: !include  skyq<room>.yaml

About

Home Assistant SkyQ Media player component

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%