Here is a flow to set ‘periodic full charge override (balancing)’ by VRM-API.
Description:
- Top: set and test your VRM site Id (most likely not 888888).
- Left: three inputs, the first updates dess stats every 15 minutes and sends a timestamp when done, the second sends the current hour, the third sends a boolean value to enable or disable the ‘periodic full charge override (balancing)’ feature.
- Right: two outputs, the first a timestamp to indicate the ‘periodic full charge override (balancing)’ setting has been changed, the second the return of the VRM-API call to do that.
- Middle top two lines: Set and check for a maximum SoC to have been reached.
- Middle next two lines check whether the new (price) schedules have arrived.
- If the set maximum SoC target has been reached AND the new schedules are known, this flow disables (AND + Invert = NAND) the ‘periodic full charge override (balancing)’ setting under the assumption SoC is high enough and DESS has enough forward scheduling data to figure out the best way forward by itself.
- Middle last three lines: a hard On (true) or Off (false) inject node is combined with the automated override signal to turn the ‘periodic full charge override (balancing)’ feature On or Off. And outputs the result.
Example of use: Set a reasonable maximum SoC goal and change the true and false input inject nodes to act as timers, for instance ‘true’ at 11:00 dayly, ‘false’ at 17:00 dayly.
PS don’t forget to install the ‘node-red-contrib-boolean-logic-ultimate’ nodes before importing this flow (and all other required for VRM-API).
EDIT (v0.2): I made a small change to check for maximum SoC (Target) being reached every quarter of an hour (One could modify this to check the ‘Actual’ SoC as well, but that is for another day).
EDIT2 (v0.3): Included the ‘get stats’ API call in the input group (normally called in it’s own group in the parent flow). Now this flow should be ‘complete and functional’ standalone.
Tip: The results of the VRM-API calls are stored in the global context, a good place to start to reviewing what gets set and retrieved.
EDIT3: I mistakenly noted that this flow switches the ‘keep batteries charged’ feature while it actually switches the ‘periodic full charge override (balancing)’ feature. Both would work but the latter has the added benefit that DESS remains active and the graphs stay visible during the (few) hours that this feature is activated to force charging the batteries.
…flow deleted…
