UNPKG

@gravypower/node-red-franklinwh

Version:

Node-RED node to control FranklinWH gateway

113 lines (105 loc) 3.74 kB
<script type="text/javascript"> RED.nodes.registerType('franklinwh-get-system',{ category: 'FranklinWH', color: '#3399ff', defaults: { server: {type: "franklinwh-config", required: true}, name: {value: ""} }, inputs:1, outputs:1, icon: "font-awesome/fa-cogs", label: function() { return this.name || "get system"; } }); </script> <script type="text/html" data-help-name="franklinwh-get-system"> <p>Retrieves comprehensive system information from the FranklinWH energy storage system.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">any</span> </dt> <dd>Any input will trigger the system data request.</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">object</span> </dt> <dd> An object containing comprehensive system information: <ul> <li><code>timestamp</code> - ISO timestamp of the data retrieval</li> <li><code>system</code> - System configuration: <ul> <li><code>model</code> - System model number</li> <li><code>serialNumber</code> - System serial number</li> <li><code>firmwareVersion</code> - Current firmware version</li> <li><code>installedCapacity</code> - Total installed battery capacity (kWh)</li> </ul> </li> <li><code>settings</code> - System settings: <ul> <li><code>backupReserve</code> - Backup power reserve percentage</li> <li><code>timeOfUse</code> - Time-of-use settings</li> <li><code>gridCharging</code> - Grid charging configuration</li> </ul> </li> <li><code>state</code> - Current operational state: <ul> <li><code>mode</code> - Current operating mode</li> <li><code>connected</code> - Connection status</li> <li><code>alerts</code> - Any active system alerts</li> </ul> </li> </ul> </dd> </dl> <h3>Status</h3> <ul> <li><b>Blue dot</b>: Requesting system data</li> <li><b>Green dot</b>: Successfully retrieved data</li> <li><b>Red ring</b>: Error occurred or missing configuration</li> </ul> <h3>Example Output</h3> <p><pre> { "timestamp": "2024-07-10T15:30:00.000Z", "system": { "model": "aPower X", "serialNumber": "FWH123456789", "firmwareVersion": "2.1.0", "installedCapacity": 13.6 }, "settings": { "backupReserve": 20, "timeOfUse": { "enabled": true, "schedule": [...] }, "gridCharging": { "enabled": true, "threshold": 15 } }, "state": { "mode": "self-consumption", "connected": true, "alerts": [] } } </pre></p> <h3>Notes</h3> <ul> <li>Data is retrieved in real-time from the system</li> <li>All timestamps are in ISO 8601 format</li> <li>Energy values are in kilowatt-hours (kWh)</li> <li>Percentages are expressed as integers (0-100)</li> </ul> <h3>References</h3> <ul> <li><a href="https://www.franklinwh.com/support" target="_blank">FranklinWH Documentation</a></li> </ul> </script>