Skip to Content
Practical Internet of Things with JavaScript
book

Practical Internet of Things with JavaScript

by Arvind Ravulavaru
December 2017
Intermediate to advanced
296 pages
5h 56m
English
Packt Publishing
Content preview from Practical Internet of Things with JavaScript

Building the IFTTT rules engine

Now that we are sending the required data to the API engine, we will be doing two things:

  1. Showing data that we got from the smart wearable on the web, desktop, and mobile apps
  2. Executing rules on top of the data

We will get started with the second objective first. We will be building a rules engine to execute rules based on the data we have received.

Let's get started by creating a folder named ifttt at the root of the api-engine/server folder. Inside the ifttt folder, create a file named rules.json. Update api-engine/server/ifttt/rules.json, as follows:

[{ "device": "b8:27:eb:39:92:0d", "rules": [ { "if": { "prop": "fall", "cond": "eq", "valu": 1 }, "then": { "action": "EMAIL", "to": "arvind.ravulavaru@gmail.com" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driving JavaScript Applications

Test-Driving JavaScript Applications

Venkat Subramaniam
Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck

Publisher Resources

ISBN: 9781788292948Supplemental Content