Stringing events together?

Is there any way to order events? SmartApps seem like such a cumbersome way to do what I really want to do, which in a lot of cases is a few simple commands, but I need to track down the correct SmartApps and then figure out how they fit together with each other. One thing I haven’t figured out yet is connecting SmartApp events in a certain order.

For example, say you have a wake up sequence where you want your Sonos speakers to first speak “good morning” (that’s one app) and then play music (that’s another app). I can’t just set them both to trigger at the same time of course, is there any way to do this in order?

Not sure with your specific example but the sonos integration still isn’t 100% so I wouldn’t expect it to work exactly as you want. Is there another example you can think of?

@jaredchris

I’m not familiar with a way to trigger apps back to back. You can trigger them at separate times (1 min apart) or you can write an app to trigger them in succession. Not sure if you’re a dev. If so, it shouldn’t take long to publish an app for what you need. Let me know if you need help.

1 Like

I would like to be able to string multiple events in an order to trigger a Sonos event. Example if presence changes then this door opens say custom text.

1 Like

@longhorn84 another example would be with the Philips Hue bulbs I set up in our office. They are green when a door opens, red when a door is closed (multi sensor). Ideally I would like to be able to change the light to orange for a minute or so as soon as the door opens, then green. Similar roadblock where I can’t just create an event series like I would expect… even X10 macros let you string together anything you wanted!

@dawgonking I do have some dev experience, just hoping there was something I was missing in the existing system so I didn’t need to learn how to hack together an app

I guess the goal of making things “smart” for the masses means giving up a bit of flexibility on the back end, at least for now. Have you ever messed with HomeSeer or MiCasa to see if they give you that flexibility?

@jaredchris

There is support for scheduled events in the API (run in), so it is relatively simple to “do this”, and “then that” after a minute.

def contactOpenHandler(evt) {
	firstTask()
	def minuteDelay = 60
	runIn(minuteDelay, nextTask)
}

Agreed @longhorn84, I was just a little surprised. If anyone here remember Lego Mindstorms, even they had a simple drag and drop “puzzle piece” type of interface where you could do basic if / then logic and event series. I haven’t tried anything else, I just did some research and ST seemed like the best overall given the options? I have my home and office pretty dependent on ST, so I’ll learn to work with it.

@scottinpollock thanks very much, I’ll check out how to use the API here

@jaredchris

Yeah, point and click logic is nice. Indigo uses it, so does Universal Devices. But once you want to do something that is not in its list of choices, you have really hit a wall. I like that ST is more granular. But I am not a java head. I find Vera’s lua a bit friendlier, but the rest of it seems a train wreck.

For the simple stuff, there are plenty of examples, and you will eventually grok it by fiddling with them. The API is nice (although a little clunky). Error responses are terse, and the new official documentation seems written by coders for coders. And there still lacks a comprehensive reference with commented examples (comments in general are few and far between). This is a big mistake if their plans are to go prime time in a big way. Guessing it has, and will get better as time goes on. With “tech writer” being one of the many hats I wear, I know the resource hog it can be.

Don’t get me wrong… the core of ST is very clever (with many advantages), and I am still happy with my decision, but I would like to see more tutorial oriented (and complete command/function reference) documentation. I am so close to doing everything I want with it, but am still stuck on a few issues (and no answers have been forthcoming as yet). I am guessing there are lots things being worked on, and just not enough resources to address all of them yet. Ha! Welcome to software development. (c;

@dawgonking Are you saying it is possible to trigger one SmartApp from another? I would love to see an example of this.

I completely agree with this!

@scottinpollock Inherently, no - not that I’m aware of. Sorry if that’s what my comments conveyed, I was referring to the ST API and it’s ability to run things in succession (runIn) or on a delay. I’ve utilized both and they do work quite nicely.

Just as you’ve outlined above :wink:

[quote=“jaredchris, post:6, topic:2610”]I do have some dev experience, just hoping there was something I was missing in the existing system so I didn’t need to learn how to hack together an app
[/quote]Have you looked at Rule Machine? You can’t link multiple apps together with it, but it eliminates the need for some of the other apps by allows you to setup rules that can be linked together… Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support