Teslemetry / hass-teslemetry

Teslemetry integration from Home Assistant through HACS
https://teslemetry.com
MIT License
13 stars 7 forks source link

Loss of Energy Controls - Error fetching Teslemetry Energy Site Info XXXXXX data: Multiple 5xx failures #151

Open purcell-lab opened 5 days ago

purcell-lab commented 5 days ago

Checklist

Describe the issue

As reported in Discord the Tesla site is returning 500 status errors, which results in the Energy controls going unavailable.

Screenshot 2024-11-08 16 05 12

I'm wondering if a delay between calling for live_status & site_info may smooth things out a bit?

Reproduction steps

Config log attached.

config_entry-teslemetry-9148783ba548ef27e70b73108cd5fd97 (9).json

Debug logs

2024-11-08 16:04:29.800 DEBUG (MainThread) [tesla_fleet_api] Requested: https://na.teslemetry.com/api/1/energy_sites/2252097574301386/live_status
2024-11-08 16:04:29.801 DEBUG (MainThread) [tesla_fleet_api] Response Status: 200
2024-11-08 16:04:29.801 DEBUG (MainThread) [tesla_fleet_api] Response JSON: {'response': {'solar_power': 1961, 'percentage_charged': 100, 'battery_power': -200, 'load_power': 6130, 'grid_status': 'Active', 'grid
_power': 4369, 'generator_power': 0, 'island_status': 'on_grid', 'storm_mode_active': False, 'timestamp': '2024-11-08T16:04:29+10:00', 'wall_connectors': [{'din': '1529455-02-E--PGT22325087207', 'wall_connector_
state': 2, 'wall_connector_fault_state': 2, 'wall_connector_power': 0, 'ocpp_status': 1, 'powershare_session_state': 1}, {'din': '1529455-02-E--PGT22325086977', 'vin': '5YJ3F7EC5LF698201', 'wall_connector_state'
: 4, 'wall_connector_fault_state': 2, 'wall_connector_power': 0, 'ocpp_status': 1, 'powershare_session_state': 1}]}}
2024-11-08 16:04:29.802 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Energy Site Live 2252097574301386 data in 0.672 seconds (success: True)
2024-11-08 16:04:43.126 DEBUG (MainThread) [tesla_fleet_api] Requested: https://na.teslemetry.com/api/1/energy_sites/2252097574301386/site_info
2024-11-08 16:04:43.126 DEBUG (MainThread) [tesla_fleet_api] Response Status: 500
2024-11-08 16:04:43.128 DEBUG (MainThread) [tesla_fleet_api] An error occurred while processing the request.
2024-11-08 16:04:43.129 ERROR (MainThread) [custom_components.teslemetry] Error fetching Teslemetry Energy Site Info 2252097574301386 data: Multiple 5xx failures
2024-11-08 16:04:43.130 DEBUG (MainThread) [custom_components.teslemetry] Finished fetching Teslemetry Energy Site Info 2252097574301386 data in 5.240 seconds (success: False)
2024-11-08 16:04:45.335 DEBUG (MainThread) [custom_components.teslemetry] Streaming received vehicle_data from 5YJ3F7EC5LF698201
2024-11-08 16:04:45.335 DEBUG (MainThread) [custom_components.teslemetry] Manually updated Teslemetry Vehicle 5YJ3F7EC5LF698201 data
2024-11-08 16:04:47.385 DEBUG (MainThread) [custom_components.teslemetry] Streaming received state from LRWYHCFS9PC851970
2024-11-08 16:04:47.385 DEBUG (MainThread) [custom_components.teslemetry] Manually updated Teslemetry Vehicle LRWYHCFS9PC851970 data
Bre77 commented 3 days ago

Hey Mark do you have any evidence that other services work when Teslemetry doesnt? I am thinking I'll need to start running a test with Tessie, Teslemetry, and the Fleet API directly to see if there is a correlation.

Here is the number of status 500 messages for energy sites over the last 7 days and the number of users it impacted. A small number of people constantly have issues, but there are also spikes.

image