AgriNode project: Building A Wireless Sensor Network for Agricultural Application
AgriNode project goal is to build an Internet of Things – IoT solutions for various agricultural applications. We successfully developed the AgriNode system which is a Wireless Sensor Network – WSN consisting a gateway and sensor nodes. In the project, We utilizedLow-cost devices (Arduino, Raspberry) and Open-sources IoT platforms (Eclipse Kura, Reactive Blocks).
MQTT stands for MessageQueuing Telemetry Transport which is an ISO standard (ISO/IEC PRF 20922)publish-subscribe-based "lightweight" messaging protocol for use on top of the TCP/IP protocol. It is designed for connections to remote locations where a "small code footprint" is required or the network bandwidth is limited. The publish-subscribe messaging pattern requires a message broker. The broker is responsible for distributing messages to interested clients based on the topic of a message. Andy Stanford-Clark and Arlen Nipper of Cirrus Link Solutions authored the first version of the protocol in 1999 .
In this demo, I work on Mosquitto platform (An Open source MQTT v3.1/v3.1.1 Broker)
The picture shows the basic MQTT protocol. MQTT broker - Mosquitto is installed into a PC (Windows, Linux, Raspbian,...). The clients - Publisher/Subscriber connect to MQTT broker via WiFi which is established by the PC. The Subscriber is an Arduino bo…
OpenHab2 - MQTT binding demo
This demo demonstrates how to use MQTT binding addon in OpenHAB2 installed into Orange Pi zero. The idea is very basic. A switch is created on default sitemap. When you turn on the switch, it sends "ON" message to Topic /office/light via MQTT broker that is installed on Orange Pi. When you turn off the switch, it sends "OFF" message to Topic /office/light.
RequireOpenhab2MQTT broker installed.
First, install MQTT binding via paperui
Define all the brokers which you want to connect to, in your services/mqtt.cfg file. cd /etc/openhab2/services
sudo nano mqtt.cfg
Edit the file as follow #
# Define your MQTT broker connections here for usein the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with an ID you choose.
# URL to the MQTT broker, e.g. tcp://localhost:1883or ssl://localhost:8883
# Optional. Client id (max23 chars) tousewhen connecting to the broker.
# Ifnot provided a defau…