Giter Club home page Giter Club logo

hass-smartthings-remove's People

Contributors

andrewsayre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hass-smartthings-remove's Issues

Does not work on removing rogue Home Assistant Smart Apps

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/bin/hass_smartthings_remove", line 11, in <module> sys.exit(main()) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hass_smartthings_remove/remove.py", line 16, in main loop.run_until_complete(remove_apps(args.token)) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/hass_smartthings_remove/remove.py", line 25, in remove_apps apps = await api.apps() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 89, in apps resp = await self._service.get_apps(params) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysmartthings/api.py", line 156, in get_apps return await self.get_items(API_APPS, params=params) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysmartthings/api.py", line 375, in get_items 'get', self._api_base + resource, params, None) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pysmartthings/api.py", line 350, in request headers={"Authorization": "Bearer " + self._token}) as resp: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/client.py", line 1005, in __aenter__ self._resp = await self._coro File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/client.py", line 476, in _request timeout=real_timeout File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/connector.py", line 522, in connect proto = await self._create_connection(req, traces, timeout) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/connector.py", line 854, in _create_connection req, traces, timeout) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/connector.py", line 992, in _create_direct_connection raise last_exc File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/connector.py", line 974, in _create_direct_connection req=req, client_error=client_error) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/aiohttp/connector.py", line 927, in _wrap_create_connection req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host api.smartthings.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')]

I get that error with a newly generated API token.

newbie help

Hey,
im not sure where to even start?
where do i run this PIP command from sorry?

im running Hassio on a RPI4 and need to clean up 3 HA "apps" which all show up in ST

Error trying to remove smartthings integration from Hass 2022.7.5

I'm relatively new to this ... I'm trying to remove a broken Smartthings integration from HASS. Python 22.1.2 is installed. When I execute the removal tool, the program runs but always aborts with an error. Below is the what happens - see Lines 20 onward, the error occurring on line 23 (I numbered the lines to make this easier to discuss). Line 34 says to modify PIP to run the shown command, which I did. But that didn't help. Can you help me get past this?

  1. PS C:> py -m pip install E:\Data\OneDrive\Desktop\hass_smartthings_remove-1.0.1-py3-none-any.whl
  2. Processing e:\data\onedrive\desktop\hass_smartthings_remove-1.0.1-py3-none-any.whl
  3. Collecting pysmartthings==0.6.3
  4. Using cached pysmartthings-0.6.3-py3-none-any.whl (43 kB)
  5. Collecting aiohttp==3.5.4
  6. Using cached aiohttp-3.5.4.tar.gz (1.1 MB)
  7. Installing build dependencies ... done
  8. Getting requirements to build wheel ... done
  9. Preparing metadata (pyproject.toml) ... done
  10. Collecting yarl<2.0,>=1.0
  11. Using cached yarl-1.7.2-cp310-cp310-win_amd64.whl (122 kB)
  12. Collecting chardet<4.0,>=2.0
  13. Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
  14.  ---------------------------------------- 133.4/133.4 kB 7.7 MB/s eta 0:00:00
    
  15. Collecting async-timeout<4.0,>=3.0
  16. Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
  17. Collecting attrs>=17.3.0
  18. Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB)
  19.  ---------------------------------------- 60.6/60.6 kB ? eta 0:00:00
    
  20. Collecting multidict<5.0,>=4.0
  21. Using cached multidict-4.7.6.tar.gz (50 kB)
  22. Installing build dependencies ... error
  23. error: subprocess-exited-with-error
  24. × pip subprocess to install build dependencies did not run successfully.
  25. │ exit code: 1
  26. ╰─> [8 lines of output]
  27.   Collecting pip>=18
    
  28.     Using cached pip-22.1.2-py3-none-any.whl (2.1 MB)
    
  29.   Collecting setuptools>=40
    
  30.     Using cached setuptools-63.2.0-py3-none-any.whl (1.2 MB)
    
  31.   Collecting wheel
    
  32.     Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
    
  33.   ERROR: To modify pip, please run the following command:
    
  34.   C:\Users\Larry\AppData\Local\Programs\Python\Python310\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\Larry\AppData\Local\Temp\pip-build-env-prkyyvxx\overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- pip>=18 setuptools>=40 wheel
    
  35.   [end of output]
    
  36. note: This error originates from a subprocess, and is likely not a problem with pip.
  37. error: subprocess-exited-with-error
  38. × pip subprocess to install build dependencies did not run successfully.
  39. │ exit code: 1
  40. ╰─> See above for output.
  41. note: This error originates from a subprocess, and is likely not a problem with pip.

403 Forbidden Error After Removal & Reinstall

Hi. First I will say I am thankful for the work you have put into this. Im just realizing how dependent I am on this integration.

I too had the SmartThings app stuck and unable to remove. I followed your steps (both on Ubuntu & Win10 - Each with different issues).

Ultimately, I ended up using thew API to remove the instances. When I went back to install, everything seemed to work fine but the entities never showed. When I looked at the logs this is the error I received:
Unable to setup config entry 'Home' - please reconfigure the integration
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='https://api.smartthings.com/v1/installedapps/04f653bc-0d6d-4dac-81ee-849f342b90fa

Full log:
Unable to setup config entry 'Home' - please reconfigure the integration Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 100, in async_setup_entry api, entry.data[CONF_INSTALLED_APP_ID] File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 77, in validate_installed_app installed_app = await api.installed_app(installed_app_id) File "/usr/local/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 151, in installed_app entity = await self._service.get_installed_app(installed_app_id) File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 246, in get_installed_app API_INSTALLEDAPP.format(installed_app_id=installed_app_id)) File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 370, in get return await self.request('get', self._api_base + resource, params) File "/usr/local/lib/python3.7/site-packages/pysmartthings/api.py", line 366, in request resp.raise_for_status() File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 946, in raise_for_status headers=self.headers) aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='https://api.smartthings.com/v1/installedapps/04f653bc-0d6d-4dac-81ee-849f342b90fa

I hope I am posting in the correct place.

Any help is greatly appreciated. Thanks Again!

No idea what the API Token is

Hello tiny little issue here.
Due to the problems I had getting Smartthings to rework with Hassio 0.89 I thought I would try a new Smartthings API token. However I didn't save the old one. Now I cannot remove the SmartApp from the Smartthings Classic App and I still cannot get the intergration to work between SmartThings and Hassio.

Any suggestion please?

Thank you.

The SmartThings Smart App cannot be removed from SmartThings Classic

Background History

I were using mosquitto and SmartThings Bridge plugin so far without any issue. Then, I have updated my Hass.io and wanted to test this plugin. I have configured it with no much troubles. It wasn't easy to understand the new nomenclature and how to show the sensors, but finally it worked.
After a few days, 2 of my sensors stopped reporting data to Hass.IO but they continue reporting correctly to the SmartThings Classic app. When that issue started I have tried everything to fix it and nothing worked. Then I have decided to remove the integration, then I removed the token I have used to connect HA to my Smart App on SmartThings Classic.
I created a new token, I started the integration process again form HA, but when I submitted the token it says: "Please install the Home Assistant SmartApp in at least one location and click submit" - Of course I have the SmartApp installed but I cannot uninstall it from the SmartThings Classic App anymore because it popups with an error when trying to get access to it.

Finally, I have tried to create a new token and when I do that, I can enter into the Home Assistant SmartApp but, it is trying to Authorize the SmartThings App instead the SmartThings Classic app (I don't know if this is or not related to) By then, when you try to submit with the new token, HA says: "Please ensure you have installed and authorized the Home Assistant SmartApp and try again." - It means that the Classic app is not being authorized.

IMG_0512

Home_Assistant

Image-1

Image-1__1__jpg

Can't get the app to run

Hi

I am attempting to run this but I keep getting tracebacks. I am running HA in the Python Virtual Environment.

Here is the error:
Traceback (most recent call last):
File "./hass_smartthings_remove", line 10, in
sys.exit(main())
File "/home/pi/.local/lib/python3.7/site-packages/hass_smartthings_remove/remove.py", line 16, in main
loop.run_until_complete(remove_apps(args.token))
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/pi/.local/lib/python3.7/site-packages/hass_smartthings_remove/remove.py", line 25, in remove_apps
apps = await api.apps()
File "/home/pi/.local/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 89, in apps
resp = await self._service.get_apps(params)
File "/home/pi/.local/lib/python3.7/site-packages/pysmartthings/api.py", line 156, in get_apps
return await self.get_items(API_APPS, params=params)
File "/home/pi/.local/lib/python3.7/site-packages/pysmartthings/api.py", line 375, in get_items
'get', self._api_base + resource, params, None)
File "/home/pi/.local/lib/python3.7/site-packages/pysmartthings/api.py", line 366, in request
resp.raise_for_status()
File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 942, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized'

Error on install

This is what I get when I try to install this. Ubuntu 18 server.

Collecting hass-smartthings-remove
Downloading https://files.pythonhosted.org/packages/e3/8f/ec2681793b4c288a1937e5db45891b699cd2f119f02866c3ae43d78f1299/hass_smartthings_remove-1.0.1.tar.gz
Collecting aiohttp==3.5.4 (from hass-smartthings-remove)
Could not find a version that satisfies the requirement aiohttp==3.5.4 (from hass-smartthings-remove) (from versions: 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4, 0.19.0, 0.20.0, 0.20.1, 0.20.2, 0.21.0, 0.21.1, 0.21.2, 0.21.4, 0.21.5, 0.21.6, 0.22.0a0, 0.22.0b0, 0.22.0b1, 0.22.0b2, 0.22.0b3, 0.22.0b4, 0.22.0b5, 0.22.0b6, 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.22.4, 0.22.5, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 2.0.0rc1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6.post1, 2.0.7, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.3.0a4, 2.3.0, 2.3.1, 2.3.2b2)
No matching distribution found for aiohttp==3.5.4 (from hass-smartthings-remove)

Question on orphaned devices

If I remove a device from Smartthings this fails to sync with HA and I end up with an orphaned entry in my HA config, will this app remove those entries?

How to do manual install

Can this utility be installed and used in a non-Supervised HA instance?
I'm running HA in a Docker container - so no Supervised, no HAOS (HASS).

Unable to run the script

Hi, I am writing as a newbie with running this code. I am getting syntax errors, so will need your help to see if i am even doing it correctly. Thank you so much! (I changed the token number to a dummy one in this screenshot, but the error is the same even if I used the real one)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.