-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Plugwise] Power measurement improvements #5009
[Plugwise] Power measurement improvements #5009
Conversation
Signed-off-by: Wouter Born <eclipse@maindrain.net>
|
Hi @wborn, did you consider and reject using private static final BigDecimal PULSES_PER_KW_SECOND = new BigDecimal("468.9385193");
private static final BigDecimal PULSES_PER_W_SECOND = PULSES_PER_KW_SECOND.movePointLeft(3);etc. |
|
I just rewrote the calculations to So I would prefer using
|
|
That sounds like a valuable exercise you went through. Do you think this PR is ready to merge? |
|
Yes I've been using this code without any issues for a week myself now. Now that the measurements are the same as Plugwise Source, I store the "last hour" kWh values in influxdb and use them in Grafana to draw nice charts. :-) |
|
Should 6ee86c1 be cherry picked to the 1.9.x branch so it appears in the 2.0.0 release (I'm guessing yes, but WDYT)? |
|
Thanks for merging @watou . Yes it would be nice when it is cherry picked so it also to appears in the 2.0.0 release. I think it will be my last Plugwise 1.9.x contribution since it is more or less feature complete for me now. My next contribution might be a real openHAB 2.0 Plugwise Binding. ;-) |
That will be very well received! Thanks so much for your contributions. I will make sure this PR gets into the 2.0.0 path. |
Signed-off-by: Wouter Born <eclipse@maindrain.net>
|
Cherry picked onto 1.9.x branch. |
This PR improves the Plugwise Circle/Stealth power measurements as follows:
PULSES_PER_KW_SECOND = 468.9385193which is also used by all other Plugwise implementations on the internet, instead ofPULSE_FACTOR = 2.1324759fwhich is:1/(468.9385193/1000)but with loss of precisionPowerInformationResponseMessageEnergydate/time values being used inPowerBufferResponseMessageInformationResponseMessage,PowerBufferRequestMessage,PowerBufferResponseMessagebecause the original address calculation would cause the same logs returned multiple times (inspired by Plugwise-2-pi)Power measurements now exactly match the decimals found in the Plugwise Source database (though with more precision).