Open poggenpower opened 2 years ago
When using a recent version (i.e. after May 10), there should be rctmon_energy_*
metrics, which show household, generator, grid_feed/grid_load energy.
Hmm, usurer about the version I am running, seems you don't maintain the version identifier in the setup.py
Or is this functionality coming from the rct-client package?
12 Sep 2022 11:32:40 Stephan @.***>:
When using a recent version (i.e. after May 10), there should *rctmonenergy** metrics, which show household, generator, grid_feed/grid_load energy.
— Reply to this email directly, view it on GitHub[https://github.com/svalouch/rctmon/issues/27#issuecomment-1243467945], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ABOBMWUZRKGWGTJCU5TGYILV532DHANCNFSM6AAAAAAQKF3XBA]. You are receiving this because you authored the thread.[Tracking image][https://github.com/notifications/beacon/ABOBMWR6QQ6BKSKDDS77N6LV532DHA5CNFSM6AAAAAAQKF3XBCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSKDXIKS.gif]
Ok did an upgrade to the latest code and got:
# HELP rctmon_energy_household_sum Total household energy in Wh
# TYPE rctmon_energy_household_sum gauge
rctmon_energy_household_sum{inverter="solar01"} 1.137361125e+06
as an additional metric. I wonder that it is of type gauge, should this be an every increasing counter? If it is a Gauge then it the reporting gets wrong if rctmon_energy_household_sum is resetted, because of an reset of the powerswitch.
It would be really useful if the package version gets a bump, if new features or changes get merged. Then tracking updates is far easier.
Thanks Thomas
From another project I know that Counter from the prometheus_client package has an inc()
function only (allow increase only, but update to a new/absolute value), therefor I have created another calss: https://github.com/fhemberger/mqtt_exporter/blob/master/utils/prometheus_additions.py that implements a set()
function. With that it is easy to create a Counter metric from an absolute reading.
Unfortunately flipping from Gauge to Counter will be a breaking change, because Prometheus handle these both as different metrics. I am happy to work on a change to move to counters for all the metrics sum/total metrics, but only if you would accept such breaking change.
I've tagged the latest code as of this morning and increased the version number after merging some PRs, that should make it easier to reason. I'll tag another one soon after some testing.
Counter vs. Gauge: As per the Metric types documentation:
The Prometheus server does not yet make use of the type information and flattens all data into untyped time series. This may change in the future.
According to that, Prometheus doesn't care and it's more of an informational value for the user (for Prometheus, that is; other TSDBs may actually use the type information!).
Stuff like the inc()
method are not relevant here: rctmon yields MetricFamily
types in the collect()
function(s), see Custom Collectors. These do not mangle names (IIRC, have to check) and are just for piping the most recent value through. The next call to collect()
yields entirely new ones, so there wouldn't be something there to call inc()
on in the first place.
In contrast, if we were to use Metric
types such as Gauge
, we would be restricted in naming and usage. Actually, using them would be bad: I recall that the python client does not allow one to read the value from these Metrics. So we would have to store values twice, once for working with them and another time just for Prometheus exposition.
Hi togeher, i have also some metrics I am missing. I thought this is the right place for that ;-)
I download the source code and compare some metric. In the device_manager.py I found some metrics which I found in the MQTT Explorer. 1AC87AA0 g_sync.p_ac_load_sum_lp Load household - external Power 91617C58 g_sync.p_ac_grid_sum_lp Total grid power
But because I have no experience with python, make more sense for me to request it.
Missing: Values per Day:
BD55905F energy.e_ac_day Day energy
2F3C1D7D energy.e_load_day Household day energy
867DEF7D energy.e_grid_load_day Day energy grid load
3C87C4F5 energy.e_grid_feed_day Day energy grid feed-in
B9A026F9 energy.e_ext_day External day energy
and perhaps from a the „PowerSwitch“ 6002891F g_sync.p_ac_sc_sum Grid power (ext. sensors)
Can you add this too
Best regards Ralf
Hello,
rctmon is running as expected accept of some missing metrics regrading "household". The only metrics I receive is:
But I am looking for: Something like:
energy.e_load_total
or any of the other metrics that reports Wh instead of current W.Here some infos about my rctmon:
In the log I see that some unkown OIDs are received:
In the RCT-App I am able to see the household Wh reading per day and month.