Add scale factor for keba p40#3766
Conversation
|
If I'm not mistaken, |
|
Thanks for checking this. I rechecked the conversion direction, and I think SCALE_FACTOR_1 should be correct here, unless I am misunderstanding the mapper logic. Since this is a write register, it looks like the converter is used in the reverse direction via channelToElement(). So for SCALE_FACTOR_1, the read direction would be element -> channel = * 10, but the write direction should be channel -> element = / 10. That seems to match register 5010, because its unit is 10 Wh. An OpenEMS value of 50000 Wh should be written as 5000. Please correct me if I am missing something here, since I haven't worked much with this converter logic before. |
|
@johannk24 Could you validate this please? |
fixes issue #3765 by applying the correct scale factor for the energy limit register (5010) of the keba p40.
the register uses a unit of 10 Wh, so without a scale factor the written value would be interpreted off by a factor of 10.