CoRE and Piston Rules Engine, first design steps

And what @JDRoberts is asking for can be achieved with a dynamic page triggered by an http input within the ST app

If we have good widgets you don’t need to even open the app. Something that @joshua_lyon can pick in SharpTools like a virtual device to trigger the rule.

1 Like

I think one thing we can all agree on: Do not build a system that requires the approval of any outside body… be that SmartThings or Apple.

A big part of why Bruce was able to iterate so quickly on RM was that deploying new versions was a simple as updating from Github. But since RM lived within the Smart App limitations, the UI was a nightmare (both to use and to build).

SmartRules has a great UI, but it is is beholden to both SmartThings and Apple to approve changes. Getting new versions out can take weeks.

Unless I’m mistaken, a web interface would be dependent on someone hosting the front end, right?

Which is what Mike said :slight_smile:. None of our three options (native Smart App, Native iOS/Android app, web app) is perfect.

1 Like

I for one ain’t going to host this, and I doubt anyone else is going to pony up an AWS or whatever to host it, so from my POV external hosting is a non starter, unless folks are going to pay, and they likely won’t…
On top of that you’ve now added another latency and dependency vector into the mix…

3 Likes

Yep. I believe it’s possible in rule machine to add an at will initiation to any rule just by adding “if switch A turns on or…” and then follow with all your other if conditions.

Make switch A a virtual momentary switch and now you can run any rule just from the things screen in the mobile app or from another smart app or routine.

The problem, of course, is the 100 device limit. SmartThings only allows for 100 devices that have the same capability, in this case “switch.” So if you’re adding a manual initiation switch to every rule, pretty soon you’re going to run out of switches. ( by the way, lightbulbs also have capability.switch as do pocket sockets, most relays, and pretty much anything which can be turned on and off. They all count towards the same 100 device limit.)

Angular and bootstrap on external cdn. Leaves minimal html and js that can actually be served by an endpoint in the app. Isn’t thisan approach SmartTiles is using?

The main problem I am seeing is not being able to modify inputs programatically, which means you are limited to modifying either through ST only or web only. Workarounds exist.

yea, but ST isn’t going to host this for you, so who is?, and who’s going to pay for it?
that’s my point, RM doesn’t need to be replaced today, and personally I wouldn’t be interested in adopting a rule engine that depended on an external service to operate, much less one maintained by the community.
While I agree that writing a web based UI would probably afford a better UX, I do not think it’s required.
RM is proof positive that it can be done in ST’s mobile environment.

2 Likes

Yes, but we should note that there are people who won’t use smarttiles for exactly that reason.

There were already two existing rules engines at the time that Bruce wrote rule machine. Smartrules is an iOS only app that you get through the App Store. (I believe they are working on an android version, however. )

http://smartrulesapp.com

The second was @joec 's “simple rule builder.” Also popular, but again there were people who didn’t want to use it because it went through a third-party host.

One of the requirements that Bruce had for rule machine when he started it, and one of the reasons that it quickly became so popular, was that it ran only within SmartThings. No external hardware or web services required. That had its limitations, but it also had a great deal to do with its acceptance.

So I think there’s a big difference between replacing rule machine and writing yet another third-party rules engine.

I think it’s always great to see more third-party options, and obviously smart tiles is an excellent example, but a new rules engine is not really a replacement for rule machine if it goes outside the SmartThings platform. That was really where @bravenel was so brilliant. Everybody else said, well, we’re going to have to use outside platforms, and he said, no, I can do it all in SmartThings. And he did. :sunglasses:

6 Likes

You guys have me excited that there may be an evolution, not a dead end to RM. One platform change could wipe it out.

RM is/was awesome, but wanted to point out one of the biggest b*tches was no way to back up your rules. Not sure if it is possible in the next generation.

5 Likes

one (or two, or three) platform changes aren’t going to wipe RM out, chilax guys, the worlds not coming to an end here.

We’ve had at least 4 or 5 platform updates, and 2 mobile updates since Bruce pulled support…, my copy’s still running, yours?

Backups aren’t practically possible, not with RM, nor any other app…
All apps are in the same boat.
Backups and restores are possible if someone wants to pony up an external host, but then here we go again, who pays…, who’s willing to pay?

1 Like

I have a VPS that I use for various things and I’m sure hosting a site on it wouldn’t be a big deal so if someone would like I’ll host it if we decide to go that route.

What would ideal is if the app would work both in the mobile and web and intertwine so users could use whichever one they wanted to but the same entries would show up in both.

No hosting required. Angularjs is hosted by google. Bootstrap as well. Html for angularjs is minimal and js is minimal as well (controller code). Have an endpoint in the app return the actual html page including the js in it. Html and js code reside within the SmartApp…

4 Likes

How well does JSON serialization work in ST groovy? Well enough to support import/export of rules structures?

I do not know yet, but I can tell you the state is saved as json

1 Like

Interesting. I didn’t know that. Thanks!

This part in RM was called actions. You could have actions that could be called from any other rule.

4 Likes

In 6 to 18 months (?) HTML “cards” for SmartApps will be released and facilitate rich integrated UI development. Saw the demo today… It’s not vapor ware, but there’s no way to guess when it will be released and supported.

My recommendation… Hibernate. Why bothering building a new Rule Machine until the platform is stable and the UI tools are available??

5 Likes

I agree. My plan is to use RM until the platform will no longer support it. And once that happens I’ll break it apart into smaller more specialized apps that will meet my needs and continue working.

There isn’t much that can’t be done in RM, at least I haven run across a scenario that I couldn’t program into it.

I see no reason to reinvent the wheel.

1 Like

Just going to throw something out there.
Does anyone know if it’s possible to get Bruce and support at ST talking to each other again.
Wouldn’t it be better to resolve the issues that exist between the two parties, and agree a way forward that is mutually agreeable.
RM is an awesome app and for me is not causing any issues on my ST setup.
So for me both products go hand in hand and if I was to recommend this product it would be on the basis of the two.
So, how about it guys. How about sitting down over a beer and see if you can resolve your issues.
That’s my 2 pence worth. Sorry 2 cents.

4 Likes