Question: CoRE vs Simple Purpose Built App


(Eric) #1

I’m not familiar with the ST infrastructure or how it really works. However based on this situation:

  • Medium complexity use case that CoRE can do just fine
  • I have 6-8 instances of these pistons controlling different devices (no way to group due to the use cases)

Is it more “efficient / reliable” if I just write a simple app that does exactly what I need?

Because I don’t fully understand the complexity of the infrastructure or how it responds to something as powerful as CoRE, I don’t know if there is an overhead that comes with CoRE and having 20-30+ piston the overhead adds up.

Open question, I have no idea what the answer is…


[RELEASE] Simpe Volume with Voice
#2

Excellent question! Best place to ask that would be the CoRE design discussion thread.


(John) #3

Just an observation (and also stated in an email that I received from support - unrelated to CoRE, but they mentioned it and RM), CoRE is slower than any of my custom apps. Most of my custom apps are complex and go beyond what CoRE can do, but they execute much, much faster.

The issue, as I see it, CoRE is everything to everybody - it’s huge. As related to support, I had emailed them about a lag in Smart Lighting - they subsequently blamed CoRE and RM, which I was NOT using for the issue at hand. I switched a couple to CoRE and the lag increased, so I switched them back. They explained why CoRE and RM are “slow” (I already knew, but now I have it in writing). Maybe someday there will be a CoRE Lite.

I’m not bashing support, they just went for the low hanging fruit. I’m not bashing CoRE, it serves a great purpose. I use CoRE, Smart Lighting, and my own custom apps. I could switch all Smart Lighting to CoRE, but the lag would increase. Smart Lighting can’t do everything (can’t deal with the and-or if-then-else logic), so CoRE is a valuable tool. I wrote my apps when I wanted control for something that didn’t and still doesn’t exist (even with the Swiss Army Knife App - aka CoRE, it can’t do it all either).


(Darc Ranger) #4

For me, if I create at simple app that will be used multiple times for similar situations then I will use an app. If it is a complex one-off need or an unique need that CoRE would be the better option, I would use CoRE.

Like most stuff here and life it all comes down to situational, skill set and personal preference.


#5

CoRE is not slower than other custom apps that do non-local processing.

The problem is you’re comparing an app (in fact, the only app) that does local processing, Smart Lighting, to CoRE which is not able to process locally due to arbitrary restrictions imposed upon the platform.

I’m now looking at my CoRE runtime stats and the average evaluation time of my most-used rules (involving motion sensitive lights) are 618 ms, 551 ms, and 1116 ms.

If you think half a second to 1 second of response time is “slow” for a battery-operated sensor to relay to a hub that relays to a website that relays back to the hub that relays to a light to turn on, I’m not sure what to tell you.


(John) #6

From my own experience and according to support - YES, IT IS. It’s due to all of the querying of the devices.

No, I am not. My apps run in the cloud (they’re not approved for local processing).

I never said it was slow. I said it was slower.


#7

You’re the one making an extraordinary claim - that CoRE is slow and your own apps are faster. I just showed you data where the average execution time of a CoRE rule has been .6 - 1.1 seconds. If you don’t have the same data for your own app, it’ll be tough for me or anyone else to believe your claims.

I also don’t take what the SmartThings team says at face value. In fact, CoRE exists today (and Rule Machine doesn’t), explicitly and factually because the SmartThings team failed to expediently fix platform issues that compromised the operation of Rule Machine. So Bruce quit, and Andy stepped up to fill a need of the community.


(Eric) #8

@bobfather - I think the .5 to 1 second is just the time it takes for CoRE to do the processing. I could be wrong but I don’t think that includes the trip up to the cloud and back down.

My explanation for asking the question is in my original post. CoRE is a great app and if it didn’t exist I would be screwed. I do not plan on writing my own apps for everything I do. However I do understand how software is developed to a great degree and I also know how modern day platforms (like SmartThings) should be architected (to some degree). In the software world, generally large / monolithic type applications have degrading performance over time due to their complexity and the developers ability to optimize specific use cases. All of this is why I asked the question. I was hoping I’d get an answer like “there is only a tiny amount of overhead because each of these use cases within CoRE is it’s own child app and independent of the rest of the app.” If the answer isn’t something like that, then unfortunately it is likely that a purpose built app is going t always be faster, even it if it 100ms. But when you are turning the lights on and your whole life you have experienced < 100ms (or less) time for your lights to turn on (likely just limited by your ability to perceive them turning on) 500 to 1000ms + the round trip time will seem unnatural. If I can shave a couple hundred milliseconds off a few critical tasks, I am happy to do that and continue to support @ady624 by using CoRE, providing feedback and donating (still trying to figure out if we are still donating or allowed to, need to catch up on that thread).

I didn’t intend to start an argument. I intended to have a discussion.

Also, if you are a software developer writing your own apps is fun as hell and this gives me a reason to do it.

I do hope in the future that ST allows us to choose where certain apps run. Verizon came the other day to upgrade me from 50 mbps to 150 mbps. It was a nightmare. Its funny how addicted you can get to home automation in just a few weeks. Right?

A note to @ady624: Thank you and everyone who has helped you in creating CoRE. It is truly amazing. ST wouldn’t be the same without it. I rely on it everyday.


(Never Trust @bamarayne) #9

I will use Smartlighting where it makes sense, for example I would like local processing.

As far as what is faster - Custom Lite Weight App, SmartLighting, Routines, CoRE. In God we trust, all others we need DATA baby.

But, I will say this… faster is meaningless when compared to reliability. Routines do not run. Smartlighting doesn’t always run. If CoRE can reliably execute certain tasks like unlocking my locks when I need it do, I will take a little lag… a little lag is better than a forever lag (not ever finishing the execution)

@ady624 for comments on ST Support’s assertions about CoRE.

I think ST needs to make some public and official statements. If they are making claims, they should substantiate them publicly with data. ady has put a lot of effort into CoRE and being direct and upfront, working hand in hand is called for. Rather than making statements like this behind the scenes.


(John) #10

Thanks, I love constructive feedback. I do have data for my apps. Extraordinary claim? No. I am not making one. You showed me numbers without context (not data in the true sense of what would be needed to ferret out any signifcant conclusions from your personal claim - i.e. types of devices, types of piston, what are they actually doing, etc. I know what I am comparing.). I stated my experience. Your belief system means nothing to me, so whether my experience means anything to you is irrelevant to me. I stated my experience and it is 100% valid and true.

As a programmer, you know that some of the apps require round trips, and this adds to latency. I have seen this first hand and I have data to back it up. I’m sure that you’ve experienced this in your coding background, right (assuming you are a coder)?

One of the issues that my system does have is that it is over 200 devices. Maybe size does matter. Support has stated this as an issue regarding lags. Honestly, I always thought it made it more reliable (my automations rarely failed even during the bad times - scheduling excluded), but then some of the recent platform updates were made to address some size related issues, so maybe it is/was detrimental too.

RM still exists - it just isn’t supported anymore. I still have it. I’m not knocking anything that Adrian did. It’s a great app. The discussion was CoRE vs Simple Purpose Built App. I shared my experiences. Sorry if you can’t accept a response that wasn’t directed to you, but rather to the OP. Sorry if my experiences differ from yours. Sorry if a different opinion or view upsets you.

After 2+ years with ST, I feel that I can state my experience.


(John) #11

It is fun. I am a programmer, but I enjoy coding for my house.


(John) #12

I had sent in a support request regarding lags increasing well beyond 30 seconds. When they looked at my system, a comment was made about the number of devices (200+) and that I had RM and CoRE installed. Both RM and CoRE had about 5 automations each, but Smart Lighting had at least 75+. I clearly stated which devices and automations (local DH and Smart Lighting) were impacted. They then came back with the additional traffic caused by RM and CoRE. Further adding that the additional queries generated by them would cause the lag to increase because of the additional traffic and that I should expect them to run slower.

My issue was unrelated to RM and CoRE. I didn’t mention them other than to respond that they were not the problem as I tried to redirect them back to the issue at hand. I gave up, rebooted the hub, and my problem subsided. It comes back once and a while, and I use a Wemo to reboot the hub when needed.


( I hate Mondays) #13

A do-it-all app will always run slower than a dedicated specialized app. If I had the skill, I’d use dedicated SmartApps. If I didn’t have the skill, I’d use RM or CoRE. Benefit of CoRE is the ability to change the logic on the fly (no recoding necessary). Benefit of dedicated app is speed.


CoRE Response Time
(Bobby) #14

I thought you were building up towards a grand finale as to why do you think CoRE is slower. But you did come back to it…

And then there is this, which I totally agree. There is a downside to every fast food!


(John) #15

Obvious. Plus from the horse’s mouth (gotta love American idioms).

Never left. It’s a great app and serves a purpose. I think I’m up to 7 pistons (I use Smart Lighting - which does work for me, and I use my own apps).


(Bobby) #16

Sure you did, your explanation came after @bobfather poke you…lol


(John) #17

Good point. Got side tracked. EDIT: Thanks @SBDOBRESCU, I never explained that well. I was was using it for a few things, just not very many.

Have a great day.


(Bobby) #18

Ive always thought about the noise that apps l8ke RM and CoRE make, so for a month, I tested my system without any c2c devices or custom apps, just to see if my system behaves differently. I didn’t notice any significant changes. My system was occasionally sluggish and not significantly faster overall. Now that was pure visual observation. If there were milliseconds gained, who cares. I’d rather have my custom apps and several pistons to achieve what i want than having a bare minimum set up.


(John) #19

Agreed. I think it’s minimal. I do think the round trips can be costly though. There are some really noisy devices though (Wemo’s, ST Smart Outlets).

I did compare RM, CoRE, and Smart Lighting doing the exact same automation. Smart Lighting was the fastest (local execution - no brainer, but limited when compared to RM or CoRE), RM was second (but less features than CoRE; encompassing, but not as Swiss army knife as CoRE). Before RM and CoRE (and Smart Lighting) existed, I had written many apps. A dedicated SmartApp could (and would) easily squeeze in between Smart Lighting and RM.

Between Smart Lighting, CoRE, and my custom apps, I’m very happy with my automations. I agree, I would rather have the features that I want too, versus having a bare minimum setup. But neither of us are in the bare minimum range. Mine works pretty well. My wife likes the automations. My son was a PITA about it (my daughter was OK with it). As with anything, the more variables (aka people), the less everything can be made to work the way everyone wants (maybe iBeacons or something else would help - possibly chipping the entire family). Now my son has graduated from college and has a job, so with an empty nest, things are as close to 100% as I can hope for. My wife does not like Alexa though. And I’ll admit she gets on my nerves with her inability sometimes to find things. When Alexa works, it’s great. The naming quirks are still a PITA.


(Eric) #20

I had not really thought about this too much. Do you know of other noisy devices?