Calculating v3

I have 5min data for energy imported from the grid and energy exported to the grid, but can’t push these to PVO (don’t have them until after PVO push has occurred).

I have tried uploaded them via the live loader (to v7 and v8) respectively which works, and tried to create an extended data rule v3 = v1 + v7 - v8 to calculate the energy consumed. But this didn’t appear to work… am I missing something or is it not possible to calculate v3 this way?


After doing some more reading and googling, I’m wondering if my problem can be solved with an addstatus push somehow?

Ok it looks like the extended data rule can only be used to set v7 to v12. It can use v1 to v6 as inputs only.
Looks like the only way i can do this then is to download my generation data, calculate the required values and then upload the required v3. Probably isn’t worth my time.

You can modify variables 1-7 with the rules. However, you can multiply by a constant and add and subtract constants and other variables. If you want to multiply by a constant the syntax is somewhat arcane and goes like this. Increase Power by 2%: power * = 1.02 ; (Every variable, constant and operator must be separated by spaces.)
From the HELP file on Rules:

The rule has access to the following variables which can be used as part of the rule logic -

  • power - the raw power value in watts
  • hour - hour of the day (0-23)
  • minute - minute of the hour (0-59)
  • out - true if the direction is solar
  • in - true if the direction is consumption

Its possible to use addstatus to accept net power, but unfortunately it only accepts power (v2/v4) rather than energy, so it needs to be converted to power before sending -

Use ‘addstatus.jsp?n=1&v2=(power_exported)&v4=(power_imported)’

The net data then would be merged with generation to calculate gross consumption v3 and v4

A future enhancement could be to accept net energy instead of power, and the API will do the calculation.