home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.05k stars 29.71k forks source link

SmartThing devices not being imported into HA when creating integration #119864

Open bcre3306 opened 2 months ago

bcre3306 commented 2 months ago

The problem

I just setup ST integration with HA and it all appears to be working, SSL, web hook, etc and no errors in the logs but no devices are being created in HA. I have two fanimation fans in ST which work fine there but not importing to HA.

What version of Home Assistant Core has the issue?

core-2024.6.3

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

https://www.home-assistant.io/integrations/smartthings/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Synchronizing subscriptions for 0 capabilities under app 'aad93ac3-d3c1-46a8-a0c3-34a525efc62d': set()
2024-06-17 07:40:32.085 DEBUG (MainThread) [homeassistant.components.smartthings.smartapp] Subscriptions for app 'aad93ac3-d3c1-46a8-a0c3-34a525efc62d' are up-to-date

Additional information

No response

home-assistant[bot] commented 2 months ago

smartthings documentation smartthings source

GSzabados commented 2 months ago

Have you set up correctly the token permissions?

bcre3306 commented 2 months ago

I believe I have. I've provided access to all the options and also the ones suggested on the integration page and both appear to work. When I get to the ST page to authorize, it has a drop down and just states "all devices" and it states it works. I can see the integration in ST app on my iPhone but none of the devices show up in HA

GSzabados commented 2 months ago

That 0 capabilities seems quite suspicious to me. I would try to set it up again with a new token. And make sure everything is included as required.

And make sure if you have multiple locations in SmartThings, you include the right location in the token.

bcre3306 commented 2 months ago

I just tried it again. I only have one location setup which is the default "my home". I attached a screenshot of the ST authorization page if that is something of concern also. One last thing I should mention is I am NOT using HA cloud, I'm using my own SSL which when I try the troubleshooting steps on the HA Screenshot 2024-06-21 at 6 57 36 AM page with the curl, it returns what is suggested.

wmdhuntHACS commented 2 months ago

Smartthings not loading token and recognizing homeassistant. Smartthings website still creating tokens but not recognizing new or old tokens when submitted. Says no location in HA found.

bcre3306 commented 2 months ago

Do you think it's something incorrectly configured with the SSL cert?

bcre3306 commented 2 months ago

I don't think that's 100% accurate because when I do the integration it does show "my home" which is in ST as an option to select when creating the integration and it also creates the "My Home" entry but I do see what you're saying in the logs. Just trying to provide as much information as possible here.

GSzabados commented 2 months ago

I think the problem lies somewhere else, your setup is good, that is the integration most likely not reading the information from SmartThings.

If this is not you, then someone else has exactly the same problem:

https://community.home-assistant.io/t/attempts-to-get-fanimation-fan-integrated-into-ha-smartthings-skipping-the-fan-but-imports-everything-else/728591

There is another problem also, that the SmartThings integration is not maintained currently:

https://github.com/home-assistant/core/issues/117364

So, it is quite hard to tell that will anybody fix this, and to be honest, I am not sure fully that it can be fixed. You should try to get the response from the SmartThings API for the Fanimation fans. There are a few devices in SmartThings which are not exposed through the SmartThings API, like the Nest cameras and Doorbells. They are accessible only through the SmartThings app, but not through the API. That is due to Samsung's agreement with Google. It can be that they have a similar agreement for the Fanimation Fans.

Otherwise, someone started to reverse engineer the FanSync protocol:

https://github.com/rotinom/fansync

bcre3306 commented 2 months ago

Just incase someone doesn't see the other post, GSz pointed me to a resolution which I am beyond appreciative of! The solution was adding this:

bcre3306 commented 2 months ago

https://github.com/contemplator1998/smartthings/tree/main