@gravypower/node-red-franklinwh
Version:
Node-RED node to control FranklinWH gateway
59 lines (52 loc) • 2.34 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('franklinwh-config',{
category: 'config',
defaults: {
host: {value: "", required: true},
serialNumber: {value: "", required: true}
},
credentials: {
username: {type: "text", required: true},
password: {type: "password", required: true}
},
label: function() {
return (this.username ? this.username + '@' : '') + (this.host || "FranklinWH Config");
}
});
</script>
<script type="text/html" data-template-name="franklinwh-config">
<div class="form-row">
<label for="node-config-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-config-input-host" placeholder="e.g. 192.168.1.100">
</div>
<div class="form-row">
<label for="node-config-input-serialNumber"><i class="fa fa-barcode"></i> Serial Number</label>
<input type="text" id="node-config-input-serialNumber" placeholder="Device Serial Number">
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-username" placeholder="Username">
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label>
<input type="password" id="node-config-input-password" placeholder="Password">
</div>
</script>
<script type="text/html" data-help-name="franklinwh-config">
<p>Configuration for connecting to a FranklinWH inverter.</p>
<h3>Details</h3>
<dl class="message-properties">
<dt>Host <span class="property-type">string</span></dt>
<dd>The IP address or hostname of your FranklinWH device.</dd>
<dt>Serial Number <span class="property-type">string</span></dt>
<dd>The serial number of your FranklinWH device.</dd>
<dt>Username <span class="property-type">string</span></dt>
<dd>Your FranklinWH device username.</dd>
<dt>Password <span class="property-type">string</span></dt>
<dd>Your FranklinWH device password.</dd>
</dl>
<h3>References</h3>
<ul>
<li><a href="https://www.franklinwh.com/">FranklinWH Website</a></li>
</ul>
</script>