core icon indicating copy to clipboard operation
core copied to clipboard

Smartthings integration

Open wvdb0 opened this issue 1 year ago • 16 comments

The problem

I can see no data from washing machine entities since i added the family hub fridge.

What version of Home Assistant Core has the issue?

core-2024.10.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Smartthings

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

wvdb0 avatar Oct 03 '24 13:10 wvdb0

Smarttings integration has not worked since the last update

home-assistant_smartthings_2024-10-04T05-38-03.010Z.log

fenyfutar avatar Oct 04 '24 07:10 fenyfutar

I am also seeing an issue since upgrading to 2024.10. My smarthings integration stopped working. I deleted the ad-in and tried to re add it in and now says Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble. Im hoping that once it starts working again and i am able to re-ad the integration my entity names will stay the same

rykm48 avatar Oct 04 '24 17:10 rykm48

Same.

Log details (ERROR)


Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: October 3, 2024 at 10:00:36 PM (2 occurrences)
Last logged: 3:05:35 PM

Error setting up entry Home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 129, in async_setup_entry
    token = await api.generate_tokens(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pysmartthings/smartthings.py", line 209, in generate_tokens
    result = await self._service.generate_tokens(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pysmartthings/api.py", line 424, in generate_tokens
    raise APIInvalidGrant(data.get("error_description"))
pysmartthings.errors.APIInvalidGrant: Invalid refresh token: 3d11022d-d548-45aa-90c4-075657713df1 requested by clientId: 5790ad75-02e6-4f38-8213-4a6b065ef376 with grantType: refresh_token, e.cause: no cause

Stephonomon avatar Oct 04 '24 19:10 Stephonomon

i think the problem must be on samsungs side. just updated to 2014.10.1 and checked to see if it fixed it and no but when i go to add smartthings and add my access token it takes me to a web page that doesnt work it says:

Couldn't load webpage

The webpage didn’t respond to the request in time.

※ IAMUSSauseast1_1728073383013_99999-4297403723.999

rykm48 avatar Oct 04 '24 20:10 rykm48

I am on Core 2024.7.4 (upgrading broke my wled bulbs) and I am also getting the "generate token" error.

bwente avatar Oct 05 '24 13:10 bwente

Broken here too as of 2024.10:

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 15:07:26 (3 occurrences)
Last logged: 15:26:08

Error setting up entry Home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 129, in async_setup_entry
    token = await api.generate_tokens(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pysmartthings/smartthings.py", line 209, in generate_tokens
    result = await self._service.generate_tokens(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pysmartthings/api.py", line 424, in generate_tokens
    raise APIInvalidGrant(data.get("error_description"))
pysmartthings.errors.APIInvalidGrant: Invalid refresh token: 5bd6cf50-3266-4662-9f0d-dc441974f26a requested by clientId: f381bbc2-0d11-4f93-970b-f59c1ba5530f with grantType: refresh_token, e.cause: no cause

dsjb72 avatar Oct 05 '24 14:10 dsjb72

I got a similar error, I checked my token is working using smarthings CLI. I deleted the smarthings integration entry, when I try to install it again I'm getting the "SmartThings could not validate the webhook URL. Please ensure the webhook URL is reachable from the internet and try again.", but I'm able to get to it

I using a cloudflare tunnel, I'm not sure if this could be related.

Edit: it seems this turned out ot be a cloudflare issue. I've disabled bot boss mode and the integration is working now. I got to that from this post:

https://community.home-assistant.io/t/webhook-for-smartthings-not-reachable/219057/11

Alvarofg avatar Oct 05 '24 15:10 Alvarofg

this is still an issue for me

rykm48 avatar Oct 06 '24 15:10 rykm48

Coincidentally there was a Samsung Dev conference October 3rd. I wonder if there were changes to api or authorization pushed out? The app still works.

bwente avatar Oct 06 '24 15:10 bwente

i got it working, if you login to your samsung account first and then click to connect HA and smarthings it appears to work

rykm48 avatar Oct 07 '24 16:10 rykm48

Yep fixed here too, same as above (plus I regenerated PAT token too).

dsjb72 avatar Oct 07 '24 17:10 dsjb72

i got it working, if you login to your samsung account first and then click to connect HA and smarthings it appears to work

Could you tell me where to login first? I don't get it tonwork and it feels that I am missing a step.

Thank you

wvdb0 avatar Oct 07 '24 17:10 wvdb0

login to your samsung account at account.samsung.com

rykm48 avatar Oct 07 '24 17:10 rykm48

I went to

https://account.smartthings.com/

and selected the Automations to fix.

image

bwente avatar Oct 07 '24 21:10 bwente

Worked for me.

On Mon, Oct 7, 2024 at 5:06 PM bwente @.***> wrote:

I went to

https://account.smartthings.com/

and selected the Automations to fix. image.png (view on web) https://github.com/user-attachments/assets/9f931f5c-8580-4804-9ac8-efa753cbab73

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/127449#issuecomment-2397895985, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACK736PGNAMB5SMJXHM2PDTZ2LZWHAVCNFSM6AAAAABPJ23HY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJXHA4TKOJYGU . You are receiving this because you commented.Message ID: @.***>

Stephonomon avatar Oct 07 '24 21:10 Stephonomon

As @bwente mentioned, I was able to gain access again by logging into https://account.smartthings.com/

When I logged in, I had to agree to updated terms and conditions. That could have been part of it. I also went to the Automations tab and it said it fixed something after I clicked "Allow" on that screen.

image

After doing the above steps, go back into Home Assistant, go to the Integrations page, click on Smartthings. Then click the three dots and choose to Reload the integration.

webcompanion avatar Oct 09 '24 07:10 webcompanion

Seems to be solved for me too

wvdb0 avatar Oct 09 '24 07:10 wvdb0