Smart Lock History lost

I lost the history for my Schlage Camelot Touchscreen Deadbolt. I’d like to understand whether it expired (what is the retention period and can it be changed?), I did something wrong that wiped it out, or was bitten by a bug.

It had been working fine for more than a year using the Smart Locks app from SmartThings. My phone (Moto G5 Plus running Android 8.1.0) got severely corrupted (unrelated to SmartThings) and had to be factory reset.

I then installed SmartThings from Play Store and noticed that it looked a lot different. The app could open and lock the door, but there was no history or code control. I found New to Smart Things need help managing Schlage lock user codes and tried Lock Manager with various device handlers; none were fully functional. Tried to install https://support.smartthings.com/hc/en-us/articles/200958090-Smart-Locks but the UI was not as described so failed.

Installed SmartThings Classic app and Smart Locks and everything seemed to be back to normal, even though the new SmartThings app is still installed and enabled.

After a few months with likely no lock activity, the History tab in Classic Smart Locks was empty. The other tabs were ok and new lock activity did appear in History.

If this was intentional behavior, can it be changed? Is there a better SmartApp that keeps history forever?

Any guidance will be gratefully appreciated.

Tagging @rboy

Thanks. I saw that when trying to recover from the phone reset, but thought “Why should I pay for something that was previously working?” and did not try that option.

However, if the free solution deletes history after some period of time and the paid one keeps it forever, then I’ll take another look and likely buy it.

1 Like

I tagged Rboy not specifically to recommend that code, but because he has become a real expert on locks as well as a very active member of this forum. :sunglasses: so he should be able to answer the question.

2 Likes

SmartLocks by default keeps a History of about 7 days. You need to scroll down to the bottom of the page and click on Load More to see the history. This number can’t be changed and is controlled by SmartThings. I believe at one point it used to be 30 days but of late it’s about 7 days.

There are other ways to access logs, specifically you can get your device event from the device log history in the IDE. That’s more raw information and not filtered the way you see it in SmartLocks. You can also check out Simple Event Viewer logging SmartApp if you need to log your events for archival/other purposes to google sheets.

BTW, the Lock User Management (LUM) app works with the new and the classic ST app and you can use in conjunction with SmartLocks (the history logging tab is unique to SmartLocks and LUM logs the information and usernames with SmartLocks so you can have the benefits of enhanced user management with the logging benefits of SmartLocks).

On the flip side apps like LUM log events to the notifications tab (unlike the history tab) and that information is kept for a very very long time (I can’t say forever since it depends on ST but ST’s business model depends on analytics on this usage data from users so they keep it for a long time) and you can access it through the mobile app or through the IDE. EDIT: Looks like this has been limited to 5-7 days as well now.

SmartLocks was designed to fill a basic gap in the user experience it wasn’t designed for power users or for commercial/heavy use purposes. For that matter the Basic version of LUM (which is free on the same topic) logs to the notifications tabs so you get the ability to program users and one additional feature over SmartLocks but there you miss the History tab (ST in it’s infinite wisdom decided not to let devs access more classy looking UI components). So it’s a trade off between a dedicated history tab and basic access or customized apps with advanced features and having to access the notifications tab for (virtually) endless logging without filters.

1 Like

Many thanks for the prompt and comprehensive reply.

I took a took at device log history in the IDE and saw that it was also limited to 7 days. If anyone from SmartThings is reading this, consider increasing or eliminating the expiration. If a lock averages 10 events per day for 10 years, the log would be only a few megabytes; less than one megabyte if stored in an efficient format. If you must impose a very small storage limit, consider keeping e.g. the most recent 500 events, regardless of age (pings should not fill this table).

Next, I tried Simple Event Viewer and it works great – a perfect solution for long term logging. There is a minor anomaly – The Date/Time column shows UTC milliseconds after the epoch as an integer, which also results in errors in the Date and Hour columns if enabled (those formulas are expecting Excel date/time values in column A). I don’t know whether it was installed incorrectly or it’s a bug. I’ll investigate and post findings later.

LUM is very interesting but I don’t want to risk installing it until physical access to the site is available, in case a reset is needed.