SmartTag on API?

Hey guys.

I just received a SmartTag and tested it with SmartThings App, quite fun on my cat :smile:

I then questioned the API. I can see the Smarttag as a devices. (
As other devices I have (washer, Harmony Hub…), I questioned device status on the API (“GET https://api.smartthings.com/v1/devices/my_device_id/status”)
But there is nothing, all values are null. So no information to get.
I even tried sending POST request like “alarm” or “volume”. Commands are accepted, but nothing helps.

Is the SmartTag really reachable through the API?

json status
{
"components": {
    "main": {
        "tag.e2eEncryption": {
            "encryption": {
                "value": null
            }
        },
        "audioVolume": {
            "volume": {
                "value": null
            }
        },
        "tag.searchingStatus": {
            "searchingStatus": {
                "value": null
            }
        },
        "tag.tagStatus": {
            "connectedUserId": {
                "value": null
            },
            "tagStatus": {
                "value": null
            },
            "connectedDeviceId": {
                "value": null
            }
        },
        "geofence": {
            "enableState": {
                "value": null
            },
            "geofence": {
                "value": null
            },
            "name": {
                "value": null
            }
        },
        "alarm": {
            "alarm": {
                "value": null
            }
        },
        "tag.updatedInfo": {
            "connection": {
                "value": null
            }
        },
        "tag.tagButton": {
            "tagButton": {
                "value": null
            }
        },
        "tag.factoryReset": {},
        "battery": {
            "battery": {
                "value": null
            }
        },
        "geolocation": {
            "method": {
                "value": null
            },
            "heading": {
                "value": null
            },
            "latitude": {
                "value": null
            },
            "accuracy": {
                "value": null
            },
            "altitudeAccuracy": {
                "value": null
            },
            "speed": {
                "value": null
            },
            "longitude": {
                "value": null
            },
            "lastUpdateTime": {
                "value": null
            }
        }
    }
}

}

2 Likes

So I’ve been digging a little and discovered that the API https://api.smartthings.com/v1/devices/my_device_id/status doesn’t communicate entirely device information. Maybe I don’t really understand the way it is supposed to communicate in the first place.
But the API https://api.smartthings.com/v1/devices/my_device_id seems to give some informations in the metadata field:

api / devices
{
"deviceId" : "$myDeviceId",
"name" : "Tag(BLE)",
"label" : "SmartTag",
"manufacturerName" : "Samsung Electronics",
"presentationId" : "IM-SmartTag-BLE",
"deviceManufacturerCode" : "Samsung Electronics",
"locationId" : "$myLocationId",
"ownerId" : "$myOwnerId",
"roomId" : "$myRoomId",
"components" : [
{
"id" : "main",
"capabilities" : [
{
"id" : "alarm",
"version" : 1
},
{
"id" : "tag.tagButton",
"version" : 1
},
{
"id" : "audioVolume",
"version" : 1
},
{
"id" : "battery",
"version" : 1
},
{
"id" : "tag.factoryReset",
"version" : 1
},
{
"id" : "tag.e2eEncryption",
"version" : 1
},
{
"id" : "tag.tagStatus",
"version" : 1
},
{
"id" : "geolocation",
"version" : 1
},
{
"id" : "geofence",
"version" : 1
},
{
"id" : "tag.updatedInfo",
"version" : 1
},
{
"id" : "tag.searchingStatus",
"version" : 1
}
],
"categories" : [
{
"name" : "BluetoothTracker",
"categoryType" : "manufacturer"
}
]
}
],
"createTime" : "2021-05-12T15:42:43.765Z",
"bleD2D" : {
"encryptionKey" : "12345",
"cipher" : "AES_128-CBC-PKCS7Padding",
"identifier" : "12345",
"configurationVersion" : "2.0",
"configurationUrl" : "https://apis.samsungiotcloud.com/v1/miniature/profile/c02e8c67-605d-44fc-89c6-2b7026b30b59",
"metadata" : {
"regionCode" : 11,
"privacyIdPoolSize" : 1000,
"privacyIdSeed" : "12345",
"privacyIdInitialVector" : "12345",
"numAllowableConnections" : 2,
"firmware" : {
"version" : "01.01.26",
"updateTime" : 1622982468000
},
"currentServerTime" : 1623057633,
"searchingStatus" : "stop",
"lastKnownConnection" : {
"updated" : 1623044072,
"connectedUser" : {
"id" : "myid",
"name" : "myname"
},
"connectedDevice" : {
"id" : "device",
"name" : "Galaxy Note8"
},
"d2dStatus":"bleScanned",
"nearby" : false,
"onDemand" : false
},
"lostMessage" : {
"enabled" : false,
"type" : "PREDEFINED"
},
"e2eEncryption" : {
"enabled" : false
},
"geolocationStorage" : {
"recentDataOnly" : true
},
"timer" : 1623042919,
"category" : {
"id" : 110
},
"remoteRing" : {
"enabled" : true,
"targetId" : "IMEI:myimei",
"targetName" : "Galaxy Note8"
},
"onboardedBy" : {
"saGuid" : "myguid"
},
"createTime" : 1620834164,
"updateTime" : 1623057023,
"iBeacon" : {
"uuid" : "uuid",
"majorMinorId" : "majorminorid"
}
}
},
"type" : "BLE_D2D",
"restrictionTier" : 0
}
  • searchingStatus:
"searchingStatus" : "stop",

This seams to be matching the capability tag.searchingStatus->searchingStatus from the API /device/status:

  • connectedUserId and connectedDeviceId:

“connectedUser” : {
“id” : “myid”,
“name” : “myname”
},
“connectedDevice” : {
“id” : “device”,
“name” : “Galaxy Note8”
},

This seems to match the capability tag.tagStatus->connectedUserId and connectedDeviceId from the API /device/status:

  • connection:

“connectedDevice” : {
“id” : “device”,
“name” : “Galaxy Note8”
},
“d2dStatus”:“bleScanned”,
“nearby” : false,
“onDemand” : false
},

d2dStatus seems to indicate wether the tag is found or in search. gattConnected=connected to device, bleScanned=in search (capabilities tag.tagStatus are a bit different)
“nearby”& “onDemand” : if the tag is near and reachable from the phone.
Related to the following capability ?

  • e2eEncryption:

“e2eEncryption” : {
“enabled” : false
},

The same ?

  • category:
"category" : {
"id" : 110
},

I found that this is the category chosen in the App (110 = others, 100= key, 101=cat, 102=dog, 103=bagpack… 123=sportwear)

  • remoteRing:

“remoteRing” : {
“enabled” : true,
“targetId” : “IMEI:myimei”,
“targetName” : “Galaxy Note8”
},

This seems to indicate whether this option is active or not : “let the tag ring/localize the phone”

So the SmartTag is clearly communicating on API Level, but is the definitive way? And what happened to sending command like ‘alarm/siren’ to ring the tag? Tried every way possible, not working on API /command
No battery level, like the app shows it?

One command seems to work : main->tag.updatedInfo->update
After sending this one, the API device indicates information about searching the Tag:

“connectedDevice” : {
“id” : “device”,
“name” : “Galaxy Note8”
},
“d2dStatus”:“bleScanned”, => “gattConnected”
“nearby” : false,
“onDemand” : false
},

Feel free to share information/advice on SmartTag :slight_smile:

2 Likes

Same here.

Looks like Smarttag API got updated.
New informations are available:

“shareable” : {
“enabled” : false
},
“battery” : {
“level” : “FULL”,
“updated” : 1624980489
},
“agingCounter” : {
“status” : “VALID”,
“updated” : 1628372886
},
“vendor” : {
“mnId” : “0AFD”,
“setupId” : “432”
},

Tried apis with my tag.
Seems that tag have “geolocation” component, but all requests fails with 403 (https://api.smartthings.com/v1/devices/<dev_id>/components/geolocation/status)

Is it same for anyone else?
That’s really sad, i guess the ony way to know tag position is to use pre-defined “locations”

So if you wanted to use SmartTag as a simple tracker - you cant do it with current api.

Hi, correct URL is https://api.smartthings.com/v1/devices/{deviceID}/components/main/capabilities/geolocation/status
But this does not return any usefull information

Thank you for sharing. Indeed it returns NULL on the location and battery info:

[“battery”]=>
array(1) {
[“battery”]=>
array(1) {
[“value”]=>
NULL
}
}
[“geolocation”]=>
array(8) {
[“method”]=>
array(1) {
[“value”]=>
NULL
}
[“heading”]=>
array(1) {
[“value”]=>
NULL
}
[“latitude”]=>
array(1) {
[“value”]=>
NULL
}
[“accuracy”]=>
array(1) {
[“value”]=>
NULL
}
[“altitudeAccuracy”]=>
array(1) {
[“value”]=>
NULL
}
[“speed”]=>
array(1) {
[“value”]=>
NULL
}
[“longitude”]=>
array(1) {
[“value”]=>
NULL
}
[“lastUpdateTime”]=>
array(1) {
[“value”]=>
NULL
}
}

I found this post, location variables may not be disponible yet on API.

Hello all, any update in this feature?

Hi, any news about it? I would like to retrieve the geolocation info through the API as well. Thanks.

1 Like

Any update on this feature?

2 Likes

There is no update related with. I believe due to sensitive privacy in some countries.

By the way, there is an update. The smarttag is visible now on “Find my mobile”
https://findmymobile.samsung.com

1 Like

Hi, I have the same issue (the access to Smarttag via node red nodes (Samsung Automation Studio Nodes) does not work (all Attivbutes null, because the node work via API.

So It would be nice, if this will be working … so smarttag+ will be really useful for me.

1 Like

Please consider adding this. It would be a remarkable feature for home automation.

1 Like

I will through away myTags and by other “Tags” (not from SAMSUNG)

New Samsung SmartTag2 also has the same limitation.
Information about location, alarms / button or battery are not visible in Samsung SmartThings cloud, nor thorugh web nor through API, all values are null…

I am very disappointed in Samsung SmartTag2 because of this limitation.

1 Like

I’m also wondering if there is any way to get location data from a Samsung Smart Tag outside of the SmartThing Find app. It seems incredible that this would not be possible.

1 Like

i totally agree, its should be available via API, without it, it quite useless.

2 Likes

Wow, very disappointed to see the lack of support of the smarttags in the API. First I thought it was a Home Assistant issue, but it’s just a Samsung issue. Maybe I should return my tags, very disappointed!

4 Likes

I bought these smartags with the assumption i’d be able to integrate these tags in Home Assistant routines through the SmartThings, alas the only way to interact with the tags is through the app.

I definately won’t be getting more tags with this fiarly blatant omission in place… but i have little hope this will changed after all these years.

There’s really no reason we shouldn’t be able to query location data and such through API.
Even just abstractions like home and away would be somewhat helpful for things like automations but as it stands these tags are very much only usefull within Samsung’s walled garden.

2 Likes

Last time I had a play with them I found the button press had at last been exposed to the Rules API so that was something. I never tried it via SmartApps and I haven’t tried it lately to confirm it wasn’t just a glitch.

I still don’t get why the best available information on the location of a tag can be presented on a map, but the same information isn’t available in other forms.