You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading and interpreting powermeter values, I came across the wish to have kWh with float precision like 7.54 kWh. So far, TAG_PM_ENERGY_Lx deliver int kWh. I found my experience isn't good enough to change them to float, so I changed in RscpMqttMapping.h:
from { TAG_PM_DATA, TAG_PM_ENERGY_L1, 0, "%s/energy/L1", "", F_FLOAT_D, UNIT_WH, 1000, 0, false, false, false },
to { TAG_PM_DATA, TAG_PM_ENERGY_L1, 0, "%s/energy/L1", "", F_FLOAT_2, UNIT_WH, 1, 0, false, false, false },
...
(changing F_FLOAT_D to F_FLOAT_2 didn't help, it's still integer + the original is UNIT_KWH, but change also didn't help)
Depending on your preference, is there a chance to change this to float from your end, or help by pointing to the correct changes for me to apply?
The text was updated successfully, but these errors were encountered:
cwihne
changed the title
Powermeter values float precision
Powermeter energy values float precision
Feb 17, 2024
Hello,
I have changed the code.
If you like you can check out the branch "dev" (not "main" as usual) with the changed files RscpMqttMain.cpp and RscpMqttMapping.h
Best regards
Thomas
Reading and interpreting powermeter values, I came across the wish to have kWh with float precision like 7.54 kWh. So far, TAG_PM_ENERGY_Lx deliver int kWh. I found my experience isn't good enough to change them to float, so I changed in
RscpMqttMapping.h
:from
{ TAG_PM_DATA, TAG_PM_ENERGY_L1, 0, "%s/energy/L1", "", F_FLOAT_D, UNIT_WH, 1000, 0, false, false, false },
to
{ TAG_PM_DATA, TAG_PM_ENERGY_L1, 0, "%s/energy/L1", "", F_FLOAT_2, UNIT_WH, 1, 0, false, false, false },
...
(changing
F_FLOAT_D
toF_FLOAT_2
didn't help, it's still integer + the original isUNIT_KWH
, but change also didn't help)Depending on your preference, is there a chance to change this to float from your end, or help by pointing to the correct changes for me to apply?
The text was updated successfully, but these errors were encountered: