zabuldon / teslajsonpy

Apache License 2.0
57 stars 62 forks source link

Powerwall Grid Charging - Errors on Changing #449

Open JasSmiths opened 9 months ago

JasSmiths commented 9 months ago

I suspect this is likely another API change but in the last 24hrs the ability to enable / disable grid charging on Powerwall has stopped working giving an unknown error.

Logs show the following:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 195, in async_handle_select_option await self.async_select_option(option) File "/config/custom_components/tesla_custom/select.py", line 279, in async_select_option await self._energysite.set_grid_charging(True) File "/usr/local/lib/python3.11/site-packages/teslajsonpy/energy.py", line 254, in set_grid_charging await self._send_command( File "/usr/local/lib/python3.11/site-packages/teslajsonpy/energy.py", line 61, in _send_command data = await self._api( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/teslajsonpy/controller.py", line 1319, in api return await self.__post_with_retries_except_unavailable( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__ do = self.iter(retry_state=retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter return fut.result() ^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result raise self._exception File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__ result = await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/teslajsonpy/controller.py", line 1351, in __post_with_retries_except_unavailable return await self.__connection.post(command, method=method, data=data, url=url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/teslajsonpy/connection.py", line 165, in post return await self.__open(url, method=method, headers=self.head, data=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/teslajsonpy/connection.py", line 216, in __open raise TeslaException(resp.status_code) teslajsonpy.exceptions.TeslaException

purcell-lab commented 9 months ago

Looks like energy products support has stopped today using the Owner API. The future is to migrate too the supported FleetAPI.