Add Samsung Smart Tag support to SmartThings integration

Welcome to the forum @ygutierrez!
The workaround by @91JJ linked in this thread works like a charm for me, perhaps you could try that one?

SmartThings Labs doesn’t seem to be available outside of the US and South-Korea… Well not in France anyway. The button "Labs"is not present in my app.

So while Samsung does’nt fix its API to support SmartTags it won’t work

Labs and virtual switches are available in the UK, at least, and I can confirm that if you are able to create a virtual switch, doing so works well enough (there’s sometimes just a bit of a delay due to the cloud integration).

I was looking through the SmartThings CLI a little and the smart tags seem to be kinda? supported. It might be worth having another look at that… (In Germany btw)

Hi,
I found how to control stuff in H.A with my SmartTag button, without need of the lab (that’s not available in France).

how to achieve it ?
a) Go on the SmartThings web interface (http://ide.smartthings.com/), and create in the Devices section a new virtual switch, see how to here : How to Create a Virtual Switch in SmartThings (With Images) | Smart Device Life

b) Once you create your virtual button in SmartThings, you should see it in your devices lists

c) Go in the SmartThings app on your phone, and edit your SmartTag settings, you’ll then be able to map the button press/long press to this Virtual switch.
On my side I’ll use them to control my Alarm, with a short press to switch off, and a long press to switch on.

d) Go back in H.A, and reload your SmartThings integration, you should now see your new virtual switch. When you click your SmartTag, you’ll see the virtual button changing state in H.A.

e) Create an automation in H.A… if SmartTag is enabled, then… do the magic :sweat_smile:

10 Likes

Brilliant, works like a charm…

1 Like

Now if only we can use this as an iBeacon with the new BT stuff in HA

2 Likes

it would be awesome, but without a proper integration, it seems out of range :sweat_smile:

Hi Nil,
I’m curious on how you achieved this last part, did you find a way to get the SmartTag position in H.A ?
I would also like to ensure the tag button can only be used nearby my flat.

Is there any progress in integrating smart tag location to home assistant?

3 Likes

I’m also hoping for full integration for our SmartTag+s.

4 Likes

Any update?

I have new Samsung SmartTag2 released previous month. It is normally added to SmartThings app on a Samsung phone and visible on Samsung SmartThings web. Using this SmartThings addon it is visible in Home Assistant as one device with entities of battery, alarm. However all is state unkonwn and no location info, nor battery.

I have chacked Samsung SmartThings web interface and there is no information there also.
As per Samsung community post above , it is Samsung limitation not providing this information in their system and therefore it can not be pulled to Home Assistant.

Now I am very disapointed with Samsung SmartTag devices because of this.
But this needs to be addressed inside Samsung first, and then in HA integration.

Or any other workarounds for pulling location information would help.

3 Likes

Oh this sucks. So basically the only function for the smart tag is when observed in SmartThings app on the map. Such a shame that it can’t be integrated into automations in Smartthings where it could trigger a virtual switch and then into homeassistant.

I thought at least I could use the alert when not in a safe place option the smart tag has and then use something like autonotification in tasker to intercept the notification on my phone/tablet to then change the status of a home assistant switch… But even that notification seems buggy and it would only be when I left…

I wish I read this before I ordered 4x tags… Makes them not overly useful without a geofence based automation. I see apples airtag is in a similar boat with geofence…

Really surprised if this limitation…

It’s even more limited than people think. Outside of this integration discussion, the most annoying thing with these tags is that they don’t work / are useless if your phone doesn’t have a data connection. So imagine you are abroad without connection in an airport and want to locate your tag, you think “this is Bluetooth so it’ll work”. We’ll no, it doesn’t. A’d wifi won’t help either.

I think he is talking about his phone location. Samsung already stated that they will not share the smarttag location via api, due to privacy concerns (not really sure how their own app does not have these concerns)

Since they now show the tags on the https://smartthingsfind.samsung.com website, we can reverse engeneering the api.

What i got so far is:

Get the device ids of all tags with this request:
https://smartthingsfind.samsung.com/device/getDeviceList.do?_csrf=xxx
Body: {}
Cookie: JSESSIONID=xxx

Get tag Info with:
https://smartthingsfind.samsung.com/device/setLastSelect.do?_csrf=xxx
Body: {“dvceId”:“xxx”,“removeDevice”:}
(“dvceId” is in the getDeviceList)
Cookie: JSESSIONID=xxx
that they respond with coordinates and a range of uncertainty around it (better then the app), battery status, and some stuff I don’t understand.

You can even ring the Tag with:
https://smartthingsfind.samsung.com/dm/addOperation.do?_csrf=xxx
Body: {“dvceId”:“xxx”,“operation”:“RING”,“usrId”:“xxx”,“status”:“start”}
Cookie: JSESSIONID=xxx

What i don’t know is where the _crsf comes from, I got it from the browser and it seems to be the same per session.
I also don’t know how long the JSESSIONID Cookie lasts and have not figured out how to get a new one besides copying it out of my browser cookie storage.

7 Likes

CSRF stands for Cross-Site Request Forgery attack and it’s usually mitigated by a short lived token issued by the server per client session. Surely, you cannot generate one.

1 Like

I’ve brought two Galaxy SmartTag2 and will start reverse engineering the API once I get them so I can get them into HA as trackable devices.

16 Likes

That would be really great! Following the post.