fdemees wrote: Wednesday 10 June 2026 15:22
...
I have tried HomeWizard-Battery-plugin > examples > dzEvent.lua from @mvdp
(
https://github.com/etmmvdp/HomeWizard-B ... zEvent.lua) which returns errors.
...
error messages:
Code: Select all
2026-06-10 15:19:30.487 Error: EventSystem: Lua script dz HW Batteries total did not return a commandArray
2026-06-10 15:19:30.495 Error: EventSystem: Lua script dz HW Batteries total did not return a commandArray
...
...
Moreover this value (48.295 kwh) is useless as a source for generating the energy dashboard.
Instead, the 5th field in the array provided in the "Total Power" contains the useful data (280 watts). The sum of all 3 batteries could be used.
(I don't know how to handle these arrays in scripting - sorry).
...
Hello Frédéric,
Thanks for the feedback. I'll address your questions and remarks:
* Did you change the device numbers for the batteries in the lua script?
I.e. the values 1827, 1828 should be adapted to the device ids used in your setup. Also, the script has to be wrapped in "return
{ ...}" block. That part is missing from your code block.
* Next, regarding the `Batteries Active Power` remark, this is a field that is returned by the api. I don't want to hide it from the users.
* The usage of the v2 api is considered, but the interface you provided is for the P1 dongle, not the battery, as suggested in the feedback by
fdemees wrote: Wednesday 10 June 2026 17:24