Changes to Data Persistence for Events in SmartThings


(Ben Edwards) #1

As part of our continued efforts to improve the SmartThings platform we are rolling out the next step of the Cassandra migration. This change provides us much better insight and control over our data storage needs, improved stability, and a foundation that can scale SmartThings for the long term. We’re excited about these changes, and plan to roll out the next phase of the migration tomorrow, Tuesday, November 25th.

As part of this change, events older than a week old will no longer be accessible to SmartApps or to view in the mobile and web clients.

Here’s what you can expect:

  1. In the mobile app and web-based views, all event feeds will stop reporting when you get past seven days old.
  2. In the mobile app, the “Recently” feed will only contain events from the past seven days. In some cases this will mean the feed will be empty.
  3. SmartApps (both real and simulated in the IDE) will only be able to access events from the past 7 days. If a SmartApp queries for events, it will not find any more than seven days old. SmartApp state is not affected. The latest state for an attribute, for example, latestState('motion'), is unaffected. Apps will always have access to the latest state of an attribute, regardless of how long ago it was.

Please let us know if you have any questions or feedback.


Platform running slow
(Ben Edwards) #2

(Beckwith) #3

Is this data purged or is it accessible by other means?


(Coolcatiger) #4

can we expect nest integration now ?


(F5snopro) #5

Is there a mechanism for users to archive to their own storage for historical purposes?


(Ben Edwards) #6

That is certainly one of the things that this will facilitate.


(Ben Edwards) #7

Most data will be accessible by by other means at a later date. Some (like Nest specific stuff) will not be. We are not prepared to take requests for data exports at this time but we will be able to in the future we believe.


(Andrew) #8

As Ben noted above, we are evaluating the best tools to allow users to pull data from outside the Cassandra implementation. The request is very reasonable and won’t be ignored.


(Beckwith) #9

Thanks for keeping us informed. I understand there is cost for SmartThings to maintain this data and can understand changing policy. Most may think of this data as useless but over time I’ve found myself depending on it. So I encourage maintaining it.

It is interesting that Nest in essence has a patent on some of our data.


(JJG) #10

It is a good thing I read this thread today, mostly by accident.
Otherwise I would have had a VERY BAD surprise next week, when I attempted to download my own temperature sensors snapshots for November with my custom Smart App.

Up to now, I could download a month’s history or even more.
While I can understand some time limit on events logging, for costs control purpose on your side, 7 days is not enough and definitely a pain for me : I cannot even program a weekly download (e.g. every Sunday) and be sure it will be properly executed :frowning: :frowning: .
Being in a different time zone from SmartThings servers, I am not even sure at what exact local hour my events will start disappearing !.
I may be part of a small minority, but for me access to events history from within Smart Apps was a critical feature, and this is definitely a BIG regression.

That you needed a limit, I can understand, but you could at least have put the limit to something more practical, like 9 days or even better 33 days, which would make programmed monthly download practical.


(Patrick Stuart [@pstuart]) #11

Google / Nest dictates 7 days for data retention for their official API access. That is the reason.

Nothing stops you from writing (or someone else) a 3rd party logging service (there are at least 3 I know of, including mine) to store your own data.

Correct me if I am wrong @Ben that this only applies to event history and not state variables? One could still write an app to store state variable history and that state variables will not get reset every 7 days?


(Jody) #12

Will these be affected by this policy? Will we in turn have to agree to a 7 day retention policy as part of a smart app developer agreement?


(The fish is still dead.) #13

Are any of these available publicly? I’m looking to shuttle my logs off to a logstash/elasticsearch instance.


(Jody) #14

You can set up and run your own thingspeak server. I did that for a time, but they don’t allow strings by default. The server is open source so you could hack it to suit your needs. Grovestreams has a free plan, but is rate limited. I am using firebase as the backend to thinglayer. The code to push subscribed data to a firebase instance is on my github. The hacker plan is free, but limited to 100mb and it’s easy to download your data from firebase on a schedule and clear it out.


(Donny Jekels) #15

will the new design for logging to be archived to say “Synology DS Cloud Service” which is a NAS on my local network?


(Jody) #16

As far as I understand it you can create a logging smart app and log your data for as long as you want. The only exception that I know of being nest, because you agree not to keep your own data with them.


#17