Powerwall - Extended Parameters

PVOutput Integration Service v1.5.1 now supports extended parameters v7 to v12.

v7=battery.frequency

See the powerwall.ini file for more examples.

https://bitbucket.org/pvoutput/pvoutput-integration-service/downloads/

1 Like

Hi BB, thanks for this, I’ve got my newly installed PW2 hooked up.

Does this support uploading the PV system output (as measured by the solar JSON element) as well as the load, or only one at time, depending on the direction parameter in powerwall.ini?

At the moment, I’m relying on PVBeanCounter for PV output, but it would be great to be able to use just the PVOutput Integration Service for PV output, total load, grid input, and battery.

From my reading of PowerwallLogReader.java in the source, it is one or the other only - either consumption (load) or generation (solar).

It supports the solar as well using direction=out but only one direction at a time.

To do both directions, another intergation service would need to be setup.

Thanks for the quick reply.

Can I put in a feature request?

The state of charge of the powerwall is available from a similar API

http://address_of_gateway/api/system_status/soe

It returns a simple single element JSON response:

{"percentage":100}

I don’t know if this can be relatively easily added to the existing Powerwall reader, or it is a new reader, but I’d see it as an element that you could specify in the powerwall.ini - for example:

v12=soe.percentage

or just

v12=percentage

So you can report the state of charge to PVOutput.

I’m trying to do it using battery.imported_energy and battery.exported_energy and some fudge factor maths, which is getting closer (see https://pvoutput.org/intraday.jsp?id=8562&sid=6943 for an example of what I’m trying to do), but I’ve now found that there’s an API that tells you exactly what it is :slight_smile:

Sure, will look at adding this in the next release.

1 Like

Tesla gateway updated ~17 October for our site. IP changed and fixed in the PVO Integration Service settings but since than the time of day reporting is incorrect regardless of the settings in pwoutput.ini. Local time is GMT+11 at the moment.
Any advice would be appreciated.

Can you share how your PVOutput is configured?

You appear to be able to show load and grid as separate entities - are you combining other monitors, to do this, or is this all just from the PW2 data?

I can’t get the solar graphs to appear on mine, and the grid seems to be displayed incorrectly.

The service assumes the time reported by the powerwall are in UTC and adjusts it based on the timezone setting in pvoutput.ini

timezone=Australia/Sydney

Do you have an example screenshot?

See https://imgur.com/a/AB2fp

You can see mine at the top and his below. His has a solar (green) that reflects the ongoing generation value, whereas mine only seems to have a rising total.

His has a load/grid shading that changes from red to yellow, mine only has the red line…no difference betgween grid and load.

Either he has configured his PVoutput settings differently from mine to achieve these, or he’s using another monitoring solution on top of the PW…can’t tell.

Here’s my config:

  • PV Bean Counter uploading data from SMA Converter to provide solar generation (could also use another instance of PV Integration Service, but had beancounter running anyway). No example given.
  • PV Integration Service providing most of the stats from the powerwall - see powerwall.ini below.
  • Powershell script grabbing SOC and uploading direct - see example below. Powershell cobbled together from examples on teslamotorsclub.com and forums.tesla.com.
  • PVOutput extended parameter settings on PVOutput are set to
  • v7: Label = Battery, Unit W, W to kWh Summary, Axis 0
  • v8: Label = Load, Unit W, W to kWh Summary, Axis 0
  • v9: Label = Battery Charge, Unit %, Last Summary, Axis 0
  • v10: Label = Grid, Unit W, W to kWh Summary, Axis 1
  • v11: Label = Battery Voltage, Unit V, No Summary, Axis 2
  • Standard Parameter 1 set to Power Generation v2

SoC Powerwall Script

do
    {
        $ThisTime = Get-Date -format HH:mm
        $Now = Get-Date -format HH:mm:ss
        $ThisMin = Get-Date -format mm
        $ThisDate = Get-Date -format yyyyMMdd
        $socdata = Invoke-WebRequest -Uri 'http://GATEWAY_IP/api/system_status/soe' -UseBasicParsing | ConvertFrom-Json
        $soc = $socdata.percentage
        $soc = [math]::Round($soc,2)

        Write-Host ("$Now State of Charge $soc")
        if ($ThisMin % 5 -eq 0)
        {
            Write-Host ("$Now Waiting 15 Seconds")
            Start-Sleep 15
            $Now = Get-Date -format HH:mm:ss
            $parms = @{}
            $parms.Add('key','PVOUTPUT_KEY')
            $parms.Add('sid','PVOUTPUT_SID')
            $parms.Add('d',$ThisDate)
            $parms.Add('t',$ThisTime)
            $parms.Add('v9',$soc)
            $Response = Invoke-WebRequest -Uri http://pvoutput.org/service/r2/addstatus.jsp -Body $Parms -UseBasicParsing
            $Now = Get-Date -format HH:mm:ss
            Write-Host ("$Now Result $Response.Content")
        }
        Start-Sleep 50
    }
    While ($loop_forever='true')

powerwall.ini

url=http://GATEWAY_IP/api/meters/aggregates
poll=300
direction=in
voltage=instant_average_voltage
v7=battery.instant_power
v8=load.instant_power
v10=site.instant_power
v11=load.instant_average_voltage

BJReplay - thanks for the configuration information. I’ve used your configuration and it is showing most of what I want.

https://pvoutput.org/intraday.jsp?id=61595&sid=54826

Probably because I haven’t set up your script. I’m also still using Enphase for my power generation - so will have to work on that. But it gives me a good start - thanks.

Thanks for that - the script works great, only trap is making sure that you are running latest version of PS.

My Powerwall firmware got updated today from 1.7.0 to 1.9.1. With the latest firmware, PVOutput Integration Service doesn’t seem to work anymore. No data is written to the log file anymore. Is anyone having the same issue?

Thanks.

Me too, stopped at 5.30 AM. However the log file says:

2017-11-07 14:48:52,087 WARN [Thread-1] (ADataLogReader.java:847) - Future time: Tue Nov 07 23:59:00 AEDT 2017

Which implies that the time stamp may be wrong and needs an offset.

I played around with the GMT parameter in PVOUTPUT.ini, but I suspect that it’ll have to be done elsewhere.

Bankstownbloke has access to my PW2’s logs, so perhaps he can look at it when he has time…

My Powerwall updated to 1.9.1 some weeks back and that broke the PVOutput Integration Services as the time stamp was incorrect and could not seem to be fixed by config file changes - unable to use PVOutput for Powerwall data since this time…
Pleas to Tesla Australia for longer term data fell on deaf ears - not in their priority list to be available soon. My contemplated solution is to record locally from the Gateway to local database

Greg Nichols

The timestamps are now presented in local time rather than UTC. A fix will be available in the next version of the Integration Service, possibly early next week.

The Integration service runs with the timezone=Australia/Sydney without any output. Connects to the gateway interface but does not read any data. Perhaps in re-installing the service I have missed something or perhaps the gateway update changed the data presentation to the reader.

Hi BB - can it be configurable please - my PW2 hasn’t been updated yet and I don’t know when it will be. So there might be two sets of users - those that are running on 1.9.1 and those that aren’t (I’m running 1.6 at this point in time).

It will work for both scenarios.

The service will use timezone used by the PW gateway and convert that to the timezone configured in pvoutput.ini

1 Like