Closed LeChat109 closed 1 year ago
You should not lose your config, if you reinstall.
it's not exactly my "config" it's the devices that i disable and the devices names.
You probably will have to name them again if you have changed the names. If you did not rename the unique id:s all other configs should be fine.
Yeah but I have a lot of AC and it's the 7th time I've done it.
I wanna find an easier way to do it
You can change the device names from the smartthing api website. I don't rename them other than that. Translations of entities are not yet supported in HA if that is why you rename them.
Ok, I do it but can you make something to renew this access because the problem exists
If you have to recover from backup, it is likely the authorization to the api goes bad. I'm not sure, but you could maybe use custom translations on HA level.
I think it's the token that changes sometimes for security and if I restore an older version of the add-on, it sends an old token
I think it's the token that changes sometimes for security and if I restore an older version of the add-on, it sends an old token
This is my understanding yes.
Have the same issue.. How to renew the token?
Unfortunately, you can't.
You have to delete the add-on and re-configure it.
Until an update
Ok.. good to know.. Will do that way Many thanks
Tried to setup it again but it always fails with a generic error..
@spanzetta Remove the tokens from your smartthings mobile app and try again.
@LeChat109 The token expiring is something I can do nothing about. You can try the official integration if you have better luck with that.
I did it already.. remove current token and create a new one.. but get always the error (pls try again).. I also tried to remove the Hacs custom integration to use the original Smartthings integrated but again.. same error! Any idea how to solve?
Make sure your ha instance is connectable from the internet and your ssl certificates are working. Follow the instructions from the official integration and make sure everything works.
It is connectable.. and everything else works.. here is the error I get with the token
@spanzetta Remove the tokens from your smartthings mobile app and try again.
It is already removed by SmartThings Mobile app.. :-(
This seems to be the error.. Anyone can guide me how to fix it/understand the cause of the error?
Logger: homeassistant.components.smartthings.config_flow Source: components/smartthings/smartapp.py:176 Integration: smartthings (documentation, issues) First occurred: 13:23:50 (3 occurrences) Last logged: 17:46:13
API error setting up the SmartApp: {'requestId': '160A574A-E27A-4BF5-9FF1-DFFEAB699145', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'PatternError', 'target': 'targetUrl', 'message': 'targetUrl is malformed.', 'details': []}]}} API error setting up the SmartApp: {'requestId': '42420777-D6B9-44C9-AFC8-3C9801416702', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'PatternError', 'target': 'targetUrl', 'message': 'targetUrl is malformed.', 'details': []}]}} API error setting up the SmartApp: {'requestId': 'AA3F565B-728D-4C95-A07A-2DB85A758162', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'PatternError', 'target': 'targetUrl', 'message': 'targetUrl is malformed.', 'details': []}]}} Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/smartthings/config_flow.py", line 104, in async_step_pat await update_app(self.hass, app) File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 176, in update_app await app.save() File "/usr/local/lib/python3.10/site-packages/pysmartthings/app.py", line 349, in save response = await self._api.update_app(self._app_id, self.to_data()) File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 179, in update_app return await self.put(API_APP.format(app_id=app_id), data) File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 399, in put return await self.request("put", self._api_base + resource, data=data) File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 368, in request raise APIResponseError( pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "160A574A-E27A-4BF5-9FF1-DFFEAB699145", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "PatternError", "target": "targetUrl", "message": "targetUrl is malformed.", "details": []}]}}
I think you would get better support on the official HA repo.
solved.. the config for duckdns was missing some parameters.. and even if it was working (the external access).. the smartthings integration would not complete the configuration without that parameters..
As of the latest HA release the support for entity translation is made available. This would fix your issue when implemented. You could also make your own translation to keep the custom entity names intact.
Ok, thanks, I haven't had the problem again since.
i have a problem, my token has expired (for some reasons idk) and i can't find a way to renew it without completely uninstall the add-on and re-install it and in the process, i lose all my config.
the problems occurs when i restore a backup of my system or when i restore a backup of the add-on.
thx in advance for the help 😄