node-red-contrib-vscp-tcp
Version:

132 lines (111 loc) • 5.82 kB
HTML
<!--
MIT License
Copyright (c) 2020 Åke Hedman, Grodans Paradis AB
This file is part of the VSCP (https://www.vscp.org)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<script type="text/javascript">
RED.nodes.registerType('vscp-tcp-config-host',{
category: 'config',
defaults: {
name: {value:"",required:true},
host: {value:"localhost",required:true},
port: {value:9598,required:true,validate:RED.validators.number()},
timeout: {value:10000,required:true,validate:RED.validators.number()},
interface: {value:""},
usetls: { value: 0 },
keepalive: { value: 0 },
},
label: function() {
return this.name+" ["+this.host+":"+this.port+"]";
}
});
</script>
<script type="text/html" data-template-name="vscp-tcp-config-host">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name">
</div>
<div class="form-row">
<label for="node-config-input-host"><i class="fa fa-square"></i> Host</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-square"></i> Port</label>
<input type="text" id="node-config-input-port">
</div>
<div class="form-row">
<label for="node-config-input-timeout"><i class="fa fa-square"></i> Timeout</label>
<input type="number" id="node-config-input-timeout">
</div>
<div class="form-row">
<label for="node-config-input-interface"><i class="fa fa-square"></i> Interface</label>
<input type="text" id="node-config-input-interface" placeholder="Optional GUID for remote i/f">
</div>
<div class="form-row">
<label for="node-config-input-keepalive"><i class="fa fa-square" style="width: 20px"></i> Keepalive</label>
<input type="number" size="10" id="node-config-input-keepalive" placeholder="0">
</div>
<div class="form-row">
<label style="margin-left: 100px; width: 70%">
<input
type="checkbox"
id="node-input-usetls"
placeholder=""
style="width: 20px; margin: -4px 0 0 0;"
/>
Use TLS
</label>
</div>
</script>
<script type="text/x-red" data-help-name="vscp-tcp-config-host">
<p>
Settings here defines properties for one VSCP tcp/ip remote hosts.
</p>
<h3>Properties</h3>
<dl class="message-properties">
<dt>Name <span class="property-type">string</span></dt>
<dd> Enter a descriptive name for the host here. This name is what you
use to select this host later. </dd>
<dt class="optional">Host <span class="property-type">number</span></dt>
<dd> IP address or url for remote VSCP host. Default is 'localhost' </dd>
<dt class="optional">Port <span class="property-type">number</span></dt>
<dd> Port to use. Default is 9598. </dd>
<dt class="optional">Timeout <span class="property-type">number</span></dt>
<dd> Enter connection timeout here. Default is 10000 ms. </dd>
<dt class="optional">Interface <span class="property-type">number</span></dt>
<dd> If connection to a specific interface on the remote host is needed This
interface GUID should be entered here. Default is none. </dd>
<dt class="optional">Use TLS <span class="property-type">number</span></dt>
<dd> Mark to use TLS for the connection. Default is no TLS. </dd>
<dt class="optional">Try to keep connection alive <span class="property-type">number</span></dt>
<dd> Mark to enable automatic reconnect if the host connection fails. Default
is no automatic reconnect.</dd>
</dl>
<h3>Details</h3>
<p>Settings here defines properties for one VSCP tcp/ip remote hosts.
This is hardware devices that export the VSCP tcp/ip link protocol
or software devices, like the <a href="https://docs.vscp.org/#vscpd">VSCP daemon</a>,
which have a compatible but have an extended tcp/ip interface.</p>
<h3>References</h3>
<ul>
<li><a>https://docs.vscp.org/</a> - full description of <code>VSCP tcp/ip link</code> protocol</li>
<li><a>https://docs.vscp.org/</a> - documentation for VSCP</li>
<li><a>https://github.com/grodansparadis/node-red-contrib-vscp-tcp</a> - the nodes github repository</li>
<li><a>https://www.vscp.org/</a> - home of VSCP</li>
</ul>
</script>