SkyQ Receiver Binding [3.2.0;3.9.0)

SkyQ Binding

This binding provides control and status information functions for SkyQ receivers.

Supported Things

SkyQ receiver.

Discovery

Currently no discovery is implemented

Thing Configuration

Use the UI to add the receiver as a thing and provide the following configuration options

Parameter Required Default Description
Hostname yes N/A The IP address of the SkyQ receiver to control
MAC Address no “” (empty string) The MAC address of the SkyQ receiver to control
Enable Configurable Preset no true Enables the configuration of the channel preset (see below)
Refresh Interval yes 30 The interval for refreshing the item states in seconds
Retry Polling yes 60 The interval for retrying the connection to the recevier after it went offline
Status Check Interval yes 60 The interval for checking if the receiver is reachable (online)

Channels

Channel Type Description
control#controlCommand String Sends a remote control command to the device (see below)
control#channelPreset String Holds list of channels from receiver and allows switch to a selected channel. The list and order of the channels can be configured through a file (see below).
control#channelFavorites String Holds list of favorite channels from receiver and allows switch to a selected channel.
control#power Switch Switches the receiver ON or OFF. The receiver has to be in standby mode for this to work.
statusChannels#currentChannelTitle String Shows current live TV channel title if available
statusChannels#powerStatus String Shows power state ON, OFF, or STANDBY
statusChannels#currentTransportState String State of current transport stream (PLAYING etc)

Control commands

The control#controlCommand channel supports the following commands that are defined as state options:

Value Label Description
power Power
select Select
backup Back/Up
dismiss Dismiss
channelup Channel up
channeldown Channel down
interactive Interactive
sidebar Sidebar
help Help
services Services
search Search
tvguide TV guide
home Home
i i
text Text
up Up
down Down
left Left
right Right
red Red
green Green
yellow Yellow
blue Blue
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
play Play
pause Pause
stop Stop
record Record
fastforward Fast forward
rewind Rewind
boxoffice Box office
sky Sky

Defining macros

The controlCommand channel supports sending multiple commands to the device. This allows the definition of macros by the following procedure:

  1. Define a String typed item linked to the controlCommand channel
  2. Add State Description metadata to the item
  3. A macro is defined by each option (line) within the Options section. The option value represents the semicolon separated sequence of commands of the macro, and the label the macro name.
  4. A special command sleep is used to delay the sending of the commands by a fixed but short period. This might be required for certain sequences of commands because sometime some commands are swallowed by the box.

Example

State options that define macros for opening the prime video app of for showing the top series page

interactive;down;down;down;select=prime video
home;sleep;down;down;down;sleep;right;right=Top Series

Note the sleep command here which is required to get reproducable results.

Configurable channel presets

To ease the selection of a large number of TV preset channels, the channels for selection can be filtered and sorted by use of a configuration file.
This feature can be enabled by setting the thing configuration Enable Configurable Presets and saving the new configuration.

If this feature is enabled, the complete channel list as requested from the receiver on each initialization will be stored
as a csv formatted file /userdata/config/skyq/channel_presets.csv.

To filter and sort the channels list, edit the file and set the value of the last column named Rank as follows:

Rank value Effect
< 0 channel is excluded
0 channel is added to end of preset list
> 0 channel is added in the order of the rank value

Channels with same rank value will be ordered by the display number.

A refresh of the preset channels after a change of the csv file can be triggered by issuing the command --REFRESH-- which is added as first
pseudo channel to the list.

Full Example

skyq.things:

Thing skyq:skyqreceiver:skyq1 [ hostname="192.168.1.2", configurablePresets=true, retryInterval=60, checkStatusInterval=60, refreshInterval=30 ]

skyq.items:

String sky_command "[%s]" {channel="skyq:skyqreceiver:skyq1:control#controlCommand"}

Main UI Examples

Control command cell

When clicked, a control command is send to the receiver on selection from a drop down list

YAML definition of cell

component: oh-label-cell
config:
  action: options
  actionItem: SkyQReceiver_ControlReceiverCommand
  expandable: false
  item: SkyQReceiver_ControlReceiverCommand
  stateAsHeader: true
  title: Control Receiver Comman

Preset cell

When clicked, a custom widget is opened with a list of the possibly filtered and ordered list of channels.
This list can be further filtered. On selection of a channel item, the receiver will switch to this channel.

YAML definition of cell

component: oh-label-cell
config:
  action: popup
  actionModal: widget:widget_tv_preset
  actionModalConfig:
    item: SkyQReceiver_ChannelPreset
    prop1: Select channel
  expandable: false
  item: SkyQReceiver_ChannelPreset
  title: TV Channel

YAML definition of custom widget

uid: widget_tv_preset
tags: []
props:
  parameters:
    - description: A text prop
      label: Prop 1
      name: prop1
      required: false
      type: TEXT
    - context: item
      description: An item to control
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Nov 19, 2021, 5:34:29 PM
component: f7-card
config:
  title: =props.prop1
slots:
  default:
    - component: f7-list
      config:
        virtualList: true
      slots:
        before-list:
          - component: oh-input-item
            config:
              icon: f7:search
              iconColor: gray
              outline: true
              placeholder: Suche
              type: text
              variable: channelFilter
        default:
          - component: oh-repeater
            config:
              filter: loop.option.label.toLowerCase().includes(vars.channelFilter.toLowerCase()) == true
              for: option
              fragment: true
              itemOptions: =props.item
              sourceType: itemStateOptions
            slots:
              default:
                - component: oh-list-item
                  config:
                    action: command
                    actionCommand: =loop.option.value
                    actionItem: =props.item
                    popupClose: true
                    title: =loop.option.label

Changelog

Version 3.4.0

  • Improved power on/off handling
  • Fixed issues with non-refreshing states
  • Added macro feature for control commands

Version 3.2.0-1

  • Fixes issues with up command not working

Version 3.2.0

  • Initial stable release

Resources

https://github.com/andan67/openhab-addons/releases/download/openhab-addons-skyq-3.4.0/org.openhab.binding.skyq-3.4.0.kar

5 Likes

Thank you for the binding, I will test it soon.
Can you provide a textual Thing configuration as well?

Until now I am only aware of jar files to be added to addon dir. Can I put the kar file as well, does it behave the same way?

I’ve added a thing configuration example in the initial post.

The kar type file can be used the same way as a jar file. If you are running a recent OH 3.2 version I’d suggest to install the bnding directly from the marketplace.

Your example has a small bug, please change dot to colon:
skyq:skyqreceiver:skyq1

Maybe you can also add an example for the channel definition via item file:

String sky_command "[%s]" {channel="skyq:skyqreceiver:skyq1:control#controlCommand"}

Thanks for the great binding!

I do also have two question:

request for a new feature:
Is it possible to get the state of the skyq? If power is on or off?

log handling:
Everytime I send a command I do get a “INFO” message in the log:

2021-11-24 19:24:46.920 [INFO ] [ab.binding.skyq.internal.SkyQHandler] - Handle command : power
2021-11-24 19:24:55.296 [INFO ] [ab.binding.skyq.internal.SkyQHandler] - Handle command : power
2021-11-24 19:25:08.843 [INFO ] [ab.binding.skyq.internal.SkyQHandler] - Handle command : home
2021-11-24 19:25:14.684 [INFO ] [ab.binding.skyq.internal.SkyQHandler] - Handle command : backup
2021-11-24 19:25:29.952 [INFO ] [ab.binding.skyq.internal.SkyQHandler] - Handle command : channelup

Is it possible to deactivate this - I assume you have to modify the log level in the binding?
Or is this just a local setting?

Thank your for spotting this error and your positive feedback.
I’ve changed the documentation accordingly.

Please note that although the binding should be reasonable stable, it is still an alpha version and by far not yet feature complete.

My intention is to implement most of the functions/channels as implemented in this Python project RogerSelwyn/skyq_remote: Python module for accessing SkyQ box and EPG, and sending commands (github.com).

This includes getting state information from the receiver (power, live stream, app etc).

Of course the development pace will depend on my available time (upcoming lockdown and winter season might help :wink: ) and potentially other contributors (I’d be happy to receive PRs).

That are great news! Thank you very much :blush:

I am looking forward for the new features and of course I know it takes time but I will wait :innocent:

Hi @andan is there a way to try this addon in OH 3.1? I got an error if I try to add the kar file in my addons folder.

I will check. It would help if you could report details of the error if available.

@andan sorry you’re right.
This is the error:

Can't load features repository mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/3.2.0-SNAPSHOT/xml/features

This really helps as I believe I now know the reason :slight_smile:
I will try to deploy a fixed kar version later today.

I’ve published a new release (see link in initial post) which hopefully fixes the issue with the kar file. If not please let me know.

@andan in the meantime I found and tried the jar and it works perfectly. I’ll try the kar and let you know.

That would be great. The binding is working very well untill this point. Thanks for your work!

Just to note that I regulary provide updates with enhanced features and bug fixes. See my initial post for more details.

Thank you for the “control#power” channel!
Now its possible to switch the device on and off depending on its state :hugs:

Hi @andan I’ve just installed this binding using the marketplace. It doesn’t appear to work for me. Here’s my configuration below. The item doesn’t update at all. Any thoughts on what I can do to sort this out. I’m currently using a bunch of scripts to do what your binding offers, so getting this working would help me tidy up my system.

Thing skyq:skyqreceiver:livingroom [ hostname="192.168.20.59", configurablePresets=true, retryInterval=60, checkStatusInterval=60, refreshInterval=30 ]
String Livingroom_SkyQ_Status "SkyQ Power Status: [%s]" { channel="skyq:skyqreceiver:livingroom:statusChannel#powerStatus" }

Sorry, there was a typo in the channel description (missing ‘s’ in group channel name statusChannels

Please try

String Livingroom_SkyQ_Status "SkyQ Power Status: [%s]" { channel="skyq:skyqreceiver:livingroom:statusChannels#powerStatus" }

Thanks for the reply @andan, sadly still not seeing anything. Also the thing doesn’t appear in the Things section, should it?