HA Dashboard Not Updating Third Party Devices

I’ve noticed lately that HA is not updating device status(on/off) only when I change that devices status with google or alexa or smartthings.

In the image below I’ve turned on my 3 lights in the garage using the Smartthings app, however HA doesn’t update device state. Am I missing a setting somewhere? Thanks.

System Health

version: core-2021.11.5
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.75
arch: x86_64
timezone: America/Indiana/Indianapolis


GitHub API: ok
Github API Calls Remaining: 5000
Installed Version: 1.18.0
Stage: running
Available Repositories: 974
Installed Repositories: 2


logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok


host_os: Home Assistant OS 6.6
update_channel: stable
supervisor_version: supervisor-2021.10.8
docker_version: 20.10.8
disk_total: 30.8 GB
disk_used: 8.9 GB
healthy: true
supported: true
board: ova
supervisor_api: ok
version_api: ok
installed_addons: CEC Scanner (3.0), ESPHome (2021.11.4), Home Panel (2.3.0), Plex Media Server (2.6.3), File editor (5.3.3), SSH & Web Terminal (9.1.1), Z-Wave JS (0.1.49), Duck DNS (1.14.0), Dnsmasq (1.4.4), Home Assistant Google Drive Backup (0.105.2)


dashboards: 2
resources: 0
views: 3
mode: storage


api_endpoint_reachable: ok

Home Assistant will update the states as soon as it has them, but there’s nothing HA can do if SmartThings isn’t communicating the updated states. Just another downside of cloud integrations.

image

If I disable/reable the device in Entities, HA then shows the correct state. Could this mean HA already has everything it needs to determine device state? I don’t know.

Probably not. That most likely just forces HA and SmartThings to resync.

Wonder why HA and ST don’t resync, device state seems like a critical home automation piece.

See my first reply. Use something more reliable than cloud pushing/polling if you’re dealing with critical pieces. Lots of cloud-free devices out there, especially plugs, which it looks like is what you’re dealing with.

Are you suggesting not going with Smartthings or changing the way Smartthings pushes?

From that link I included in my first post, the most reliable is at the bottom, least at the top. What I am trying to say is, if you want reliability, use local push devices. HA can only do the best with what it’s got.

As you’ve discovered, relying on third-party ecosystems and cloud services is not really what one would call reliable. If you can configure an update interval or something on the service’s end, awesome, but that will do nothing if the service goes down or HA can’t communicate with the service for whatever reason.

It looks like you already have some ESPHome devices setup, so I’m guessing you’re aware of the alternatives and get my point.

Thank you. I will consider moving my devices over to Home Assistant.

1 Like

Looked into this more. This was an issue with my external_url in my configuration.yaml file. It needed to be my Home Assistant base external facing url. I’m not using nabu casa, i’m using the duckdns route for free remote access.

Example:
homeassistant:
external_url: https://xxxxxxxxx.duckdns.org:8123/
internal_url: https://homeassistant.local:8123

  1. I had to delete my Smartthings integration in HA and a config/.storage/smartthings file(it’s hidden by default but if you go to the supervisor>fileeditor>configuration tab and delete the “-.storage” entry, then it will be visible)
  2. Delete Smartthings token on the Smartthings site and re-add a new one.
  3. Add Smartthings integration once again, confirm your “Callback URL” is your external_url(configured above) + /api/webhook/ + webhook id(automatically generated when you add the smartthings integration)should be something like:
https://xxxxxxxxxxx.duckdns.org:8123/api/webhook/efsdfsdfdsfdsf69530631cea98251dsfsdfsdfsdfsdfsdfsdfcba5aa9c32d09071f5b68

or for nabu casa

https://hooks.nabu.casa/efsdfsdfdsfdsf695306731cea98251dsfsdfsdfsdfsdfsdfsdfcba5aa9c32d09071f5b68

After this, Smartthings devices in Home Assistant are updating.

Hi, where do you add your callback URL? Is it the same thing as cloudhook URL in /config/.storage/smartthings?

It’s in configuration.yaml.

Here’s mine…

homeassistant:
    external_url: https://xxxx.duckdns.org:8123/
    internal_url: https://homeassistant.local:8123

If I recall correctly, the callback url gets created automatically. During Smartthings setup I saw a url that looked like my external_url + webhook_id.

Let me know if you need more help with it. I could retrace my steps a little more. It can be frustrating.
Sorry for the late response, haven’t checked in lately.