Energy Products

Rest Interface for Powerwall 2 Energy Gateway

Hi,

I had a Powerwall 2 with backup installed about 2 weeks ago and the performance is better than expected - many thanks for such a well engineered product (it was well worth the extended 7 month delay :-))

The Energy Gateway has been set to a static IP address on a wired LAN connected network in my home. The basic graphic display provided by a browser to the gateway shows minimal data on the graphic. I'd like to collect historical performance data to enable me to analyse performance characteristics over time so my question is:

Does the Energy Gateway have a RESTful interface which I can use to gather internal data relating to performance statistics?

If not, is there another way I can collect this information for long term storage and analysis?

With my SolarBridge Micro-Inverter Solar panels, at the time, the Company advised a RESTful interface was scheduled for future firmware releases but in Nov-2014, SolarBridge was bought out by SunPower and this interface was never provided. None-the-less, I have cobbled some programming code together that allows me to extract the data available via the SolarBridge Power Manager Web Interface and this suits my needs so I'm wondering if Powerwall 2 does not have (or will not get) a RESTful interface, is there a way I can gather this data?


Thanks in advance,

Harry E.
[email protected]
«134567

Comments

  • edited September 2017
    I don't think you can download data from the gateway itself. The data is fed from the Tesla NOC to the Tesla app. I'm curious if they have similar APIs like the vehicles but just for the Powerwall so you can download the data from their NOC.

    The only reason why I think there's no interface on the gateway. I accidentally powered off my entire wifi network at home for a few hours, and only realized it when Tesla app could not connect to my Powerwall. When I brought up my wifi network again, everything was find, but the Tesla app has no data for the duration of the wifi outage...
  • edited September 2017
    Thanks, this is also why I'd like to be able to get data directly from the Energy Gateway device.

    :-)
  • edited September 2017
    Yes these are the addresses I use:-

    Tesla Gateway - http://"Gateway address"/api/meters/aggregates
    Vera - http://"Vera Address"/data_request?id=sdata&output=json
    Fronius - http://"Fronius address"/solar_api/v1/GetPowerFlowRealtimeData.fcgi

    I am no programmer so I use a low power PC running Windows 10 and script the collection using Powershell and store the data in a round robin database - RRDtool. I then use the tool to create regular graphs.
    Examples here for power from the PV/storage, Solar thermal (Consolar - no REST so had to hack their Serial interface) , Vera for temperatures and Nest data, weather from public services via another REST call, river levels and flood predictions from the UK environment agency (REST again).
    I'm an amateur with spare time on my hands and sure that a more competent programmer could produce a more resilient and polished result. I can provide the PS scripts as a starter templates if required.
    https://www.bowmill.net
    Realtime data using SteelSeries gauges here https://www.bowmill.net/rad3.htm ... not happy with the animation so far but is a work in progress.
  • edited September 2017
    NB If you do browse to my website you may find it VERY slow to respond. On a good day ADSL uploads are <1Mb and I am currently backing up all my pics to a cloud service. The initial backup will take most of the bandwidth and will run for at least another week.
  • edited September 2017
    Sashton,

    You are a star! For a non-programmer your work is exceptional; perhaps you think the underlying code is a little messy :0:-) but the presentation is first class!!

    This is exactly what I was looking for in the absence of a clearly defined set of API's. Reviewing your dashboard displays it seems you have already decoded the various parameter/value pairs. Would you mind sharing?

    Alas, I had a typo in my original e-mail address it should be "[email protected]".

    I too am using a low-power CPU (a Raspberry Pi 3 Model B in fact because it includes Bluetooth and WiFi all on-board so all I need is to provide it with power and it can then be used as both data collector and controller using an attached 433 MHz transmitted to control compatible device relay modules).

    Currently, I send my SolarBridge Micro-Inverter data to http://pvoutput.org; The data is collected accumulated and provides nice summaries (https://pvoutput.org/list.jsp?userid=35050). I can use this data cross-referenced with the Energy Gateway to provide data as to best-use so I can optimise my independence from the grid.

    Many thanks for the pointer and quick response - very much appreciated!!!


    Kind regards,

    Harry E.
    [email protected]
  • edited September 2017
    @Harry Sent a copy of the PS script and a few comments. Do mail me if it doesn't arrive [email protected]
    The JSON format and names they use a pretty self-explanatory and will probably make more sense to you than my script! I just downloaded the JSON file once and popped it into one of the many public JSON formatters on the web to make it easier to read. I use RRDtool https://oss.oetiker.ch/rrdtool because I can just regularly throw data at it and not care about aggregation or space management - it's ideal for this sort of thing.
  • edited October 2017
    @sashton hi - great work - I to am no programmer - Could you also send me a copy of your PS scripts?, I am trying to achieve something similar in terms of approximate State of Charge, also working on plotting diverted spare solar via Immersun units to immersion heaters. [email protected]
  • edited October 2017
    @gbuchan I have some spare time at the weekend so I'll knock up one that retrieves the basic info and paste it under this topic.

    I went to the UK Solar and Storage trade fair at the NEC yesterday (no sign of Tesla but all the other major battery and inverter mfrs. were there) and there was a stand promoting smart car chargers similar to the Mennekes Amtron EVSE, but a lot cheaper - and on the back wall I saw this:- http://myenergi.uk/product/eddi/ , which I think is a newer version of the Immersun and they were planning a programmable interface to it later this year
    ... may be worth a look.
  • edited October 2017
    I prepared a complete set of instructions for setting up PS, reading the data, examples of creating a simple RRD database and creating a graph from it.
    Sadly the forums spam filter triggered when I came to post it all :(
  • edited October 2017
    @sashton it sounds as if you are doing a great service by discovering and decoding the data. A pity that Tesla do not provide the tools. I do hope you are able to find a way of sharing the information with us!
Sign In or Register to comment.