Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: enhance example by showing usage of "scale" #75

Closed
mi-hol opened this issue Dec 3, 2024 · 2 comments · Fixed by #78
Closed

doc: enhance example by showing usage of "scale" #75

mi-hol opened this issue Dec 3, 2024 · 2 comments · Fixed by #78
Labels
documentation Improvements or additions to documentation

Comments

@mi-hol
Copy link

mi-hol commented Dec 3, 2024

Thank you so much for this great tool!

Digital power meters measure in fractions of Watts but relevant for invoicing are kWh.
Therefore the "scale" parameter is provided in configuration but unfortunately the current examples don't show its usage.

I guess adding "scale" would apply to Example 2: SCPM-S6 Power Meter.
but because I can't test it, providing a tested PR is not feasible for me.
Could you please take care of this proposal?

@gavinying
Copy link
Owner

Hi, thanks for your interest in this tool.

You are right that we provide "scale" parameter in Modpoll config file, the main purpose is to conform with vendor's Modbus protocol, as we know, some device vendors will apply a "scale" or "gain" on to their raw output so that they could use integer number to output float values.
For example, HUAWEI_SUN2000_245KTL28KTL_MODBUS_Interface defines the PV voltages like below,
image
there is a "gain" (same as "scale") value 10 applied to each PV voltage output, meaning if you got raw data 2405, the actual output is 2405/10 = 240.5 (V).
And this is what Modpoll tool actually do via the config file defined,
image

See Huawei smart logger example for details,
https://github.com/gavinying/modpoll/tree/master/contrib/huawei/sun2000

Although it is not limited to use "scale" for your purpose, but the design principle is to output data according to vendor's specs and leave the data processing stage to the other user preferred programs/tools.

Hope that clarifies.

@gavinying gavinying added the documentation Improvements or additions to documentation label Dec 12, 2024
@mi-hol
Copy link
Author

mi-hol commented Dec 12, 2024

See Huawei smart logger example for details, https://github.com/gavinying/modpoll/tree/master/contrib/huawei/sun2000

Thanks for providing a reference to an example, unfortunately this example is not mentioned in the documentation at https://gavinying.github.io/modpoll/configure.html#example-2-scpm-s6-power-meter-modbus-rtu-device.
Enhancing the existing documentation was the point I tried to suggest (i.e. Example 2: SCPM-S6 Power Meter).
Does that make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants