SkyQ Receiver Binding

SkyQ Binding

This binding provides control functions for SkyQ receivers. It should be compatible with any OH version >= 3.0.

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 Send a control command to the device (see below)
control#channelPreset String List (TV) 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 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

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.channels:

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.2.0-alpha0

  • initial release

Resources

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

2 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: