UNPKG

node-red-contrib-skyremote

Version:

This node-red node allows you to remotely control a Sky satellite box. The node mimics the Sky Box functionality of the Sky Remote Control

74 lines (63 loc) 3.59 kB
<!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- Sample html file that corresponds to the 99-sample.js file --> <!-- This creates and configures the onscreen elements of the node --> <!-- If you use this as a template, update the copyright with your own name. --> <!-- First, the content of the edit dialog is defined. --> <!-- Next, some simple help text is provided for the node. --> <script type="text/x-red" data-template-name="Sky Remote"> <div class="form-row"> <label for="node-input-server"><i class="icon-tag"></i> Sky Box</label> <input type="text" id="node-input-server" placeholder="Server"> </div> <div class="form-row"> <label for="node-input-name"><i class="icon-bookmark"></i> Name</label> <input type="text" id="node-input-name" placeholder="Sky Remote"> </div> </script> <script type="text/x-red" data-help-name="Sky Remote"> <p> A node to remotely control a Sky satellite box. The node mimics the Sky Box functionality of the Sky Remote</p> <p> Works with Sky+HD and SkyQ. </p> <p> The node can accept the commands listed below: <p><code>power</code> <code>sky</code></p> <p><code>tvguide</code> or <code>home</code> <code>boxoffice</code> <code>services</code> or <code>search</code> <code>interactive</code> or <code>sidebar</code></p> <p><code>up</code> <code>down</code> <code>left</code> <code>right</code> <code>select</code></p> <p><code>channelup</code> <code>channeldown</code> <code>i</code></p> <p><code>backup</code> or <code>dismiss</code> <code>text</code> <code>help</code></p> <p><code>play</code> <code>pause</code> <code>rewind</code> <code>fastforward</code> <code>stop</code> <code>record</code></p> <p><code>red</code> <code>green</code> <code>yellow</code> <code>blue</code></p> <p><code>1</code> <code>2</code> <code>3</code> <code>4</code> <code>5</code> <code>6</code> <code>7</code> <code>8</code> <code>9</code> <code>0</code></p> <P> A command can be sent as a string in msg.payload (<code>msg.payload="play"</code>) </P> <p> A chain of commands can be sent as an array of strings in msg.payload (<code>msg.payload = ["1","0","6","select"]</code> for example to change to channel 106) </p> <p> The node cannot change volume as that is done from the handest direct to the TV and not via the Sky Box<p> </script> <!-- Finally, the node type is registered along with all of its properties --> <!-- The example below shows a small subset of the properties that can be set--> <script type="text/javascript"> RED.nodes.registerType('Sky Remote', { color: "#00afe6", category: 'media', // the palette category defaults: { server: {required: true, type: 'Sky Box Config'}, //pollspeed: {value: 3000, required: true, validate: RED.validators.number()}, name: {value: ""} }, inputs: 1, outputs: 0, align: "right", icon: "tv.png", label: function () { return this.name || "Sky Remote"; } }); </script>