<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sameera Mandalika</title>
    <description>The latest articles on DEV Community by Sameera Mandalika (@sameera_mandalika).</description>
    <link>https://dev.to/sameera_mandalika</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F522270%2Fc5355e93-a88d-4c12-8a7c-8ec78f38cd9f.png</url>
      <title>DEV Community: Sameera Mandalika</title>
      <link>https://dev.to/sameera_mandalika</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sameera_mandalika"/>
    <language>en</language>
    <item>
      <title>Talk to your Toaster with Mule</title>
      <dc:creator>Sameera Mandalika</dc:creator>
      <pubDate>Sat, 28 Nov 2020 14:33:25 +0000</pubDate>
      <link>https://dev.to/sameera_mandalika/talk-to-your-toaster-with-mule-1mp2</link>
      <guid>https://dev.to/sameera_mandalika/talk-to-your-toaster-with-mule-1mp2</guid>
      <description>&lt;h1&gt;
  
  
  Talk to your Toaster with Mule
&lt;/h1&gt;

&lt;p&gt;Internet of Things(IoT) is an expansion of Internet- a way of intelligently fusing the real and cyber world. As day by day internet is growing rapidly, we are moving in direction of making everything available on internet, so that it marks its presence in every part of the world. &lt;/p&gt;

&lt;p&gt;The IoT is comprised of smart machines interacting and communicating with other machines, objects, environments and infrastructures. As a result, huge volumes of data are being generated, and that data is being processed into useful actions that can “command and control” things to make our lives much easier and safer—and to reduce our impact on the environment.&lt;/p&gt;

&lt;p&gt;Environmental monitoring applications of the IoT typically use sensors to assist in environmental protection by monitoring air or water quality, atmospheric or soil conditions, and can even include areas like monitoring the movements of wildlife and their habitats.&lt;br&gt;
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. &lt;/p&gt;

&lt;h2&gt;
  
  
  Component Diagram
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2glztnyh6e1dvj882st1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2glztnyh6e1dvj882st1.png" alt="componenet-2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Sequential Diagram
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F682cx38c3g9oxef3q1nz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F682cx38c3g9oxef3q1nz.PNG" alt="Sequence Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  HARDWARE
&lt;/h2&gt;

&lt;p&gt;Arduino Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started.&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxxc8x67y31hxfgysnxzh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxxc8x67y31hxfgysnxzh.jpg" alt="pic1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Specifications:
&lt;/h2&gt;

&lt;p&gt;It is an ATmega328P based Microcontroller&lt;br&gt;
The Operating Voltage of the Arduino is 5V&lt;br&gt;
The recommended input voltage ranges from 7V to 12V&lt;br&gt;
The i/p voltage (limit) is 6V to 20V&lt;br&gt;
Digital input and output pins-14&lt;br&gt;
Digital input &amp;amp; output pins (PWM)-6&lt;br&gt;
Analog i/p pins are 6&lt;br&gt;
DC Current for each I/O Pin is 20 mA&lt;br&gt;
DC Current used for 3.3V Pin is 50 mA&lt;br&gt;
Flash Memory -32 KB, and 0.5 KB memory is used by the boot loader&lt;br&gt;
SRAM is 2 KB&lt;br&gt;
EEPROM is 1 KB&lt;br&gt;
The speed of the CLK is 16 MHz&lt;br&gt;
In Built LED&lt;br&gt;
Length and width of the Arduino are 68.6 mm X 53.4 mm&lt;br&gt;
The weight of the Arduino board is 25 g&lt;/p&gt;

&lt;h2&gt;
  
  
  Ethernet Shield:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fenc1ga0zyh2tilauj20a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fenc1ga0zyh2tilauj20a.jpg" alt="Picture2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The W5100 is a versatile single-chip network interface chip with a 10/100Mbs Ethernet controller integrated internally. It is mainly used in a high integrated, high stable, high performance, and low-cost embedded system. Ethernet Shield allows internet connectivity to Arduino board by using its Ethernet library.&lt;br&gt;
The hardware TCP/IP protocol stack supports the following protocols: TCP, UDP, IPV4, ICMP, ARP, IGMP and PPoE.&lt;br&gt;
Specification:&lt;br&gt;
• Operating voltage 5V (supplied from the Arduino Board) &lt;br&gt;
• Ethernet Controller: W5100 with internal 16K buffer &lt;br&gt;
• Connection speed: 10/100Mb &lt;br&gt;
• Connection with Arduino on SPI port &lt;br&gt;
• The Shield contains a number of informational LEDs &lt;br&gt;
• PWR: indicates that the board and shield are powered &lt;br&gt;
• LINK: indicates the presence of a network link and flashes when the shield transmits or receives data &lt;br&gt;
• FULLD: indicates that the network connection is full duplex &lt;br&gt;
• 100M: indicates the presence of a 100 Mb/s network connection (as opposed to 10 Mb/s) &lt;br&gt;
• RX: flashes when the shield receives data &lt;br&gt;
• TX: flashes when the shield sends data &lt;br&gt;
• COLL: flashes when network collisions are detected&lt;/p&gt;

&lt;h2&gt;
  
  
  Ultrasonic:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff6uk4e000lnaiyufsbf4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff6uk4e000lnaiyufsbf4.jpg" alt="ultrasonic"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the HC-SR04 ultrasonic distance sensor. This economical sensor provides 2cm to 400cm of non-contact measurement functionality with a ranging accuracy that can reach up to 3mm. Each HC-SR04 module includes an ultrasonic transmitter, a receiver, and a control circuit.&lt;br&gt;
There are only four pins that you need to worry about on the HC-SR04: VCC (Power), Trig (Trigger), Echo (Receive), and GND (Ground).&lt;/p&gt;

&lt;h2&gt;
  
  
  Specifications:
&lt;/h2&gt;

&lt;p&gt;Operating voltage: +5V&lt;br&gt;
Theoretical Measuring Distance: 2cm to 450cm&lt;br&gt;
Practical Measuring Distance: 2cm to 80cm&lt;br&gt;
Accuracy: 3mm&lt;br&gt;
Measuring angle covered: &amp;lt;15°&lt;br&gt;
Operating Current: &amp;lt;15mA&lt;br&gt;
Operating Frequency: 40Hz&lt;/p&gt;

&lt;h2&gt;
  
  
  Infrared Sensor:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frinadcskngvpo09gsuyh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frinadcskngvpo09gsuyh.jpg" alt="Picture4"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An infrared sensor is an electronic device, that emits in order to sense some aspects of the surroundings. An IR sensor can measure the heat of an object as well as detects the motion. These types of sensors measure only infrared radiation, rather than emitting it that is called as a passive IR sensor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specifications:
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; *5VDC Operating voltage&lt;br&gt;
 *I/O pins are 5V and 3.3V compliant&lt;br&gt;
 *Range: Up to 20cm&lt;br&gt;
 *Adjustable Sensing range&lt;br&gt;
 *Built-in Ambient Light Sensor&lt;br&gt;
 *20mA supply current&lt;br&gt;
 *Mounting hole&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Temperature Sensor:&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpp2d0qxeueqzigzydo3g.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpp2d0qxeueqzigzydo3g.jpg" alt="Picture5"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LM35 is a precession Integrated circuit Temperature sensor, whose output voltage varies, based on the temperature around it. It is a small and cheap IC which can be used to measure temperature anywhere between -55°C to 150°C. It can easily be interfaced with any Microcontroller that has ADC function or any development platform like Arduino.&lt;br&gt;
Power the IC by applying a regulated voltage like +5V (VS) to the input pin and connected the ground pin to the ground of the circuit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Specifications:
&lt;/h2&gt;

&lt;p&gt;Minimum and Maximum Input Voltage is 35V and -2V, respectively. Typically, 5V.&lt;br&gt;
Can measure temperature ranging from -55°C to 150°C &lt;br&gt;
Output voltage is directly proportional (Linear) to temperature (i.e.) there will be a rise of 10mV (0.01V) for every 1°C rise in temperature.&lt;br&gt;
±0.5°C Accuracy&lt;br&gt;
Drain current is less than 60uA&lt;br&gt;&lt;br&gt;
Low cost temperature sensor&lt;br&gt;
Small and hence suitable for remote applications&lt;br&gt;
Available in TO-92, TO-220, TO-CAN and SOIC package&lt;/p&gt;

&lt;h2&gt;
  
  
  PACKAGES
&lt;/h2&gt;

&lt;p&gt;##MQTT ADAPTER&lt;br&gt;
    1.ArduinoJson.h&lt;br&gt;
    2.SPI.h&lt;br&gt;
    3.Ethernet.h&lt;br&gt;
    4.PubSubClient.h&lt;/p&gt;

&lt;p&gt;##MULE ADAPTER&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwjujj68l7fkyt8k1juem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwjujj68l7fkyt8k1juem.png" alt="dep1"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpz5459cri39uxpacrstj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpz5459cri39uxpacrstj.png" alt="dep3"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm2iq2bp54zqm1z0zw1pk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm2iq2bp54zqm1z0zw1pk.png" alt="dep2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Json
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgd1fu72xzc8fkdf3xg1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgd1fu72xzc8fkdf3xg1g.png" alt="json arduino"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Circuit
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flla2sb7ah72y4xw2pul4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flla2sb7ah72y4xw2pul4.jpg" alt="Picture6"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Setting up Arduino and Arduino IDE&lt;br&gt;
To start programming the Arduino board we need Arduino IDE which is open- source software, easily available to download and install.&lt;br&gt;
Arduino IDE supports C and C++ for coding. It has various libraries for different devices that are supported by Arduino board which can be used as per requirement of the project.&lt;br&gt;
Step 2: Installing Arduino Libraries&lt;br&gt;
We can add libraries which are already present on board and we can add libraries which we have downloaded, in our project we have used following libraries&lt;br&gt;
• PubSubClient-2.8.0 by Nick O’Leary &lt;br&gt;
• Adafruit Unified Sensor2.1.0 by Adafruit &lt;br&gt;
• Ethernet-2.0.0 by Various &lt;br&gt;
• MQTT-2.4.8 by Joel Gaehwiler &lt;br&gt;
• Arduino Http Client- 2.2.0 by Adrian McEwen &lt;br&gt;
• Arduino JSON-6.17.2 by Benoit Blanchon &lt;br&gt;
• LM35 Sensor-1.0.0 by Wilmouth Steven &lt;br&gt;
• Ultrasonic-3.0.0 by Erick Simoes &lt;br&gt;
• IRremote-2.8.0 by Shirriff &lt;br&gt;
Step 3: Prepare the circuit and upload a sketch&lt;br&gt;
After downloading and adding libraries in our sketch we should write the code for our program and complete our circuit as per the requirements, once both are ready then only, we can upload the code on the board after which we can verify for any error present in our code or in connections of the circuit. If errors are there then we have to do the troubleshooting and once every errors are removed then our circuit will be ready to work according to our code.&lt;/p&gt;

&lt;h2&gt;
  
  
  MQTT Adapter
&lt;/h2&gt;

&lt;p&gt;MQTT is messaging queue telemetric transfer, standard protocol for the Internet of Things (IoT). It is designed as an extremely lightweight publish/subscribe messaging transport that is ideal for connecting remote devices with a small code footprint and minimal network bandwidth. &lt;/p&gt;

&lt;p&gt;MQTT clients are very small, require minimal resources so can be used on small microcontrollers.&lt;br&gt;
MQTT allows for messaging between device to cloud and cloud to device. This makes for easy broadcasting messages to groups of things. MQTT can scale to connect with millions of IoT devices.&lt;br&gt;
MQTT protocol is connected to a MQTT broker at the specified port. Here, test.mosquitto.org is used to connect to a Topic to publish the sensor’s data in json format.&lt;br&gt;
For the data sending the sensor’s data to the client is subscribed to the Topic named as: esp/test&lt;/p&gt;

&lt;h2&gt;
  
  
  Eclipse Mosquitto Library:
&lt;/h2&gt;

&lt;p&gt;Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers.&lt;br&gt;
The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for Internet of Things messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers.&lt;br&gt;
The Mosquitto project also provides a C library for implementing MQTT clients, and the very popular mosquitto_pub and mosquitto_sub command line MQTT clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect to the Mosquitto Topic:
&lt;/h2&gt;

&lt;p&gt;Step 1: Complete the circuit and connect the Ethernet shield to the laptop/Desktop.&lt;br&gt;
Step 2: Open the Arduino IDE and write the code. Arduino allows two methods &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Setup()&lt;/li&gt;
&lt;li&gt; Loop() 
The Arduino IDE looks are like the below image.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9ups2rv2lguuxezshs0q.png" alt="Picture8"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 3: Tools  Serial Monitor&lt;br&gt;
The output shows the connection establishment, the published message to the broker and message received from that Topic. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8i5bii6e7mv4g27dwknr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8i5bii6e7mv4g27dwknr.png" alt="Picture9"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, the sensor’s data is in the mosquitto broker waiting for Mule Adpater to set-up conenction and expose it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Iot-Mule-Adpater:
&lt;/h2&gt;

&lt;p&gt;The use case of the custom IoT-Mule Adaptor/Connector is –&lt;br&gt;
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.&lt;br&gt;
Figure 1: Below represents the inside package structure of IoT-Mule Adapter/connector.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6hwvss7r6mpur0cyjzgi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6hwvss7r6mpur0cyjzgi.jpg" alt="Picture10"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The following steps involved in creation of connector are:&lt;/p&gt;

&lt;p&gt;The connector’s code is shared in github. &lt;br&gt;
&lt;a href="https://github.com/SMandalika5/Mule-Hackathon" rel="noopener noreferrer"&gt;https://github.com/SMandalika5/Mule-Hackathon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 1: After completing the connector code go to Project right clickProperties&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff1inhjdjp0137tt50dg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff1inhjdjp0137tt50dg5.png" alt="Picture11"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will take you to that location where you can set your jar file.&lt;/p&gt;

&lt;p&gt;Step 2: After going to the location, type cmd in the window search field and give the command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F89zj3kcqm4v5g4hcc1wq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F89zj3kcqm4v5g4hcc1wq.png" alt="Picture13"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step3: mvn install &lt;br&gt;
After successful build run, install the dependencies in the local repository which can be found in your package structure. &lt;br&gt;
mvn install:install-file -Dfile=path of the jar file  DgroupId=groupId value DartifactId=artifactId value  -Dversion=version value -Dpackaging=jar&lt;/p&gt;

&lt;h4&gt;
  
  
  Example:
&lt;/h4&gt;

&lt;p&gt;mvn install:install-file -Dfile=E:\iot-mule-connector-1.3.1-mule-plugin.jar -DgroupId=com.iot.connector -DartifactId=iot-mule-connector -Dversion=1.0.0 -Dpackaging=jar&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F94vw4y16uuukix1m0uju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F94vw4y16uuukix1m0uju.png" alt="Picture14"&gt;&lt;/a&gt;![Picture15]&lt;/p&gt;

&lt;p&gt;Step 4: Create a  new Mule Project.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F94vw4y16uuukix1m0uju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F94vw4y16uuukix1m0uju.png" alt="Picture14"&gt;&lt;/a&gt;&lt;br&gt;
Step 5: Give a proejct name&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb5sy62kaxh3jn5z4n7ou.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb5sy62kaxh3jn5z4n7ou.jpg" alt="Picture16"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 6: The required depemdecy for conenction set is pasted in the pom.xml file.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F44un7d23s2uswqyvrm86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F44un7d23s2uswqyvrm86.png" alt="dep1"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fldkifk0zfb8qspe76mja.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fldkifk0zfb8qspe76mja.jpg" alt="Picture17"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 7: Drag and Drop the custom Component&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsiwuelxdpwfzwilu7eo4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsiwuelxdpwfzwilu7eo4.png" alt="Picture18"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 8: Drag and drop the logger to log the messages.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F93yqev2c8odlwjsrlx5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F93yqev2c8odlwjsrlx5w.png" alt="Picture19"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 9: Give the payload and the condition as per desired  by the client based on the Telemetric data. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk08eap7oveipp7ujfqd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk08eap7oveipp7ujfqd9.png" alt="Picture24"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff2om661ptes9j0ccs3pw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff2om661ptes9j0ccs3pw.png" alt="Picture26"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fukxqym1atbe0frrn2qhv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fukxqym1atbe0frrn2qhv.png" alt="Picture25"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The connection has been set up.&lt;br&gt;&lt;br&gt;
The message from mule is sent back to the IoT Device and the output looks like this.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F26nxlhcl9jufshgjy6bm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F26nxlhcl9jufshgjy6bm.png" alt="json mule to arduino"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Scope:
&lt;/h2&gt;

&lt;p&gt;This is a basic idea how communication with IoT devices can be done using MuleSoft. The project can be extended by adding Machine Learning and conducting analytics on the Telemetric data by storing in the database. This way the client views the prediction of the temperature based on historic temperature. Other several services can be provided, where he can communicate to the IoT device as per the predictions and not only as rule-based commands. &lt;br&gt;
 &lt;/p&gt;

</description>
      <category>mulesofthackathon</category>
      <category>iot</category>
      <category>mqtt</category>
      <category>sensors</category>
    </item>
  </channel>
</rss>
