Lock connected with Plug, When plug goes offline; Lock is not showing offline immediately

I’ve connected my Lock with a Plug
I’ll be switching off the Plug then its status will be shown as OFFLINE by health API
Lock status should also OFFLINE but it is still shown as ONLINE by this API.
After CheckInterval duration is completed its status is turned to OFFLINE.

At this point when plug is turned on; plug turns ONLINE
Lock is showing ONLINE immediately using Refresh and then checking with Health API.

Why Lock is not shown as OFFLINE immediatly?

Welcome to the SmartThings Community, @vishal_g!

Can you provide more details about your use case, please?

  • Are you using a Groovy DTH to integrate those devices or these actions are done through a Groovy SmartApp?
  • Which Health API are you using to change the device health?
  1. We are using SmartThings APIs from Postman.
  2. https://api.smartthings.com/v1/devices/{deviceId}/health
  • Is there any chance to change checkInterval, we are using hub devices

  • Response is accepted, when device is offline and passing the command lock/unlock via the api. Which is not correct. SmartThings App is not accepting this kind of req.

The checkInterval is only used in Groovy-based handlers. Which are part of the Legacy platform, so I suggest you don’t rely too much on that.

Also, I’ve seen the health endpoint is used as read-only. When the API returns an “accepted” response, it doesn’t mean the command is executed correctly.

In the new way of integrating Hub-Connected devices (Edge drivers), Health Check is controlled by the Hub automatically. The healthCheck capability (to which checkInterval belongs) is not used anymore.
Something I don’t quite understand is why the lock is connected to a plug, does that mean that the lock isn’t a smart device?

Open this section for other useful information as a reference:
  1. Edge drivers will replace the Groovy DTH, they don’t have a “graphic” environment so far, you can get the device information by making requests to the API or using the CLI.
  2. The health check in Edge depends on the reports made by the device. For example, some Z-Wave devices specifically have the “sleepy device” configuration and stop reporting their status which will make them offline.
    a. It cannot be modified. Only the LAN devices (that are also Hub-connected) allow more control over the health status because the connection is different (but not through the healthCheck capability)
  3. A great place to start is checking the official drivers released by SmartThings:

No, that’s for devices created using a SmartApp which cannot be used for Hub-Connected devices. To change the value of an attribute, you can use “execute a command”.
It will depend on the commands available for each capability. And, you can also create custom ones to define your own values for internal use for example.

1 Like
  1. Can you provide details for current platform that should be used? I want to have checkInterval below 10 mins.

  2. Lock is connected with plug only to check online/offline status. It is actually connected via z-wave to smartthings hub.

Just as a reference to others, the question in 1 was answered in the post above:

We want to connect our app through oauth, could you please let us know how this can be done

Currently, new access to the OAuth integration isn’t available as the team is working on improvements to this tool to provide a better developer and user experience.
However, you can contact the Partners team to see if they would be interested in a partnership with your company, to do so, you need to:

  1. Go to the SmartThings > partners page (Partners | SmartThings)
  2. Click on “Become a partner”