UNPKG

@gravypower/node-red-franklinwh

Version:

Node-RED node to control FranklinWH gateway

51 lines (48 loc) 1.58 kB
<script type="text/javascript"> RED.nodes.registerType('franklinwh-get-grid-status',{ category: 'FranklinWH', color: '#3399ff', defaults: { server: {type:"franklinwh-config", required:true}, name: {value:""} }, inputs:1, outputs:1, icon: "font-awesome/fa-plug", label: function() { return this.name||"get grid status"; } }); </script> <script type="text/html" data-template-name="franklinwh-get-grid-status"> <div class="form-row"> <label for="node-input-server"><i class="fa fa-server"></i> Server</label> <input type="text" id="node-input-server"> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script> <script type="text/html" data-help-name="franklinwh-get-grid-status"> <p>A node to get FranklinWH grid connection status.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">any</span> </dt> <dd>Any input will trigger the grid status request.</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">object</span> </dt> <dd> An object containing: <ul> <li><code>online</code> - boolean indicating if grid is online</li> </ul> </dd> </dl> </script>