You can run it locally assuming you have python installed–those are the lines to copy+paste into the terminal… I wouldn’t suggest installing it on Hassio.
So what would you suggest to do if you are using Hassio
If you open the new ST APP, you can delete the HA Smartapps that are no longer needed
unfortunately it comes back
I get a 401, “unauthorized” error when I try to run it. Using portainer against a QNAP docker system hosting HASS. Any ideas on another approach to remove the app? Here is the trace:
Traceback (most recent call last):
File “/usr/local/bin/hass_smartthings_remove”, line 10, in
File “/usr/local/lib/python3.7/site-packages/hass_smartthings_remove/remove.py”, line 16, in main
File “/usr/local/lib/python3.7/asyncio/base_events.py”, line 584, in run_until_complete
File “/usr/local/lib/python3.7/site-packages/hass_smartthings_remove/remove.py”, line 25, in remove_apps
apps = await api.apps()
File “/usr/local/lib/python3.7/site-packages/pysmartthings/smartthings.py”, line 89, in apps
resp = await self._service.get_apps(params)
File “/usr/local/lib/python3.7/site-packages/pysmartthings/api.py”, line 156, in get_apps
return await self.get_items(API_APPS, params=params)
File “/usr/local/lib/python3.7/site-packages/pysmartthings/api.py”, line 375, in get_items
‘get’, self._api_base + resource, params, None)
File “/usr/local/lib/python3.7/site-packages/pysmartthings/api.py”, line 366, in request
File “/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py”, line 942, in raise_for_status
aiohttp.client_exceptions.ClientResponseError: 401, message=‘Unauthorized’
This means the token you passed in the command line is invalid…
hmmm. well i’ve had several tokens and don’t know how to recover them after the initial copy from the smartthings site. Not only that, i’ve deleted past ones on that same site trying to clean up old installs. How do you delete the smartapp with the new ST apps? I assume its the record I see under automations. Once I do that and go back into smartthings classic, i still see the home assistant app under marketplace, myapps. If I’ve removed the integration (or at least tried to by deleting under integrations in HA), should I still see that entry? If I click on it in ST classic, i get the same “something went wrong” message. Feel like I’ve got some cleanup still to do to start fresh. Also wondering if any of my issue is related to how I expose my HA externally. I use Caddy to reverse proxy.
@andrewsayre, Since this integration is in Hass.io, And I really like Hass.oi with no interest of changing, I feel kind of pissed that there is no way to for me to clean up the old tokens. do you think you can you give us some guidance so if some one were to dig around in the CLI, they might find the files i need to delete?
I think there is some misunderstanding of how the integration works:
- Tokens are tied to your SmartThings or Samsung account. You can use any valid token under the same account to setup the integration or clean it up using the removal utility. If you didn’t retain the token when created (which the instructions indicated to do), go create another one temporarily to use with the remove utility.
- Deleting tokens does not remove the integration. It just removes access to your ST/Samsung account.
- This is a Home Assistant integration, not Hass.io. There are no local files you can delete to solve OP’s problem.
- The removal utility is what you need to use to remove the orphaned apps in Automations and Marketplace. It only requires a valid token and can be ran anywhere, as it uses the SmartThings cloud API. Note that in Home Assistant v0.90 (releasing 3/20), it will remove the apps when the integration is removed, but this requires a functioning integration.
@andrewsayre I have tried to create another token in order to fix the issue with the orphan Home Assistant Smart App but with no luck. It seems it is expecting the previous token I had used and removed. Therefore there is no way for me that I’m using Hass.IO to integrate the pluging you have done with my SmartThings account again. Then, do you have any other solution for people with Hass.IO?
Basically my question is: How can I integrate again your plugin with my SmartThings account if when I try it, it says that I can’t.
I was wondering, should I be on SmartThings v2 or SmartThings v3 for this to work? I am using android, which app should I be using? no matter how I try to do this, I can not get the SmartThings app to install correctly. SSL with Lets Encrypt is working perfectly and I have foll external access. what port is smartthings communicating on?
I’m using Smarthings v2 an v3 and it is exactly the same.
Hello. I removed Smartthings on HA v 0.89 and now I’m on 0.90.2 and try to install Smartthings again and have got this exact problem.
I run HA on Hassio on a Raspberry Pi 3. When I log in to terminal and try to install the removal utility it only runs Python 2,7 and the aiohttp fails to install. Can I install like Raspbian on another SD-card and run the Removal utility on that without having Home Assistant installed? Can I get this removal utility to run on HassIO? Can I manually write some commands and remove the orphaned apps? I’m new to Linux but experienced in computers in general and can’t fix this. PLEASE guide me.
I got it! Installed Python on my windows computer. Went into command prompt and into the python scripts folder. Executed “pip install hass_smartthings_remove” Package installed successfully. I then used hass_smartthings_remove most_recent_smartthings_token but got 401 Unauthorized. I then opened Chrome, logged in to account.smartthings.com and executed the hass_smartthings_remove again and it worked! I could then run the integration again and it worked.
Awesome, the utility fixed everything after upgrading to 0.90.
Getting this error message
No matching distribution found for aiohttp==3.5.4
What to do?
EDIT: Ran it on Windows. Works great.
Running the utility on Windows and getting the No matching distribution for aiohttp==3.5.4. Any thoughts?
Edit: JK, had an older version of python as default, using the latest resolved.
never mind I solved it… : )