This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @fileoverview Zendure Solar Power Controller with Shelly (script) | |
| * @version 1.0 | |
| * @description Controls a Zendure SolarFlow device via its local zenSDK HTTP API | |
| * using P1 meter readings from a Shelly energy monitor. | |
| * | |
| * Algorithm: | |
| * setpoint = p1 + homeOutput → one-shot zero-grid-import convergence | |
| * | |
| * Supports: SolarFlow 800 Pro and zenSDK-compatible devices. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @fileoverview Energy Counter Script for Shelly Pro 3EM | |
| * @version 3.0 | |
| * @description Tracks consumed and returned energy with smart persistent storage. | |
| * Uses internal energy counters instead of integrating the power readings. | |
| * Features: drift-free counting, virtual components for runtime adjustments, | |
| * non-blocking startup state machine, and intelligent KVS save logic. | |
| * After running the script you can update Energy Consumed/Returned values via Shelly UI/App to set your start values. | |
| * @note Requires Shelly Pro 3EM with firmware supporting Virtual Components and KVS API | |
| * @author Patrick Probst |