Cumulative flag and daily energy totals


#1

I’m not happy with various aspects of Fronius’s push service so I’m looking to develop a small app which runs on my Raspberry Pi, pulls values from my Fronius, and pushes them to PVO’s /service/r2/addstatus.jsp every 5 mins. It seems to me most accurate to push energy values v1/v3 and leave out the power values v2/v4 and thus let PVO automatically calculate the average powers which is the best representation of power gen/use over the 5 min period. I can extract accurate lifetime energy values for v1/v3 from the Fronius. However, the documentation at https://pvoutput.org/help.html#api-addstatus only describes a “c1” flag, not a “c3” flag. Is there a “c3” flag? I’d prefer to pass cumulative values otherwise my app has to process day rollover and record (and save on disk) the counter start values for each day.

Also, after thinking about coding for day rollover, I can’t see how PVO 100% accurately accumulates a full days energy because looking at the data it seems to discard the last 5 min energy value for each day, i.e. v1 and v3 at 00:00 on the following date which gives the incremental value between the previous 23:55 -> 00:00. Won’t the total consumption for each day be missing this last increment? Since the 00:00 push actually records values for the end of the previous day’s 23:55->24:00 I am thinking that each day should start at a 00:05 value and end at a 24:00 value. I.e. 00:00 values are actually 24:00 for the previous day. That way, all the energy values could be shown and not missing in the totals.


Need clarification on v1 - v4 parameters
#2

Cumulative flag applies to the v1/v3 data present in the upload.

Both v1 and v3 used as lifetime energy -

  • c1=1&v1=1000000&v3=1000000

If v3 is cumulative and v1 is not, then two separate uploads will be required

  • c1=1&v3=1000000
  • v1=100

Lifetime values in addstatus call greater than max?
#3

BB,

The reason I thought a c3 flag may exist was because of the name “c1” instead of the expected name “c”. Also the documentation I referenced above describing this flag specifically says it applies to v1 and does not mention v3. Perhaps you can update this?

Any comment about my 2nd paragraph? Is the energy accumulated in the last 5 min period of each day lost by PVO?


#4

Sending t=24:00 records the last 5-minutes.


#5

But your documentation for the c1 flag says “The first add status for any given date will be used as the starting energy value and v1 will be reset to 0” so that would mean PVO would lose the energy for the first 00:00->00:05 interval at the 00:05 push. So are you saying that on midnight rollover I should send the values with the previous date + 24:00, wait a few seconds, then also send the exact same values but with a timestamp for the new day + 00:00?


#6

The date parameter determines where the data point belongs -

The last 5-minutes of 20170601

  • d=20170601&t=24:00

The first 5-minutes of 20170602

  • d=20170602&t=0:05

You can send -

  • d=20170602&t=0:00

But it does not affect the data in 20170601


#7

But it will affect the data in 21070602 if I don’t immediately send that 20170602-00:00 push with the same values I sent for 20170601-24:00 because that 2nd push will reset the energy counters to zero. Otherwise, according to your docs as I say above, the energy counters will get reset on the next 5 min push at 20170602-00:05 and the days total energy values will be slightly lower. Is it not clear what I am getting at?


#8

Use -

  • d=20170601&t=24:00 - Does not reset energy, records the last 5-minutes of 20170601
  • d=20170602&t=0:00 - Reset the energy for 20170602
  • d=20170602&t=0:05 - Record the first 5-minutes of 20170602

#9

Good, so you are agreeing with me.

In summary, I have to push the same data twice within a few seconds, but with (day-1):24:00 and day:00:00 time stamps. A bit messy but I guess it works around the problem.


#10

BB,

I implemented this as discussed here yesterday and it seems to work ok. However, I notice that my alternative system does not have Peak generation or Standby usage values shown presumably because I am only pushing v1 and v3, not v2 and v4 as well for the reasons I described in my opening post here. I can trivially compute and send v2 and v4 as well of course but they will be exactly the same as the averages PVO calculates so it is redundant to send them. Any reason you don’t display Peak and Standby values when v2 and v4 are not sent?


Fronius Push
#11

Please provide a link to the page.


#12

Not keen to post the link here so publicly. This is your site isn’t it? Surely it is trivial for you to find my two systems. The Fronius* system is as installed by Positronic (except I set v4=PowerReal_P_Sum on the meter push because using the default PowerApparent_S_Sum makes no sense to me and reads way too high). The Fronius*-Pi system is pushed by my app. I added the redundant v2 and v4 this arvo. Peak and Standby then appeared at that push. If you want to try to debug this then let me know and I will take them off.


#13

Can’t really help you without further information. We require the specific page, and data sent.

Thanks.


#14

Hi bankstownbloke, I believe you can see the issue on my output, for the 5/08/2017: https://pvoutput.org/intraday.jsp?id=59863&sid=53597&dt=20170805

I was uploading data from my fronius all day, just sending v1 & v3, c1=1. It calculated the average power nicely, but:

  1. The “Peak” and “Standby” labels / values aren’t there. On the 3/08/2017 they are visible, when I was also posting v2 & v4.

  2. This is only visible on the live feed unfortunately

  • the “Power Used” column values keep disappearing, they re-appear if you refresh the page or click the “live” link again.
    I suspect they vanish when the auto refresh kicks in.

#15

To be clear, blackpaw is describing only 1 or the 2 issues I point out in this thread. The other issue is that when you set c1=1 then PVO resets the energy counters to zero on the first push of the day (as the documentation says) but that is flawed. It should subtract the last energy values ever received (which will be from previous day) from the first push values to calculate the starting day energy counts otherwise you lose that first push energy counts from the daily total.

I work around this by explicitly pushing a preceding 00:00 value a few secs before my first push of the day but clearly it is best if this was fixed on the server side.

Note I am saying “first push of the day” and “last push of the day” etc, instead of 23:55, 00:05 because some inverters only push in daylight hours and my logic works for these also.


#16

Peak and standby power is based on the v2 and v4 values sent. They won’t be recorded if it is not sent.

This is a display issue since you’re not sending power, the refresh will update the table with blank. A full page refresh will calculate power values.


#17

Ok thanks,

Currently calculating the average values myself and posting them as v2,v4 - that works the best.

Just wanted to be sure I wasn’t missing something.


#18

Hi,

Sorry, this confuses me… :pensive:

If I have lifetime cumulative metering, does this mean that – for the midnight record – I need to submit one reading with the elapsed day’s date and time of 24:00, and then the same reading but with the next day’s date and a time of 00:00?

In other words:

d=20180910&t=23:50&c1=1&v1=38000&v3=9700
d=20180910&t=23:55&c1=1&v1=38000&v3=9800
d=20180910&t=24:00&c1=1&v1=38000&v3=9900
d=20180911&t=00:00&c1=1&v1=38000&v3=9900
d=20180911&t=00:05&c1=1&v1=38000&v3=10000

If so, how long do I need to leave between the 24:00 and 00:00 updates?

Thanks!!


#19

Yes, that is how I implemented it in my pusher. The time you post is the “end time” for the 5 minute energy count so if you think about it a push at “00:00” is really a push for the energy value for the 23:55 to 00:00 period just before it, i.e. for the previous day’s last period. So I intercept any time of “00:00”, change the time to “24:00”, and the date to (date - 1), and then push that.

The first push of the day is actually another issue. Yes, for 24 hour inverters you will need to push the same values that you pushed at “24:00” again for “00:00”. However, many inverters do not run until they are self powered up so my logic simply records the values for the last push of the day and then resends them just before the first push of the new day which works for the general case. So when I am about to send a push, I check whether this is the first push of the day and if so then I first send a “00:00” push with the starting counter values, wait about 20 secs, and then send the new push. I.e this will happen at 00:05 for 24 hour inverters but may be around 07:00 etc for non-24 hour inverters.


#20

Thanks.

How long do you wait between the 24:00 and 00:00 updates?

Cheers.