In this project we illustrate how the OmnIoT SoftHub can actuate local devices directly based off of real-time local sensor thresholding, and/or remotely via any cloud based MQTT dashboard(s). If you are unfamiliar with the SoftHub, it is a Hub/Gateway Platform that allows you to create and deploy many typical IoT scenarios very quickly and without doing any actual programming. Instead of writing code, the SoftHub incorporates an object based rule engine that allows you to configure your application by defining rulesets to be executed. The rulesets are created using a provided SoftHub Configuration Utility.
The SoftHub is free for non-commercial use and a full working copy of the installation package, including documentation, can be downloaded from the support page at the OmnIoT website (www.omniot.com).
The tutorial is broken up into two video sections -
In the first video we go through a live demo showing the SoftHub, running on a Raspberry Pi Zero/W, configured to connect to both a local BLE sensor (a Dialog Semconductors DA-14535) and a remote Cayenne MQTT broker. In turn the SoftHub is shown controlling, via a GPIO, a power strip with a desk lamp plugged in. A threshold is configured for the light sensor on the DA-14535 so that when the ambient light dips below 100 lux the desk lamp is turned on. At the same time a control widget on a remote cloud based Cayenne dashboard can also control the lamp by enabling or disabling the sensor thresholding via an MQTT control message.
In the second video we provide a quick overview of the actual configuration file used in the example. We look at the ruleset required to configure our scenario as well as all the individual objects required to create the ruleset. Note that this video assumes some level of familiarity with how the SofHub rule engine works. If you are unfamiliar with the SoftHub you may wish to watch some of the introductory videos at the OmnIoTVideo's YouTube Channel before watching the second video.
Note also that the entire scenario took roughly 20 minutes to configure and deploy from scratch and required no actual programming.
Video Summary -
This video shows a brief live example of the SoftHub executing a configuration file illustrating a few of the SoftHub's capabilities. These include -
- The ability to connect to and access a Bluetooth Low Energy sensor and directly access any of the decoded data it transmits.
- The ability to execute threshold based logic based on real-time sensor data values.
- The ability to connect to, and communicate data to/from, remote MQTT brokers.
- The ability to reformat outgoing JSON packet data on the fly for proper display on a remote cloud based dashboard.
- The ability to map incoming MQTT messages to SoftHub actions to be performed.
- The ability to access and control SoftHub device GPIO's.
Video Summary -
In this video we opened, in the SoftHub Configuration Utility, the actual configuration file used in the live demo video. We very quickly reviewed the complete configuration file including all rules and objects required to implement our example scenario. These include -
- Five Event Objects
- Nine Rule Objects
- Nine Action Objects
- Four State Objects
- One Sensor Object
- One Output GPIO Definition
In this tutorial we've illustrated how the OmnIoT SoftHub can be configured to very quickly implement many features required of typical IoT edge infrastructure. While we kept the example as simple as possible, the OmnIoT SoftHub and the Cayenne platforms provide far more functionality to aid you in quickly building out your IoT edge infrastructure. New sensor support can also be added into the SoftHub in a matter of days if the currently supported sensor suite does not meet users need. Contact us at www.omniot.com for inquiries regarding new sensor support. For more information on Cayenne dashboards visit www.mydevices.com.