This demo shows how to use complex event processing (CEP) at the edge to perform Internet of Things (IoT) sensor pattern detection and activation with Striim using Arduino boards, edge gateway, and Striim to spot a sense of patterns and trigger actuators.
Today we’re going to use complex event processing at the edge to perform IoT sensor pattern detection and activation. In this demo we’re using two Arduino boards and edge gateway and the Striim platform to spot sensor patterns and trigger actuators. On the first board we have two actuators and multicolor led and a buzzer that can generate sentence. On the second board we have four sensors, a button, a shock sensor and light level sensor and a temperature monitor. We will look for a sequence of events. First the button is pressed, then a shock detected. The light level reduced, the temperature increases, then the button pressed again. This has the following effects. At the beginning of the led is red. The button turns a yellow shock, makes it orange light, turns it green temperature, it becomes blue and finally it plays a tune on the final button press. The back end processing is done using a stream data flow at the end.
With monitoring of all of the sense of values and commands displayed on the dashboard, these are our sensors. On the first board we have a button, a shock sensor, a light level detector and a temperature sensor and these are our actuators and multicolor led ranging from red to violet and a sound generator. The Striim server is still performing analysis, calculating stats for sense of values and storing these for display. The dashboard displays a sense of data in real time as well as commands send to the actuators based on CEP processing sources at the edge. Collect data from five MQTT topics, one for each sensor and one for command center actuators. We use pattern matching to look for as a specific sequence of events across the sensors with timeouts for each step. We also have queries for each step of the pattern to indicate process using the led
Each match sends a particular color to the led over MQTT and if we match all steps, a message is sent to play a tune. Here you can see the raw sense of values for the button shock light and temperature sensors as individual messages and this is the corresponding CEP output. Use a trigger the led and play a tune. Now you understand what to expect. Let’s see it all in action.
Well, thanks for watching. Go to striim.com see more videos like this one.