Device status not updated when using the API

It seems like I’m missing something obvious, but when I get the device details from the API I always get stale data.
I’m querying multiple air purifiers using https://api.smartthings.com/v1/devices/$device/status and the data I get at this point is many hours old. It was still reporting the old data even when the devices did scheduled turn off / turn on.

Using the mobile app does give me fresh data though. Is there some event I need to send to refresh it explicitly?

I’ve tried sending

{"commands":[
  {
    "component":"main",
    "capability":"refresh",
    "command":"refresh",
    "arguments":[]
  }
]}

to it, which is accepted, but ignored.

I see the interesting looking section:

      "custom.deviceReportStateConfiguration": {
        "reportStateRealtimePeriod": {
          "value": "disabled",
          "timestamp": "2022-08-28T02:00:37.930Z"
        },
        "reportStateRealtime": {
          "value": {
            "state": "disabled"
          },
          "timestamp": "2022-08-30T00:41:21.867Z"
        },
        "reportStatePeriod": {
          "value": "disabled",
          "timestamp": "2022-08-28T02:00:37.930Z"
        }
      }

Which I guess I’d like to activate, but I don’t see anything in the API that plainly describes how to enable it.

It seems the app turns on the reporting for some values and the device stats includes the execute status as:

      "execute": {
        "data": {
          "value": {
            "payload": {
              "rt": [
                "x.com.samsung.da.realtimenotiforclient"
              ],
              "if": [
                "oic.if.baseline",
                "oic.if.a"
              ],
              "x.com.samsung.da.timeforshortnoti": "10",
              "x.com.samsung.da.longnotisubscription": "false",
              "x.com.samsung.da.periodicnotisubscription": "false"
            }
          },
          "data": {
            "href": "/realtimenotiforclient/vs/0"
          },
          "timestamp": "2022-08-30T00:58:47.962Z"
        }
      },

Which turns on the reportStateRealtime part. But again - there doesn’t seem to be any explicit docs about those settings.

Welcome to the SmartThings Community, @viraptor!

The curious thing about OCF devices is that they work on a Plugin level (ST app) and not on an API level. This means that the status of those capabilities must be explicitly saved in the API by the developer of the device controller. Here’s more info about the communication of this kind of device:

Could you share the brand and model of the airPurifiers that you mentioned, please?