feat: Enable user AC load Consumption calc on output #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reported-in: https://victrondevelopment.slack.com/archives/C04RYU0UMDE/p1753438523459519
Community: https://community.victronenergy.com/t/feature-for-review-user-controller-ac-load-calculations/42033
Summary
This pull request introduces a feature that allows for manual overriding of the calculated AC consumption values on a per-phase basis.
Description
A new setting, /Settings/SystemSetup/HasUserConsumptionCalc, has been added. When this setting is enabled, dbus-systemcalc will no longer use its own calculations for AC consumption on the output.
Instead, it will read the power values directly from the following new settings paths:
The values from these paths are then used to populate the /Ac/Consumption/[L1-L3]/Power and /Ac/ConsumptionOnOutput/[L1-L3]/Power D-Bus paths.
This functionality is designed for specific scenarios where AC loads cannot be measured automatically by the system and need to be accounted for manually. If HasUserConsumptionCalc is disabled, the system reverts to its standard calculation method.
NodeRED flow
[{"id":"904892dddb0208e3","type":"victron-output-custom","z":"eabbf1f3d406ee01","service":"com.victronenergy.settings","path":"/Settings/SystemSetup/Ac/Out/L1/Power","serviceObj":{"service":"com.victronenergy.settings","name":"com.victronenergy.settings"},"pathObj":{"path":"/Settings/SystemSetup/Ac/Out/L1/Power","name":"/Settings/SystemSetup/Ac/Out/L1/Power","type":"number","value":10},"name":"","onlyChanges":false,"x":1050,"y":1160,"wires":[]},{"id":"050c476443e47340","type":"victron-output-custom","z":"eabbf1f3d406ee01","service":"com.victronenergy.settings","path":"/Settings/SystemSetup/Ac/Out/L2/Power","serviceObj":{"service":"com.victronenergy.settings","name":"com.victronenergy.settings"},"pathObj":{"path":"/Settings/SystemSetup/Ac/Out/L2/Power","name":"/Settings/SystemSetup/Ac/Out/L2/Power","type":"number","value":20},"name":"","onlyChanges":false,"x":1050,"y":1220,"wires":[]},{"id":"4fb3d3f86418dbed","type":"victron-output-custom","z":"eabbf1f3d406ee01","service":"com.victronenergy.settings","path":"/Settings/SystemSetup/Ac/Out/L3/Power","serviceObj":{"service":"com.victronenergy.settings","name":"com.victronenergy.settings"},"pathObj":{"path":"/Settings/SystemSetup/Ac/Out/L3/Power","name":"/Settings/SystemSetup/Ac/Out/L3/Power","type":"number","value":20},"name":"","onlyChanges":false,"x":1050,"y":1280,"wires":[]},{"id":"9df115489bd44afb","type":"inject","z":"eabbf1f3d406ee01","name":"Enable Custom Consumption","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":600,"y":1060,"wires":[["6ed974dedfceb720"]]},{"id":"a696f1dfc29e8dda","type":"inject","z":"eabbf1f3d406ee01","name":"Disable Custom Consumption","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":600,"y":1120,"wires":[["6ed974dedfceb720"]]},{"id":"6ed974dedfceb720","type":"victron-output-custom","z":"eabbf1f3d406ee01","service":"com.victronenergy.settings","path":"/Settings/SystemSetup/HasUserConsumptionCalc","serviceObj":{"service":"com.victronenergy.settings","name":"com.victronenergy.settings"},"pathObj":{"path":"/Settings/SystemSetup/HasUserConsumptionCalc","name":"/Settings/SystemSetup/HasUserConsumptionCalc","type":"number","value":1},"name":"","onlyChanges":false,"x":1080,"y":1080,"wires":[]},{"id":"871bef04fce2db25","type":"inject","z":"eabbf1f3d406ee01","name":"Set 10W on all phases","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":560,"y":1200,"wires":[["904892dddb0208e3","050c476443e47340","4fb3d3f86418dbed"]]},{"id":"2b13d0cac5396ca2","type":"inject","z":"eabbf1f3d406ee01","name":"Set 100W on all phases","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"100","payloadType":"num","x":560,"y":1280,"wires":[["904892dddb0208e3","050c476443e47340","4fb3d3f86418dbed"]]}]Demo of work
https://youtu.be/QfkW5DSevSA
This also helps when user has another one VM meter for loads specifically and reroutes values to these settings in order to get proper AC Load calculations