svalouch / rctmon

Pulls data from RCT Power GmbH devices for use with monitoring systems.
https://rctmon.readthedocs.io
GNU General Public License v3.0
17 stars 8 forks source link

Unaligned data used for the same metric #24

Closed sfudeus closed 1 year ago

sfudeus commented 2 years ago

During an island mode test I noticed that the exporter currently reads different values and uses the same prometheus metric for them. There are the PowerSwitchReadings (rb485.*), which generate rctmon_grid_voltage and rctmon_grid_frequency, and there are the GridReading (from g_sync), which create rctmon_grid_voltage and a single rctmon_grid_frequency (from grid_pll) without phase label. During island mode, they produce different readings (rb485 being low obviously, g_sync having the values created by the inverter. They should be handled differently.

I'm willing to implement this, but I'd like to check how we want to name them. rctmon_grid_* suggests grid values, so ideally the rb485 ones, but what about people without a power switch?

I'm lacking a proper term for the g_sync values - they are about the inverter-generated, potentially grid-separated network, but household doesn't fit as well, since this a term referring to consumption from the household. Easiest might be to just rename the rb485 metrics rctmon_powerswitch_*, despite being metrics about the "real", i.e. external, grid.

What is your opinion?

PS: Any idea about the relevance of the rctmon_powerstorage_frequency metrics? They seem to be 0 for me all the time, regardless if in island mode or not.

sfudeus commented 2 years ago

While looking into it, there was only one really straightforward way without changing a lot more. See PR #25.

MichaelMMS commented 2 years ago

hi sfudeus In island mode, I'll get a rctmon_grid_frequency reading of around 30 Hz. This is obviously wrong. It should be 0 Hz.

It is perhaps best to make it backwards compatible with your idea of "real, i.e. external, grid." with new variables and an explanation in the docs. I use grafana, I don't have any problems with wrong readings. Maybe you could do a screenshot of your wrong readings...

Bildschirmfoto 2022-08-04 um 23 23 32 Bildschirmfoto 2022-08-04 um 23 19 59 Bildschirmfoto 2022-08-04 um 23 19 52 Bildschirmfoto 2022-08-04 um 23 19 44