Custom Component: SkyQ Media Player

Possibe feature request, is it possible to have the “find remote” feature by a virtual press of the boxes Q button…

No. As far as I am aware this is not available in the SkyQ api. But then there is no public documentation of the api, so it maybe I just haven’t been able to identify that function. That said the feature is achieved via a physical button on the SkyQ box so probably there is no need for them to expose it in the api.

Sorry.

ok thanks for your reply, looks like its another job for a D1 mini !

I have installed this and I can control the power from HA dashboard but my automations do not work.

I have created an automation which changes a hdmi switcher to the SKY input when the action ‘sky q turned on’ but when I turn on the sky q box either with the remote or the HA dashboard, it does not trigger the automation.

Any ideas?

alias: Neo sky test
description: ""
trigger:
  - platform: device
    device_id: fdfddfd
    domain: media_player
    entity_id: fdfdfdfdfdfd
    type: turned_on
condition: []
action:
  - device_id: fdfddfd
    domain: select
    entity_id: fdfdfdfd
    type: select_option
    option: HDMI 4
mode: single

Sky Q doesn’t currently support a device trigger, use a state trigger :grinning: It does support a device action though. Confusing I know, just not been requested to do triggers yet, and I’m focused on something else at the moment. If you feel you need device triggers, please raise a feature request on my GitHub.

Thanks. Now need to work out how to do that and also what a state trigger is :rofl:

Unable to install and use 2.11.6 version with home assistant 2023.10
Every time I try to restart home assistant after configuring the media player in the configuration.yaml file I get the error “Platform error media_player.skyq - No module named ‘pyskyqremote’”. How can I solve it?

Any errors in the event log other than that?

no no log…but where should I find the log? there are none in the system ones

For some reason it seems your install is unable to download the appropriate module which should be done automatically by HA. I would suggest setting it up via the UI, to see if that will install it.

## This device cannot be added from the UI

You can add this device by adding it to your 'configuration.yaml'. See the documentation for more information.

This is my configuration.yaml that doesn't allow rebooting. He's a dog chasing his tail
media_player:
 - platform: skyq
   name: SkyQ Living Room
   host: 192.168.1.101
   live_tv: True
   sources:
      Rai 1 HD: '5,5,0,1'
      Rai 2 HD: '5,5,0,2'
      Sky TG24 HD: '1,0,0'
      Sky Arte HD: '4,0,0'
      History HD: '4,1,1'

image

There would seem to be something strange with your environment. How do you install the integration? Did you use HACS? Did you reboot HA prior to adding it to config.yaml? If not, remove it from your config, reboot, add it to your config and reboot again.

Installed via HACS, I restarted it the first time but also subsequently. Could you possibly tell me how to manually insert the missing module inside the folder and/or how to configure the component files please? Thank you

Sorry I don’t know.

I would remove the entries from config.yaml, reboot then added via UI, won’t need another reboot then. If that doesn’t work, you need to query with the HA team as to why it isn’t installing the manifest requirements.

Thank you!

Thanks to this HA AddOn and ESPhome using and ESP8266 with an 256x64 Pixel SSD1322 Display my Sky Q Receiver finally has an Display to Show the Channel and Titel of what is currently running (Apps Like Netflix and Spotify are also shown (sadly apps Name only in Channel Position)

any chance you could share your code for that?

Sure

i created some Sensors to access the information i want from the SKY Q Media Player Entity:

- platform: template
  sensors:
    sky_playing:
      value_template: >-
        {{ state_attr('media_player.sky_q', 'media_title') }}: {{ state_attr('media_player.sky_q', 'media_series_title') }}
    sky_channel:
      value_template: >-
        {{ state_attr('media_player.sky_q', 'media_channel') }}
    sky_titel:
      value_template: >-
        {{ state_attr('media_player.sky_q', 'media_series_title') }}
    sky_channel_app:
      value_template: >-
        {{ state_attr('media_player.sky_q', 'media_title') }}

This is my ESPhome file for the Display

esphome:
  name: skyq-display

esp8266:
  board: nodemcuv2

# Enable logging
logger:
  logs:
    component: ERROR

# Enable Home Assistant API
api:
  encryption:
    key: "y6yokoibn4fJtNK2SyRhsDSRLGgXMMeKnrmVylGRJ4U="

text_sensor:
  - platform: homeassistant
    entity_id: sensor.sky_channel
    id: skyq_channel
  - platform: homeassistant
    entity_id: sensor.sky_channel_app
    id: skyq_channel_app
  - platform: homeassistant
    entity_id: sensor.sky_titel
    id: skyq_titel  

ota:
  password: "cef834d1f320b4eb97d246ccaec15eae"

wifi:
  networks:
  - ssid: !secret wifi_ssid2
    password: !secret wifi_password2

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Skyq-Display Fallback Hotspot"
    password: "It8RNkRe07z8"

# I2C Display
#i2c:
#  sda: D2
#  scl: D1

spi:
  clk_pin: D7
  mosi_pin: D5

font:
  - file: "gfonts://Roboto"
    glyphs:
      ['&', '@', '!', ',' , "'", '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°','=', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','ß','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/',
       '*','#','$',';','<','>','´','`','§']
    id: roboto
    size: 25

globals:
  - id: coords
    type: int
    restore_value: no
    initial_value: '0'
  - id: length
    type: int
    restore_value: no
    initial_value: '0'

display:
  - platform: ssd1322_spi
    model: SSD1322 256x64
    reset_pin: D0
    cs_pin: D8
    dc_pin: D1
    lambda: |-
      if (id(skyq_channel_app).state != "unknown") {
        it.printf(0, 0, id(roboto), "%s", id(skyq_channel_app).state.c_str());
      }

      if (id(skyq_titel).state != "unknown") {
        std::string title = id(skyq_titel).state.c_str();
        int titleWidth = title.length() * 10; // Adjust the multiplication factor if needed
        int displayWidth = 256; // Adjust this to the actual display width
        if (titleWidth > displayWidth) {
          // Scroll the title
          if (id(coords) < -titleWidth) {
            id(coords) = displayWidth; // Reset coords immediately
          } else {
            id(coords) -= 30; // Adjust scrolling speed if needed
          }
          it.printf(id(coords), 35, id(roboto), "%s", title.c_str());
        } else {
          // Print the title normally if it fits within the display width
          it.printf(0, 35, id(roboto), "%s", title.c_str());
          id(coords) = displayWidth; // Reset coords for non-scrolling case
        }
      }

captive_portal:

The “lamda” code looks wired as i added “scrolling text” for the Media Title if the Name is larger then the display

thanks for that I will be gettiing my soldering iron out this afternoon!

Hi everyone,
I can’t start the apps, because if I try to do the same as for the channels, using the “media_player.select_source” service it doesn’t work, can you help me understand where I’m wrong?
Thank you