Talk to your Toaster with Mule

Multiple sensors are connected to Eclipse Mosquitto through the MQTT protocol, sensor’s data is received in json and exposed to the client in MuleSoft with a Restful API, the client can set rule based conditions and communicate with the sensor.
ORIGINAL POST
By Sameera Mandalika
components
Hardware Components
Arduino Uno
X 1
W5100 Ethernet shield
X 1
HC-SR04
X 1
Infrared Sensor
X 1
LM35 (Temperature Sensor)
X 1
Software Apps and online services
Arduino IDE
Serial Monitor
details

2glztnyh6e1dvj882st1.png

Sequential Diagram

Sequence Diagram

 

Iot-Mule-Adpater:

The use case of the custom IoT-Mule Adaptor/Connector is –
It connects the MQTT to Mule 4 and exposes sensor’s data to the client and allows the client to communicate back to the sensor by giving commands based on parameters. A custom connector is created to setup connection to the mosquito broker for exposing incoming sensor’s data from IoT device via a Topic i.e., esp/test and the client’s conditions are sent via another Topic i.e., mule/test back to the IoT device. This solution enables communication to-fro from the sensor to Mule and from Mule to sensor.
Figure 1: Below represents the inside package structure of IoT-Mule Adapter/connector.
Picture10

The following steps involved in creation of connector are:

The connector’s code is shared in github.
https://github.com/SMandalika5/Mule-Hackathon

documents
Code
Mule-Hackathon
Talk to your Toaster with Mule

COMMENTS

Please Login to comment
  Subscribe  
Notify of
POSTED BY