MQTT Preparation. Arduino EtherNet, also displayed in paho-MQTT (over WebSocket)

MQTT Preparation
ORIGINAL POST
By Knaka
details

imgp4680

Intro

This project uses MQTT, light and high speed, not HTTP. The contents to try the configuration of the device side Arduino + Ethernet Shield also increase in cost.

 

MQTT Config

Broker : test.mosquitto.org

Publish : IoT deivce ( Arduino + Ethernet Shield)

Subscribe : Browser Chrome

 

Development Tools

Linux ( Raspberry PI 2 )

mosquitto

screenshot_2015-10-09-09-31-33

MQTT server

pi @ raspberry pi : ~ / tmp $ sudo apt-get install mosquitto

 

Client tools

pi @ raspberry pi : ~ / tmp $ sudo apt-get install mosquitto-clients

 

#Test

The following does not specify a host name. Connected to the internal broker

 

To Sub – # subscribe

pi @ raspberry pi : ~ / tmp $ mosquitto_sub -d -t test_topic

 

To # publisher -Pub

Another console opening

pi @ raspberry pi : ~ / tmp $ mosquitto_pub -t test_topic -m “24.5”

 

#Result

In sub screen, Pub data is displayed

pi @ raspberry pi : ~ / tmp $ mosquitto_sub -d -t test_topic

Received CONNACK

Received SUBACK

Subscribed (mid : 1) : 0

Received PUBLISH (d0, q0, r0, m0, ‘test_topic’, … (4 byte) )

 

Open Source

Display system Library

IoT Device Side (Arduino Code)

 

Reference Site

http://dev.classmethod.jp/cloud/aws/bridge-mqtt-and-kinesis/

http://tdoc.info/blog/2014/09/25/mqtt_javascript.html

 

 

 

AUTHOR : Knaka

BLOG : http://knaka0209.blogspot.kr/2015/10/mqtt-1.html

COMMENTS

Please Login to comment
  Subscribe  
Notify of