core icon indicating copy to clipboard operation
core copied to clipboard

SmartThing non working afert update Core and SO

Open Freitag29 opened this issue 1 year ago • 2 comments

The problem

Hi, afert update CORE and SO of HA SmartThing was stop working. Afeter remove the integration when i try to reinstall, recive the error: " Impossibile caricare il flusso di configurazione: 500 Internal Server Error Server got itself in trouble " Can enyone help me?

What version of Home Assistant Core has the issue?

2024.4.3

What was the last working version of Home Assistant Core?

2024.4.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SmartThing

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

Freitag29 avatar Apr 18 '24 07:04 Freitag29

Hey there @andrewsayre, mind taking a look at this issue as it has been labeled with an integration (smartthings) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of smartthings 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 smartthings Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


smartthings documentation smartthings source (message by IssueLinks)

home-assistant[bot] avatar Apr 25 '24 19:04 home-assistant[bot]

The problem

Hi, afert update CORE and SO of HA SmartThing was stop working. Afeter remove the integration when i try to reinstall, recive the error: " Impossibile caricare il flusso di configurazione: 500 Internal Server Error Server got itself in trouble " Can enyone help me?

What version of Home Assistant Core has the issue?

2024.4.3

What was the last working version of Home Assistant Core?

2024.4.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

SmartThing

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

Hey, had the same problem. I created a new smartthings token and mine works. Maybe it helps you too.

cast-hdmu avatar Apr 27 '24 14:04 cast-hdmu

Hey there @andrewsayre, mind taking a look at this issue as it has been labeled with an integration (smartthings) you are listed as a code owner for? Thanks!

I've try but it is not working

Freitag29 avatar Apr 29 '24 09:04 Freitag29

Hey there @andrewsayre, mind taking a look at this issue as it has been labeled with an integration (smartthings) you are listed as a code owner for? Thanks!

Code owner commands Code owners of smartthings 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 smartthings Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)

smartthings documentation smartthings source (message by IssueLinks)

sorry but i don't understand what you talk

Freitag29 avatar Apr 29 '24 09:04 Freitag29

I'm having the same issue since a few weeks. Likely also after the last update. This is my log entry:

2024-06-09 20:20:11.320 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry My home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 134, 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: <refresh_token> requested by clientId: <client_id> with grantType: refresh_token, e.cause: no cause

I have tried manually creating a new token and copy-pasting it to my core.config_entries file, but this also fails.

Update: I removed the configuration and re-added. Now it works again.

DrBlokmeister avatar Jun 09 '24 18:06 DrBlokmeister

Great!!! But i dont know haw i do for remove the configuration. I've removed the integration but when i try tu reinstall i recevid the error

I'm having the same issue since a few weeks. Likely also after the last update. This is my log entry:

2024-06-09 20:20:11.320 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry My home for smartthings
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 134, 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: <refresh_token> requested by clientId: <client_id> with grantType: refresh_token, e.cause: no cause

I have tried manually creating a new token and copy-pasting it to my core.config_entries file, but this also fails.

Update: I removed the configuration and re-added. Now it works again.

Freitag29 avatar Jul 04 '24 09:07 Freitag29