Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

Raspberry Pi

https://makeradvisor.com/best-raspberry-pi-3-starter-kits/

MyQSL Database

MQTT, Raspberry and ESP

https://www.baldengineer.com/mqtt-tutorial.html

MQTT NodeMCU

https://www.allaboutcircuits.com/projects/introduction-to-the-mqtt-protocol-on-nodemcu/

Wireless Networking Raspberry Pi

https://www.makeuseof.com/tag/setting-wireless-networking-raspberry-pi/

MQTT SQL Database

https://iotbytes.wordpress.com/store-mqtt-data-from-sensors-into-sql-database/
The client is a program or a computer with software that relies on
making service requests to a server. The server is a computer
program or a device that can accept these requests, process them,
and return the requested information to the client.
https://www.instructables.com/lesson/Connecting-Your-Raspberry-Pi-to-the-Web/

NodeMCU MQTT Tutorial


https://www.teachmemicro.com/nodemcu-mqtt-tutorial/

MQTT (Message Queue Telemetry Transport), in contrast, transfers data as a


byte array which is more lightweight. MQTT (Message Queue Telemetry Transport) is a
publish-subscribe messaging protocol widely used in IoT applications. This protocol is
designed for data transfer between devices with limited network bandwidth and power.
Thus, it is highly recommended for microcontroller projects that sends data over the
internet.

http://mqtt.org/faq
What is MQTT?
MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple
and lightweight messaging protocol, designed for constrained devices and low-
bandwidth, high-latency or unreliable networks. The design principles are to
minimise network bandwidth and device resource requirements whilst also
attempting to ensure reliability and some degree of assurance of delivery. These
principles also turn out to make the protocol ideal of the emerging “machine-to-
machine” (M2M) or “Internet of Things” world of connected devices, and for mobile
applications where bandwidth and battery power are at a premium.

What is an MQTT broker?


MQTT (Message Queuing Telemetry Transport) is a messaging protocol that works on
the principle of underwriting / publishing that was developed at the base to simplify
communication between the machines. To run it is necessary to install a server, which
is designated by Broker. You can install your own Broker, which we will do in this article.
You can install it on almost all platforms including the most common (Windows, Linux,
Mac OS X ….) but also on a Raspberry Pi (which works under Linux after all).
In addition to simplifying communication, MQTT was designed to save as much as possible the
battery of the mobile devices on which it is used. It is 11 times less energy consuming to send
messages and 170 times less to receive than HTTP. MQTT is also 93 times faster than HTTP.

https://diyprojects.io/mqtt-mosquitto-communicating-connected-objects-iot/#.XHjrCogzbIU

Software Design

Message Queuing Telemetry Transport (MQTT)

MQTT (Message Queue Telemetry Transport) is a publish-subscribe messaging protocol


widely used in IoT applications. This protocol is designed for data transfer between devices
with limited network bandwidth and power. Thus, it is highly recommended for
microcontroller projects that sends data over the internet.

Arduino IDE

Used to configure the operation of the NodeMCU before it is launched at actual operation????LMAO

Mosquito Broker

https://www.hivemq.com/blog/mqtt-essentials-part-3-client-broker-connection-establishment/

The broker is at the heart of any publish/subscribe protocol. Depending on the


implementation, a broker can handle up to thousands of concurrently
connected MQTT clients. The broker is responsible for receiving all
messages, filtering the messages, determining who is subscribed to
each message, and sending the message to these subscribed clients. 

https://mosquitto.org/

Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements
the MQTT protocol versions 3.1 and 3.1.1. Mosquitto is lightweight and is suitable for
use on all devices from low power single board computers to full servers.

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.

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.
https://www.digitalocean.com/community/questions/how-to-setup-a-mosquitto-mqtt-
server-and-receive-data-from-owntracks

Mosquitto is an open-source message broker service that uses the MQTT protocol to


send and receive messages, typically with IOT (Internet of Things) devices.

https://diyprojects.io/mqtt-mosquitto-communicating-connected-objects-iot/#.XHjrCogzbIU

Mosquitto is widely used in projects based on esp8266, Arduino and Raspberry.

http://www.steves-internet-guide.com/mqtt-hosting-brokers-and-servers/

Lightweight open source broker written in C. Probably the most popular MQTT
broker.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Open source IoT Platform Comparison Table
Hardware Design

The ESP8266 (ESP-12E) WiFi IoT Development Board, also known as NodeMCU 1.0, is an open source
IoT Hardware Development Board based on the ESP8266 12-E Wi-Fi SoC. This allows the ESP8266
Development Board to communicate with other devices on the internet, making it the brains and
communications system in an IoT system. The NodeMCU has a microUSB port to connect to a computer
for serial communication, which is used to upload codes into the ESP8266.

For this research, the noise sensing circuit will connect to the ADC (Analog to Digital Conversion) pin of
the NodeMCU. ADC is a special pin that allows the ESP8266 to read analog values as well as control
analog devices.

Software Design

Arduino IDE

From the Arduino website, “the Arduino Integrated Development Environment - or Arduino Software
(IDE) - contains a text editor for writing code, a message area, a text console, a toolbar with buttons for
common functions and a series of menus.” The ESP8266 Library would be used to set the operation of the
NodeMCU as a client or a server. The researchers decided to utilize this for its operation and
implementation has been familiarized.

IoT Platform – Thingsboard.io

Thingsboard is an open source IoT platform that provides data collection, processing, visualization and
device management for IoT projects. The protocols used to allow device connectivity and data collection
are MQTT, HTTP and CoAP. Additionally, it supports both on-premises and deployments and cloud.
There are at least 30 customizable widgets that enables user to custom dashboards for IoT purposes.
The researchers decided to utilize this platform for it features real-time data visualization, plenty
widgets to customize the dashboards, including an alarm widget which isn’t featured in other platforms,
and more importantly, it is free.

Device management made adding and deleting devices, browsing device telemetry and browsing device
alarms possible in just one platform. This is due to the feature of Thingsboard of working with telemetry
data. Another feature is the “Rule Engine”. Data processing rules may be configured before it can be
used, such as setting a threshold value, which is the essential part of the current research.

Thingsboard allows users to customize the dashboard which may contain multiple widgets that visualize
data from multiple IoT devices. The widgets to be used would be time-series widget to display historical
or latest noise value in a certain time period, and alarm widget to display alarms that were set by the
configured rule of being triggered when noise value exceeded the threshold value.
Once an alarm widget is placed on the dashboard, and a rule has been configured that the alarm is
triggered once the telemetry value exceeds the threshold value, the set opreation will be executed
when the conditions are met, which will then enable of sending a notification for the librarian to see
where the noise is coming from.

https://thingsboard.io/docs/user-guide/ui/devices/ add devices, browse alarms

https://bartoszkolodziej.com/nodemcu-bme280-thingsboard/ add esp diretso

https://dzone.com/articles/facilities-monitoring-system-prototype-using-thing-1 The rules are set of


logical expressions written using a JavaScript syntax.

Guide: How to get started https://thingsboard.io/docs/getting-started-guides/helloworld/

Thingsboard is a 100% Open source IoT platform and can host it as a SaaS or PaaS solution. IT provides
device management, data collection, processing and visualization for your IoT projects. The standard
protocols it supports for providing device connectivity are MQTT, CoAP and HTTP and supports both
cloud and on-premises deployments. It gives more than 30 customizable widgets allows you to build end-
user custom dashboards for most IoT use-cases.

thingsboard.io open source IoT platform key features:

 Real-time data visualization and remote device control


 30 customizable widgets for custom dashboard
 customizable rules, plugins, widgets and transport implementations
 Allows monitoring client-side and provision server-side device attributes.
 Support multi-tenant installations out-of-the-box.
 Supports transport encryption for both MQTT and HTTP(s) protocols.
 Failed nodes can be replaced without downtime.
 And more…

ThingsBoard is an open-source server-side platform that allows you to monitor and control IoT
devices. It is free for both personal and commercial usage and you can deploy it anywhere.

Data collection over MQTT and real-time visualization use (cases).

For each station, the noise sensing circuit is connected to the NodeMCU. NodeMCU

push data to ThingsBoard server via MQTTprotocol. Data is visualized using built-in


customizable dashboard. The application that is running on NodeMCU is written using Lua
scripting language which is quite simple and easy to understand.
Telemetry Service

Telemetry Service is responsible for persisting attributes data to internal data storage;
provides server-side API to query and subscribe for attribute updates.

Internal data storage

ThingsBoard uses either Cassandra NoSQL database or SQL database to store all
data.
Although you can query the database directly, ThingsBoard provides a set of RESTful
and Websocket API that simplify this process and apply certain security policies:
 Tenant Administrator user is able to manage attributes for all entities that belong to the
corresponding tenant.
 Customer user is able to manage attributes only for entities that are assigned to the
corresponding customer

MQTT Protocol

Lua scripting language

- Programming the NodeMCU device


 We need to download and build firmware with Lua interpreter for NodeMCU. This
process is described in official documentation and there are multiple ways to do
this. You can use cloud build service for this purpose, however, we will use Docker
Image.
IoT System:

Hardware – sensors

Connectivity – Sensors transmit the data to the cloud through ESP8266 NodeMCU

There can be an intermediate step between hardware and connecting to the cloud, such as a gateway or
router.

Software – is hosted in the cloud and is responsible for analyzing the data its collecting from the sensors
and making decisions.

Database (Relational [SQL], Distributed, Cloud, NoSQL, Object-oriented, Graph)

https://searchsqlserver.techtarget.com/definition/database

ThingsBoard
Supporting the most popular communication protocols, ThingsBoard is
standard, all-rounder open IoT platform. It will help you collect and store
sensor data, define algorithms to process a big amount of data, and set up
rules on how the platform should react. You can set triggers for actions to
happen when a platform gets certain readings and alarms to get off if
necessary. The ThingsBoard also has a pretty nice means to create
dashboards and the rules engine can be used by people with little to no
programming experience.
https://dzone.com/articles/ultimate-list-of-30-iot-platforms-for-your-iot-pro

Generally, something that happens “in The Cloud” is any activity that takes
place over an internet connection instead of on the device itself.
https://www.iotforall.com/what-is-the-cloud/

You might also like