Filter results by

SAMI Rules: Make Your Devices Work Together

Note: We have updated this post for ARTIK Cloud. Read it here!

As you know, SAMI rules. SAMI can start talking to your devices in seconds, generate insights from all these devices, and send them commands. You can design SAMI to do things like detect fire and read the weather. This week, SAMI became even more capable. You can now quickly and intuitively define rules for triggering device Actions based on SAMI messages. We call this feature: SAMI Rules.

SAMI Rules

Say you have a Withings smart scale, Philips Hue lights and SmartSense Motion sensor all connected to SAMI. Want these devices to start working together now?

With Rules, the SmartSense Motion sensor can turn on the Hue lights. The lights can send you an email when they’re left on overnight. And the Withings scale can set your lights to gray when your weight goes up (and hopefully discourage you from overeating!). True interoperability is a handful of clicks away:

SAMI Rules walkthrough

In our recent IoT demo you watched Luc connect our DIY flame detector to SAMI and view its data in the User Portal. You will have also spotted Luc using Rules to very quickly create a fire alarm and an email notification from the sensor data. Let’s learn how he did it.

Below is your official Rules tour, so go ahead and click on “Rules” in the nav bar of the User Portal.

SAMI Rules

What’s in a Rule

If you haven’t yet defined any Rules, you will see this:

SAMI Rules

Let’s change that. Click through to create a new Rule. Everything that goes into your Rule is contained on this page. In the IF pane, you can bring up a list of all your devices connected to SAMI.

SAMI Rules IF device

Select one of these devices to begin your Rule—I’ll use the SmartThings motion sensor—and you will see a list of all the fields defined in its Manifest.

SAMI Rules device fields

Let’s append the device name with the “motion” field. The next dialog will have the choices “is equal to” and “is not equal to”, which indicates that the value should be a string such as “moving”.

(Other data fields might bring up other options, like so:)

SAMI Rules device fields conditionals

For the THEN pane I’ll use a SmartThings On/Off Button Tile. The motion sensor can then send an “on” state when its motion field equals “moving”.

SAMI Rules THEN device

Note that the Rule description is automatically written as you build the Rule. Once you are finished defining it, all that’s left is to name your Rule.

SAMI Rules device fields

Why stop there?

Clicking “Save Rule” brings you to your newly populated Rules page, which lists your Rules and when they were created and last run. Above each Rule are buttons that allow you to do things like edit, test and deactivate your Rule. The Clone option is useful for assembling a set of complementary Rules:

SAMI Rules page

This opens a duplicate of the Rule that you may then modify into a new Rule. Here I’ve quickly written a Rule that sends an “off” state when the motion sensor is not “moving”.

SAMI Rules page

This is all it takes to turn your various devices into a responsive network of sensors. With Rules, a lot is already possible using the standard fields and Actions available in SAMI. Open the windows if a smoke detector is triggered, or play music that complements the hues of your smart lights. If you already own a number of smart devices, Rules can give your home an instant IQ boost.

What Rules do you want to write? Send us a tweet, and check back soon as we update the feature!

Get the ARTIK Newsletter

You like your news fresh! Sign up now and you will be the first to know about our latest software releases, coding tips, upcoming events, blog posts, datasheet updates, and more.

* By checking either box, you may receive notifications by phone, email, text, and/or other electronic means from Samsung Semiconductor, Inc. and its affiliates. If you choose to receive partner notifications, we may forward your contact information to our partners. You may unsubscribe from these services at any time by clicking on the unsubscribe link in our communications or by submitting a request here. Please see our Privacy Policy and Terms of Use for more information about how your data is stored and used.