node-red-contrib-crestron
Version:
Node-RED nodes for communicating with a Crestron TCP Server.
50 lines (48 loc) • 1.82 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('crestron-node', {
category: 'crestron',
color: '#ffffff',
defaults: {
server: {type: "crestron-node-config",required:true},
cid: { value: "" },
ctype: { value: "" },
name: { value: "" }
},
inputs: 1,
outputs: 1,
align: "left",
icon: "crestron.png",
label: function () {
return this.name || this.ctype + " : " + this.cid;
}
});
</script>
<script type="text/x-red" data-template-name="crestron-node">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-tag"></i> Server</label>
<input type="text" id="node-input-server">
</div>
<div class="form-row">
<label for="node-input-id"><i class="icon-tag"></i> ID</label>
<input type="text" id="node-input-cid" placeholder="ID">
</div>
<div class="form-row">
<label for="node-input-ctype"><i class="icon-tag"></i> Type</label>
<select id="node-input-ctype">
<option value = "Digital" >Digital</option>
<option value = "Analog">Analog</option>
<option value = "String">String</option>
</select>
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="crestron-node">
<p>A simple node that converts the message payloads into crestron host</p>
<p>DIGITAL, accept true/false</p>
<p>ANALOG, accept 0-65535</p>
<p>STRING, the str length depend crestron marco,defaults is 9999
</p>
</script>