UNPKG

@smappee/node-red-contrib-smappee

Version:

Smappee Node-RED contains Smappee nodes and example flows

49 lines (45 loc) 1.78 kB
<script type="text/x-red" data-template-name="aggregated"> <div class="form-row"> <label for="node-input-device"><i class="fa fa-globe"></i> <span>Smappee</span></label> <input type="text" id="node-input-device"> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> <span>Name</span></label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script> <script type="text/x-red" data-help-name="aggregated"> <p>A node that returns the aggregated power values every 5 minutes.</p> <h3>Outputs</h3> <p>Messages are returned every 5 minutes through <code>msg.payload</code> values:</p> <dl class="message-properties"> <dt>intervalDatas <span class="property-type">array</span></dt> <dd>Interval data as an array of objects.</dd> </dl> <h3>Details</h3> <p>Requires a <a href="https://www.smappee.com/be_en/plus-energy-monitor">Smappee Plus</a> or <a href="https://www.smappee.com/be_en/pro-energy-monitor">Smappee Pro</a> device running with the latest firmware that supports Node-RED.</p> <p><b>Note:</b> Please contact <a href="mailto:support@smappee.com">support@smappee.com</a> if you are having issues.</p> </script> <script type="text/javascript"> RED.nodes.registerType('aggregated', { category: 'smappee device', color: '#99c031', defaults: { name: {value: ''}, device: {value: '', required: true, type: 'device-config'}, }, inputs: 0, outputs: 1, icon: 'arrow-in.png', label: function() { const device = RED.nodes.node(this.device); return this.name || 'aggregated' + (device ? ':' + device.host : ''); }, labelStyle: function() { return this.name ? 'node_label_italic' : ''; }, }); </script>