You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tesla Powerwall HA plugin is having endpoint issues due to Tesla API changes. The Tesla Gateway: set_operation was failing due to endpoint urls being old. A fix is listed below that worked for me as a temp workaround.
What version of Home Assistant Core has the issue?
2023.10.3
What was the last working version of Home Assistant Core?
The Tesla Powerwall HA plugin is having endpoint issues due to Tesla API changes. The Tesla Gateway: set_operation was failing due to endpoint urls being old.
I copied the teslapy (not telsajsonpy) from this repo into my main /root/config/ folder as was done here for teslajsonpy by gwok1 for Telsa Custom integration, and the set operation mode of my powerwalls is working again. When this integration is fix/updated, I will be sure to nuke this /root/config/teslapy folder out of the config dir.
https://github.com/tdorssers/TeslaPy/tree/master
It has an updated enpoints.json file. To be clear, I copied the inner folder teslapy into the /root/config/, didn't copy the whole github repo download, just the inner folder named teslapy.
Additional information
Apologies if I am submitting this wrong.
Here is the original error message that the above fixes:
`Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:468
First occurred: 5:42:31 PM (1 occurrences)
Last logged: 5:42:31 PM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 404 Client Error: Not Found for url: https://owner-api.teslamotors.com/api/1/powerwalls/STE20210325-00821/operation
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tesla_gateway/init.py", line 51, in set_operation
await hass.async_add_executor_job(battery.set_operation, service.data['real_mode'])
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 662, in set_operation
return self.command('BATTERY_OPERATION_MODE', default_real_mode=mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 646, in command
response = self.api(name, **kwargs)['response']
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 596, in api
return self.tesla.api(name, pathvars, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 286, in api
return self.request(endpoint['TYPE'], uri, serialize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 121, in request
response.raise_for_status() # Raise HTTPError, if one occurred
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://owner-api.teslamotors.com/api/1/powerwalls/STE20210325-00821/operation`
The text was updated successfully, but these errors were encountered:
Hey there @bdraco, @jrester, @daniel-simpson, mind taking a look at this issue as it has been labeled with an integration (powerwall) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of powerwall can trigger bot actions by commenting:
@home-assistant close Closes the issue.
@home-assistant rename Awesome new title Renames the issue.
@home-assistant reopen Reopen the issue.
@home-assistant unassign powerwall Removes the current integration label and assignees on the issue, add the integration domain after the command.
You can have both integrations loaded at the same time, but the issue you highlight here isn't relevant to the core HA integration and could be closed.
The problem
The Tesla Powerwall HA plugin is having endpoint issues due to Tesla API changes. The Tesla Gateway: set_operation was failing due to endpoint urls being old. A fix is listed below that worked for me as a temp workaround.
What version of Home Assistant Core has the issue?
2023.10.3
What was the last working version of Home Assistant Core?
2023.10.3
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tesla Powerwall
Link to integration documentation on our website
https://www.home-assistant.io/integrations/powerwall
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
Apologies if I am submitting this wrong.
Here is the original error message that the above fixes:
`Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:468
First occurred: 5:42:31 PM (1 occurrences)
Last logged: 5:42:31 PM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 404 Client Error: Not Found for url: https://owner-api.teslamotors.com/api/1/powerwalls/STE20210325-00821/operation
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2012, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2049, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tesla_gateway/init.py", line 51, in set_operation
await hass.async_add_executor_job(battery.set_operation, service.data['real_mode'])
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 662, in set_operation
return self.command('BATTERY_OPERATION_MODE', default_real_mode=mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 646, in command
response = self.api(name, **kwargs)['response']
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 596, in api
return self.tesla.api(name, pathvars, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 286, in api
return self.request(endpoint['TYPE'], uri, serialize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/teslapy/init.py", line 121, in request
response.raise_for_status() # Raise HTTPError, if one occurred
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://owner-api.teslamotors.com/api/1/powerwalls/STE20210325-00821/operation`
The text was updated successfully, but these errors were encountered: