diff --git a/README.md b/README.md index ae9403a..017be4a 100644 --- a/README.md +++ b/README.md @@ -588,22 +588,34 @@ Example Output: [here](https://github.com/jasonacox/pypowerwall/blob/main/docs/v * Alerts * BackfeedLimited - Unknown + * BatteryBreakerOpen + * BatteryComms - Communication issue with Battery * BatteryFault - Powerwall Failure * DeviceShutdownRequested + * ExcessiveVoltageDrop + * FWUpdateFailed - Firmware Upgrade Failed * FWUpdateSucceeded - Firmware Upgrade Succeeded * GridCodesWrite - Unknown + * GridFaultContactorTrip * HighCPU - Occurs when too many API calls are made against the gateway especially with bad credentials + * IslandingControllerMIA * PanelMaxCurrentLimited * PodCommissionTimeError - Unknown but happened when some of the Powerwalls failed during a firmware upgrade and was disabled (see [discussion](https://github.com/jasonacox/Powerwall-Dashboard/discussions/47)) * PodCommissionTime - Unknown + * PVInverterComms - Communication issue with Solar Inverter * RealPowerAvailableLimited - Unknown but seems to happen when Powerwall reaches 100% full * ScheduledIslandContactorOpen - Manually Disconnected from Grid * SelfConsumptionReservedLimit - Battery reached reserve limit during self-consumption mode and switches to grid * SiteMaxPowerLimited - Unknown + * SiteMeterComms - Communication issue with Site Meter * SiteMinPowerLimited - Unknown * SolarChargeOnlyLimited - Occurs when battery is below reserve limit and solar exclusively used to charge battery back up to limit + * SolarMeterComms - Communication issue with Solar Meter + * SolarRGMMeterComms - Communication issue with Solar Revenue Grade Meter * SystemConnectedToGrid * SystemShutdown + * UnscheduledIslandContactorOpen + * WaitForUserNoInvertersReady - Occurs during grid outage when battery shuts down more than once due to load or error. Requires user intervention to restart. #### TETHC - Tesla Energy Total Home Controller @@ -658,7 +670,9 @@ Example Output: [here](https://github.com/jasonacox/pypowerwall/blob/main/docs/v * Alerts * PINV_a010_can_gtwMIA - Indicate that gateway/sync is MIA (seen during firmware upgrade reboot) + * PINV_a016_basicAcCheckUnderVoltage * PINV_a039_can_thcMIA - Seems to indicate that Home Controller is MIA (seen during firmware upgrade reboot) + * PINV_a041_sensedGridDisturbance * PINV_a067_overvoltageNeutralChassis - Unknown #### TESYNC - Tesla Energy Synchronizer @@ -671,6 +685,10 @@ Example Output: [here](https://github.com/jasonacox/pypowerwall/blob/main/docs/v * Alerts * SYNC_a001_SW_App_Boot - Unknown + * SYNC_a005_vfCheckUnderVoltage + * SYNC_a020_LoadsDropped + * SYNC_a030_Sitemaster_MIA + * SYNC_a036_LoadsDroppedLong * SYNC_a038_DoOpenArguments - Unknown * SYNC_a044_IslanderDisconnectWithin2s * SYNC_a046_DoCloseArguments @@ -702,13 +720,14 @@ Example Output: [here](https://github.com/jasonacox/pypowerwall/blob/main/docs/v * This includes the Tesla PV Rapid Shutdown MCI (“mid-circuit interrupter") devices which ensure that if one photovoltaic cell stops working, the others continue working. * Alerts - * PVS_a018_MciString[A-D] - This indicates a solar string (A, B, C or D) that is not connected. + * PVS_a0[17-20]_MciString[A-D] - This indicates a solar string (A, B, C or D) that is not connected. * PVS_a021_RapidShutdown * PVS_a026_Mci1PvVoltage * PVS_a027_Mci2PvVoltage * PVS_a031_Mci3PvVoltage * PVS_a032_Mci4PvVoltage * PVS_a039_SelfTestRelayFault + * PVS_a050_RelayCoilIrrationalWarning #### NEURIO - Wireless Revenue Grade Solar Meter diff --git a/proxy/HELP.md b/proxy/HELP.md index c105d6c..983f2fd 100644 --- a/proxy/HELP.md +++ b/proxy/HELP.md @@ -17,6 +17,7 @@ There are several shortcut API URLs that aggregate or otherwise process Powerwal * /pod - Battery States and Power Data * /version - Powerwall Firmware Version (string and integer representation) * /alerts - Summary of Powerwall Alerts from Device Vitals +* /alerts/pw - Summary of Powerwall Alerts in dictionary/object format * / - Display Powerwall Flow Animation ## Powerwall Proxy Allowed API Calls diff --git a/proxy/RELEASE.md b/proxy/RELEASE.md index 92db0af..fb1bdd7 100644 --- a/proxy/RELEASE.md +++ b/proxy/RELEASE.md @@ -1,5 +1,8 @@ ## pyPowerwall Proxy Release Notes +### Proxy t24 (16 Jan 2023) + +* Added new alerts endpoint ('/alerts/pw') for retrieving the data in dictionary/object format (helps with telegraf usage). ### Proxy t23 (8 Jan 2023) diff --git a/proxy/server.py b/proxy/server.py index b24d989..4c3d1d9 100755 --- a/proxy/server.py +++ b/proxy/server.py @@ -27,7 +27,7 @@ import ssl from transform import get_static, inject_js -BUILD = "t23" +BUILD = "t24" ALLOWLIST = [ '/api/status', '/api/site_info/site_name', '/api/meters/site', '/api/meters/solar', '/api/sitemaster', '/api/powerwalls', @@ -185,6 +185,14 @@ def do_GET(self): elif self.path == '/alerts': # Alerts message = pw.alerts(jsonformat=True) + elif self.path == '/alerts/pw': + # Alerts in dictionary/object format + pwalerts = {} + idx = 1 + alerts = pw.alerts() + for alert in alerts: + pwalerts[alert] = 1 + message = json.dumps(pwalerts) elif self.path == '/freq': # Frequency, Current, Voltage and Grid Status fcv = {}