I have 4 of these units working for a month now. openhab is pulling volts, amps etc from the various registers fine however I am having issues in pulling the day and night kwh readings. It’s very intermittant and I’m not sure if its the units themselves or the way I am going about it.
The units have a Day and a Night counter. at 0730 I run the following rule which grabs the value (updating the item) which persists to a database (works fine). A timer then runs just to add a little pause. It then resets the counter and switches the over to the next tariff, again that side of it seems to work fine but the figures coming back are not always correct. at 2330 I run another rule that effectivly does the same but switches to the other tariff
import org.eclipse.smarthome.core.types.RefreshType
rule "Switch Tariff to ON PEAK (DAY), write Night value to DB and clear counter"
when
Time cron "0 30 07 1/1 * ? *"
then
PH_nkwh.sendCommand(RefreshType.REFRESH)
JS_nkwh.sendCommand(RefreshType.REFRESH)
BH_nkwh.sendCommand(RefreshType.REFRESH)
RS_nkwh.sendCommand(RefreshType.REFRESH)
createTimer(now.plusSeconds(10),[ |
PH_RESET.sendCommand(OFF)
PH_STF.sendCommand(OFF)
JS_RESET.sendCommand(OFF)
JS_STF.sendCommand(OFF)
BH_RESET.sendCommand(OFF)
BH_STF.sendCommand(OFF)
RS_RESET.sendCommand(OFF)
RS_STF.sendCommand(OFF)
])
end
Below is 7 days of readings from one of the units. As you can see 3 readings are wrong and it looks like it has pulled the reading from the opposite counter rather than the correct one for the period that has just passed. What’s confused me is that when it gets it wrong for one unit it’s 99% of the time wrong for them all on the same period but every now and again one unit will be wrong while the others are ok.
2020-08-29 23:30:00
68 kWh
2020-08-30 07:30:01
33 kWh
2020-08-30 23:30:00
102 kWh
2020-08-31 07:30:01
95 kWh
2020-08-31 23:30:00
130 kWh
2020-09-01 07:30:01
35 kWh
2020-09-01 23:30:00
0.00014 kWh
2020-09-02 07:30:01
42 kWh
2020-09-02 23:30:01
141 kWh
2020-09-03 07:30:00
0.00079 kWh
2020-09-03 23:30:01
175 kWh
2020-09-04 07:30:00
42 kWh
2020-09-04 23:30:01
167 kWh
2020-09-05 07:30:00
0.00075 kWh
I might be going about the fetching of the figures completely wrong and would be interested in anyones input on this.