Devices randomly turning off

That would be fine, if it was just yesterday. Happening today, maybe more so. Also i wouldnt call this ‘not running’ or ‘not turning things off’. There was nothing that I can think of that ‘as designed’ should have turned things off so i wouldnt attribute that to automations not running since it shouldnt have even ran.

My fear is having to delete and rebuild EVERYTHING in terms of automations/smartlighting (i hate that they have a function called automations cause now you have to be super super specific that this isnt an ‘automation’ but it is an automation). I guess ultimately its going to be an email or call to support which I dont have high hopes of a resolution that isnt ‘start over’.

1 Like

Welp just happened again. 21:51. Wtf smartthings.
outside lights stayed on, inside lights and outlets off, which mostly matches my ‘leaving’ stuff. But no notification that it did that, also no mode change and no ‘arrive’ either. if I leave I set home to away mode, which also is a condition on the smartlighting, if motion and mode is ‘home’. this makes 0 sense.

14:56 did it again just now. I swear this is driving me nuts. Tried editing some smartlighting stuff i thought might be doing it just to update it on the server, no luck. Now I gotta decide if its worth the support headache or not

1 Like

In answer to the earlier question about logging of presence, you should be able to look at the mobile presence devices in the IDE and list the events there. Some community members say they don’t see the events there but they are certainly still there for me.

Automations (in the non-generic sense) should appear in the app History if they activate (along with Rules and Scenes).

Are your automations (generic sense) all working correctly? Nothing weird happening like events wandering off for a few hours and suddenly appearing just to wind you up? I was a bit thrown today when I suddenly had a notification that a device had been added to Alexa as it was several hours after the event (usually the notification is so fast that it is the first I know about a successful addition of a device).

Only have my iPhone as the only presence device. Looking in the IDE I see nothing under list events, nothing in any options there. And if this was causing the issue it should change modes on the house and its not and no push notification as it is set to do that.

My ‘canary in the coal mine’ is this ST outlet behind me. Only smartlighting automation for button push on/off, then one Automation for when mode changes to ‘night’ that then a smartlighting picks up and turns everything off , a scene for everything off which is ran via Automation which sets mode to away and push notification.

There shouldnt be delayed automations happening with this outlet as its only triggered for button push or home/away presence. But also other things turn off (it just happens that this outlet is on right now) like at night it turned off all interior lights like it should do for going away (but i never see mode change or a push notification that it happened). The rule for ‘away’ is a ‘gone for 5 mins’, this phone is the only one triggering it (i live alone).

No external stuff with alexa or homekit as i dont have either installed. I try to keep it as simple and stock as possible.

18:14 it happened again. Again nothing should be triggering it. Tho looking at this thread, Connect location services driving me crazy. BRING BACK CLASSIC - #17 by jkp I think I might be getting the same thing. I see the last activity of my phone listed as the exact same time as this stuff happening. Its not like a regular thing as you see with the timing, but just weird to see the exact same time stamp for ‘last activity’ as whats happening. And with my only ‘automation’ that should do this is presence, makes me wonder.

18:50 again

Confirmed its the phone thinking its not here it seems.

Now the debate, delete the app and reinstall? Thats the only device with presence status.

Well Ive deleted the app and reinstalled. Rebooted phone of course. Powered off the hub for 15mins (know this does nothing for this situation but did it anyway). Still has happened a couple times since doing all this. Seems like the phone is polled for an update or something and says its not within my geofence, but then is I guess.

Im wondering if this is a backend change starting about 3 days ago, maybe the 11th or there abouts. I txt’d a friend with ST as well on 7-11 if he was having similar issues. Ive changed nothing up until that point. Thats whats sad, is that for about 5 years ive had a stable system with minimal hiccups.

This is a SmartLighting automation that says when I leave turn everything off. It is not firing any other thing. I have an Automation that says when ive been gone for 5 mins to arm SmartThings Home Monitor to away and set mode away. If Im going to have to migrate everything off SmartLighting for presence thats going to suck. It really seems something changed on or before the 11th messing up presence on up to date ios. App wasnt updated then, ios wasnt update then, both were up to date but well before this issue started.

Sigh, maybe this is the sign to finally leave this ecosystem.

Let’s see if I’ve got this right. The symptoms are indeed caused by Smart Lighting reacting to a change in mobile presence to ‘not present’ but it is presumably changing back again within five minutes and that is why the departure Automations don’t fire?

There is definitely only one presence sensor, with type listed as ‘placeholder’, showing up in the IDE which isn’t listing events (don’t know why, but others have found that too) but is showing it is being used by the Smart Lighting automation?

It would be nice to know what the presence sensor really is doing. That could be achieved by the using an Automation or SmartLighting to turn on or off a device whose events do show up, or if you like that sort of thing you could get a Personal Access Token and do the equivalent of:

curl --header "Authorization: Bearer ACCESSTOKEN""locationId=LOCATIONID&deviceId=PRESENCEDEVICEID"

That is the device event history in the current API.

It would be nice if mobile presence reported a geolocation. It would be interesting to know where on earth it thinks it is.

First statement, correct thats what happening.

Second statement, not correct. I have one presence sensor my iPhone. It is not listed as ‘placeholder’ its listed as ‘mobile presence’. The only ‘placeholder’ device types are my arlo cameras. When I go into that device and do List Events I see nothing in any of the filters/options given. Lot of my stuff is that way too. I attributed that to being locally ran, but the phone is a Cloud based device.

I have no problem running curls :wink: linux sysadmin here lol. But when i go to the personal access token creation what should I create? check everything? check nothing? and where to i find locationid and presencedeviceid, assuming those in caps are the variable you need to put into that url. Id like to get to the bottom of this too.

Makes little to no sense. According to the ide, i created that SmartLighting rule in 2017, for the most part have had 0 issues out of it. Hell the worst part is yesterday when I DID leave, the arming via the Automation didnt fire as expected 5mins after I left. Got to the grocery store and normally I get a notification by the time I pull in that its armed, didnt happen. Opened the app and did it by hand. But it did disarm once I got within the geo fence. I think I may move the geo fence and reset it in the app. That was an old ‘trick’ back in the day to fix location issues.

Ah OK. Historically mobile presence was implemented as a Groovy Device Handler of type ‘mobile presence’. The Android app switched to one of the current integration types several months ago (let’s say September last year) and those appear as a ‘placeholder’ in the IDE as the legacy platform which the IDE is part of doesn’t really have the idea of anything but device handlers. I believe you only saw the change if you disabled presence in the app and started it again and theoretically the old version was deleted.

I believe the iOS app transitioned with the recent revamp and again you had to disable and reenable the location to see the change. However deleting and reinstalling the app seemed to have the same effect and a lot of users had to do that this time around.

I fell out of work just about the time Linux was really taking off.

For the PAT creation you might as well tick everything in sight for the time being as there isn’t a direct match between permissions and endpoints and it saves thinking too much.

The caps are UUIDs/GUIDs. If you look at your presence device in the IDE, the UUID in the URL is the device ID you are interested in. Same thing for your SmartThings Location.

You might appreciate the SmartThings CLI as a command line front end to the current API as it’ll help give you a perspective on what the app is working with. If you do take a look it would be worth running smartthings devices just to get a list of what the app thinks is out there. In endpoint terms it is looking at

I’m just a bit suspicious there might be an extra presence device out there somewhere. Some have reported they don’t show consistently at both the account level My Devices and at the Location level Devices.

I should also note that the mobile presence DTH was both a presence sensor and an occupancy sensor. No one ever cracked and admitted how the occupancy was determined but it sure looks Wi-Fi related. The DTH included tweaks that made sure that when occupancy became active, presence was also set active, and that when presence became inactive, occupancy was set inactive. This was carried on into the new integration. I could see the thinking behind this but always thought it was slightly dubious and could easily contribute to bouncing presence. Occupancy vanished from the current presence implementation earlier this year. Not before time.

Which is a long way of saying that you probably don’t want to still be using the DTH based presence sensor.

Yea my phone showed presence and occupancy in the ide. Im trying removing location from the phone. I disabled it in the app, but it still shows up in the ide. I deleted it in the ide, and its still there. Maybe a caching issue so going to give it a moment or 5 before I try reenabling.

Thats the ‘weird’ thing. I delete the app and reinstall, it never asked me to put the password in or anything, it just always was like the phone was still enabled. So dont know if this is a shard issue or account migration issue or such. Ive done the above of disable and delete in the idea, and going to give it a few mins. Funny it said only one ‘automation’ had anything to do with the phone, I guess Automations dont care? Cause I do have a couple Automations ie leave and arrive.

The IDE exists in the classic / legacy environment. It can show which legacy Groovy based SmartApps have subscribed to the device events, which basically means Smart Lighting in your case. It knows nothing of Automations which are of the ‘new’ environment.

Watch out for the Automations as they have to be viable. If you delete the presence sensor (which disabling the location does), any condition or action that uses it is removed from Automations. If the remaining Automation doesn’t have both a valid condition and a valid action it will be deleted. Not just disabled, deleted. If the remaining Automation is still valid it will be retained, which is a bit of a worry if the presence sensor condition was all that was stopping it from doing something stupid.

Ok it did delete the Automations. So guess thats a ‘sign’ of something. But my phone is still in the ide, even after delete multiple times. Still shows as ‘mobile presence’. I enabled and disabled location a couple of times. I did get an error upon disable of the location

11:00:53 AM: error groovy.lang.MissingMethodException: No signature of method: java.util.LinkedHashMap.flatten() is applicable for argument types: () values:
Possible solutions: values(), clone(), values(), take(int), wait(), println()

But thats it. Ill renable location, and recreate those Automation. Crap wish I knew that tho lol. Think it was only 2…I think. I really just want the random turning off to stop dang it.

edit: interesting in SmartLighting and Automations I now have 2 iphones listed. Wonder if this is now a support question to delete both of them

Ok, deleted the SmartLighting rule and then deleted the iphone from the ide and it stuck this time. Phone disappeared from the device list. Then renabled it on the phone, and recreated everything.

Crap…it just did it. The rule wasnt active more than 10mins lol

Going to try the api stuff now.

When doing the API call i get. Played around with escaping the & cause on linux it tries to throw that into the background, edited to use the --url and put the whole url in double quotes " " and I get this.


And thats it. Same when I look at the List Events in the IDE. Guess Ill just wait and see if it happens again. This is suburbly frustrating. For it to work for 5 years and now to fail. I guess I can change to Automations but every time ive tried to do stuff where its to turn off the 58 lights/switches and change mode it fails.

Crap it just happened again right this second.

Welp still happening after all of this. And beyond that when I remade the Automations I didnt do the ‘gone for 5 mins’ so it does affect Automations as well. So I dont know, Im at a loss. Happened 3-4 times today. Thought maybe EM interference here in my office so didnt come in here all day thus phone being away from all these devices and that made no difference. So wtf is going on.

So now what 11-12 days later it seems to be ok. I tried everything that made sense. Remove phone from all Automations and SmartLighting, remove app, go into ide and delete app cause removing app didnt remove, reinstall, and readd my phone to the devices. It still did the thing acting like i had left my geo fence and say i left. I did the trick of moving my pin for the location, and save that, then move it back, save, and i even changed the diameter of the fence a bit bigger cause I keep it the smallest circle usually. That still seemed to cause issues as you see on my last post.

So last few days maybe 4 or 5 its been stable. I dont know what changed cause it still exhibited the issue after I did all those changes. Then, it stopped. Left the house today and once again it does the thing where it didnt arm away like it should. Open the app then it goes ‘oh hey you arent here’. Then an hour or so later drive home, app not been opened in an hour so it will have been shut down by iOS, it does detect my return home. This sorta thing has been common for months, think since the new app.

Really getting poor results with ST these days. The moment I decide to buy a zigbee+zwave usb stick is all its going to take at this point. Sad cause this has been pretty darn good for 5 years.