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
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
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
COMMENTS