Powerwall API

Check battery state of charge

Link

https://x.x.x.x/api/system_status/soe

Output

{
   "percentage":79.44300037133308
}

Read all power meters

Link

https://x.x.x.x/api/meters/aggregates/

Output

{
   "site":{
      "last_communication_time":"2018-10-13T21:21:29.891050227+10:00",
      "instant_power":4.78000020980835,
      "instant_reactive_power":-515.780029296875,
      "instant_apparent_power":515.8021781880055,
      "frequency":50.04999923706055,
      "energy_exported":601521.4058429991,
      "energy_imported":135554.47695411026,
      "instant_average_voltage":234.30999755859375,
      "instant_total_current":0,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   },
   "battery":{
      "last_communication_time":"2018-10-13T21:21:29.892305888+10:00",
      "instant_power":720,
      "instant_reactive_power":-20,
      "instant_apparent_power":720.2777242147642,
      "frequency":50.062,
      "energy_exported":1595560,
      "energy_imported":1804580,
      "instant_average_voltage":234.60000000000002,
      "instant_total_current":-20.1,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   },
   "load":{
      "last_communication_time":"2018-10-13T21:21:29.891050227+10:00",
      "instant_power":727.0491565237717,
      "instant_reactive_power":-369.8756188498211,
      "instant_apparent_power":815.7257194801853,
      "frequency":50.04999923706055,
      "energy_exported":0,
      "energy_imported":4093574.0233333334,
      "instant_average_voltage":234.30999755859375,
      "instant_total_current":3.1029369813465126,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   },
   "solar":{
      "last_communication_time":"2018-10-13T21:21:29.892118222+10:00",
      "instant_power":8.539999961853027,
      "instant_reactive_power":160.55999755859375,
      "instant_apparent_power":160.7869534986097,
      "frequency":50.04999923706055,
      "energy_exported":4768621.932500129,
      "energy_imported":60.98027790632619,
      "instant_average_voltage":234.32000732421875,
      "instant_total_current":0,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   },
   "busway":{
      "last_communication_time":"0001-01-01T00:00:00Z",
      "instant_power":0,
      "instant_reactive_power":0,
      "instant_apparent_power":0,
      "frequency":0,
      "energy_exported":0,
      "energy_imported":0,
      "instant_average_voltage":0,
      "instant_total_current":0,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   },
   "frequency":{
      "last_communication_time":"0001-01-01T00:00:00Z",
      "instant_power":0,
      "instant_reactive_power":0,
      "instant_apparent_power":0,
      "frequency":0,
      "energy_exported":0,
      "energy_imported":0,
      "instant_average_voltage":0,
      "instant_total_current":0,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   },
   "generator":{
      "last_communication_time":"0001-01-01T00:00:00Z",
      "instant_power":0,
      "instant_reactive_power":0,
      "instant_apparent_power":0,
      "frequency":0,
      "energy_exported":0,
      "energy_imported":0,
      "instant_average_voltage":0,
      "instant_total_current":0,
      "i_a_current":0,
      "i_b_current":0,
      "i_c_current":0
   }
}

More Specific Meter Details

Link

https://x.x.x.x/api/meters/solar

Output

[
   {
      "id":0,
      "location":"solar",
      "type":"neurio_tcp",
      "cts":[
         false,
         false,
         false,
         true
      ],
      "inverted":[
         false,
         false,
         false,
         false
      ],
      "connection":{
         "ip_address":"Neurio-02235",
         "port":443,
         "short_id":"02235",
         "device_serial":"XXXXXXXXXXXXX",
         "neurio_connected":true,
         "https_conf":{
            "client_cert":"/etc/site/certs/neurio/neurio.crt",
            "client_key":"/etc/site/certs/neurio/neurio.key",
            "server_ca_cert":"/etc/site/certs/neurio/neurio-ca-chain.cert.pem",
            "max_idle_conns_per_host":1
         }
      },
      "Cached_readings":{
         "last_communication_time":"2018-10-13T21:51:48.394054531+10:00",
         "instant_power":23.229999542236328,
         "instant_reactive_power":150.35000610351562,
         "instant_apparent_power":152.13401070786074,
         "frequency":49.95000076293945,
         "energy_exported":60.98027790632619,
         "energy_imported":4768632.968055684,
         "instant_average_voltage":233.7899932861328,
         "instant_total_current":0,
         "i_a_current":0,
         "i_b_current":0,
         "i_c_current":0,
         "v_l1n":233.7899932861328,
         "serial_number":"0xXXXXXXXXXXXXXXXX",
         "version":"Tesla-0.0.7"
      }
   }
]

Link

https://x.x.x.x/api/meters/site

Output

[
   {
      "id":0,
      "location":"site",
      "type":"neurio_tcp",
      "cts":[
         true,
         false,
         false,
         false
      ],
      "inverted":[
         false,
         false,
         false,
         false
      ],
      "connection":{
         "ip_address":"Neurio-02235",
         "port":443,
         "short_id":"02235",
         "device_serial":"XXXXXXXXXXXXX",
         "neurio_connected":true,
         "https_conf":{
            "client_cert":"/etc/site/certs/neurio/neurio.crt",
            "client_key":"/etc/site/certs/neurio/neurio.key",
            "server_ca_cert":"/etc/site/certs/neurio/neurio-ca-chain.cert.pem",
            "max_idle_conns_per_host":1
         }
      },
      "Cached_readings":{
         "last_communication_time":"2018-10-13T21:58:20.281047702+10:00",
         "instant_power":2354.050048828125,
         "instant_reactive_power":-659.0599975585938,
         "instant_apparent_power":2444.5677967218726,
         "frequency":50,
         "energy_exported":601521.4841763326,
         "energy_imported":136071.78195411043,
         "instant_average_voltage":234.52000427246094,
         "instant_total_current":0,
         "i_a_current":0,
         "i_b_current":0,
         "i_c_current":0,
         "v_l1n":234.52000427246094,
         "serial_number":"0xXXXXXXXXXXXXXXXX",
         "version":"Tesla-0.0.7"
      }
   }
]

Sitemaster

Note that this will take a few seconds to respond if the link to Tesla is down.

Link

https://x.x.x.x/api/sitemaster/

Output

{
   "running":true,
   "uptime":"7136473s,",
   "connected_to_tesla":false
}

Powerwalls

Link

https://x.x.x.x/api/powerwalls/

Output

{
   "powerwalls":[
      {
         "PackagePartNumber":"1092170-03-G",
         "PackageSerialNumber":"XXXXXXXXXXXXXX"
      }
   ],
   "has_sync":true
}

Grid Status

Link

https://x.x.x.x/api/system_status/grid_status/

Output

{
   "grid_status":"SystemGridConnected"
}
{
   "grid_status":"SystemIslandedActive"
}
{
   "grid_status":"SystemTransitionToGrid"
}

Status

Link

https://x.x.x.x/api/status/

Output

{
   "start_time":"2018-07-23 07:07:24 +0800",
   "up_time_seconds":"1982h34m15.438598444s",
   "is_new":false,
   "version":"1.17.1\n",
   "git_hash":"8bdde875e2e13a0a6535d5c54499a453c5d15e72\n"
}

Customer Registration

Link

https://x.x.x.x/api/customer/registration

Output

{
   "privacy_notice":true,
   "limited_warranty":true,
   "grid_services":true,
   "marketing":true,
   "registered":true,
   "emailed_registration":true,
   "skipped_registration":false,
   "timed_out_registration":false
}

Update Status

Link

https://x.x.x.x/api/system/update/status

Output

{
   "state":"/update_unknown",
   "info":{
      "status":[
         "error"
      ]
   },
   "current_time":1539432409557,
   "last_status_time":1539429164324
}

Site Info

Link

https://x.x.x.x/api/site_info

Output

{
   "site_name":"Home Energy Gateway",
   "timezone":"Australia/Brisbane",
   "min_site_meter_power_kW":-1000000000,
   "max_site_meter_power_kW":1000000000,
   "nominal_system_energy_kWh":13.5,
   "grid_code":"50Hz_230V_1_ASNZS4777.2:2015_AU",
   "grid_voltage_setting":230,
   "grid_freq_setting":50,
   "grid_phase_setting":"Single",
   "country":"Australia",
   "state":"*",
   "region":"ASS4777.2"
}

Grid Faults

Link

https://x.x.x.x/api/system_status/grid_faults

There is a handy site to convert Epoch timestamp to local human readable time here

Output

[
   {
      "timestamp":1539068543325,
      "alert_name":"PINV_a007_vfCheckOverFrequency",
      "alert_is_fault":false,
      "decoded_alert":"[{\"name\":\"PINV_alertID\",\"value\":\"PINV_a007_vfCheckOverFrequency\"},{\"name\":\"PINV_alertType\",\"value\":\"Warning\"},{\"name\":\"PINV_a007_frequency\",\"value\":50.153,\"units\":\"Hz\"}]",
      "alert_raw":504589143234314240,
      "git_hash":"8bdde875e2e13a",
      "site_uid":"XXXXXXX-XX-X--XXXXXXXXXXX",
      "ecu_type":"TEPINV",
      "ecu_package_part_number":"1081100-99-J",
      "ecu_package_serial_number":"XXXXXXXXXXXXXX"
   },
   {
      "timestamp":1539068543324,
      "alert_name":"PINV_a007_vfCheckOverFrequency",
      "alert_is_fault":false,
      "decoded_alert":"[{\"name\":\"PINV_alertID\",\"value\":\"PINV_a007_vfCheckOverFrequency\"},{\"name\":\"PINV_alertType\",\"value\":\"Warning\"},{\"name\":\"PINV_a007_frequency\",\"value\":50.152,\"units\":\"Hz\"}]",
      "alert_raw":504588043722686464,
      "git_hash":"8bdde875e2e13a",
      "site_uid":"XXXXXXX-XX-X--XXXXXXXXXXX",
      "ecu_type":"TEPINV",
      "ecu_package_part_number":"1081100-99-J",
      "ecu_package_serial_number":"XXXXXXXXXXXXXX"
   },
   {
      "timestamp":1539068543310,
      "alert_name":"PINV_a007_vfCheckOverFrequency",
      "alert_is_fault":false,
      "decoded_alert":"[{\"name\":\"PINV_alertID\",\"value\":\"PINV_a007_vfCheckOverFrequency\"},{\"name\":\"PINV_alertType\",\"value\":\"Warning\"},{\"name\":\"PINV_a007_frequency\",\"value\":50.152,\"units\":\"Hz\"}]",
      "alert_raw":504588043722686464,
      "git_hash":"8bdde875e2e13a",
      "site_uid":"XXXXXXX-XX-X--XXXXXXXXXXX",
      "ecu_type":"TEPINV",
      "ecu_package_part_number":"1081100-99-J",
      "ecu_package_serial_number":"XXXXXXXXXXXXXX"
   },
   {
      "timestamp":1539068526642,
      "alert_name":"PINV_a007_vfCheckOverFrequency",
      "alert_is_fault":false,
      "decoded_alert":"[{\"name\":\"PINV_alertID\",\"value\":\"PINV_a007_vfCheckOverFrequency\"},{\"name\":\"PINV_alertType\",\"value\":\"Warning\"},{\"name\":\"PINV_a007_frequency\",\"value\":50.150999999999996,\"units\":\"Hz\"}]",
      "alert_raw":504586944211058688,
      "git_hash":"8bdde875e2e13a",
      "site_uid":"XXXXXXX-XX-X--XXXXXXXXXXX",
      "ecu_type":"TEPINV",
      "ecu_package_part_number":"1081100-99-J",
      "ecu_package_serial_number":"XXXXXXXXXXXXXX"
   },
   {
      "timestamp":1539068526636,
      "alert_name":"PINV_a007_vfCheckOverFrequency",
      "alert_is_fault":false,
      "decoded_alert":"[{\"name\":\"PINV_alertID\",\"value\":\"PINV_a007_vfCheckOverFrequency\"},{\"name\":\"PINV_alertType\",\"value\":\"Warning\"},{\"name\":\"PINV_a007_frequency\",\"value\":50.15,\"units\":\"Hz\"}]",
      "alert_raw":504585844699430912,
      "git_hash":"8bdde875e2e13a",
      "site_uid":"XXXXXXX-XX-X--XXXXXXXXXXX",
      "ecu_type":"TEPINV",
      "ecu_package_part_number":"1081100-99-J",
      "ecu_package_serial_number":"XXXXXXXXXXXXXX"
   }
]