©2015, J.R. Cohen
Jeffrey R. Cohen, P.E.
©2015, J.R. Cohen
IOT Devices and Applications Need to Send
Information to Other Computers
For Logging and Analytics
User Interface
Command and Control
IOT Devices and Apps May Need to Receive
Be Careful! Safety Concerns Here
MQTT is 1:Many Message Protocol
Publisher/Subscriber model
Sender Doesn’t Need to Know Receivers
Open Source Libraries Make the Job Quick
I used Paho (https://eclipse.org/paho/)
©2015, J.R. Cohen
For non-IOT, Memory and Time are Cheap, so
1.Create the Connection
2.Publish the Message
3.Close the Connection
BUT for IOT, Memory and Time May Be Important
** No Dynamic Allocation **
1.Create Connection at Startup
2.Publish Messages During Normal Operation
3.Close Connection at Shutdown
©2015, J.R. Cohen
Simple Blinking LED on Raspberry PI that Publishes
the state of the Output via MQTT
©2015, J.R. Cohen
Notice States
Startup
Normal
Operation
Shutdown
©2015, J.R. Cohen
Not the final versions,
Simplified to show you what to do.
©2015, J.R. Cohen
Twitter: CohenJeffrey
LinkedIn: https://www.linkedin.com/in/JeffreyRCohen

Creating #IOT applications using #MQTT

  • 1.
  • 2.
    ©2015, J.R. Cohen IOTDevices and Applications Need to Send Information to Other Computers For Logging and Analytics User Interface Command and Control IOT Devices and Apps May Need to Receive Be Careful! Safety Concerns Here MQTT is 1:Many Message Protocol Publisher/Subscriber model Sender Doesn’t Need to Know Receivers Open Source Libraries Make the Job Quick I used Paho (https://eclipse.org/paho/)
  • 3.
    ©2015, J.R. Cohen Fornon-IOT, Memory and Time are Cheap, so 1.Create the Connection 2.Publish the Message 3.Close the Connection BUT for IOT, Memory and Time May Be Important ** No Dynamic Allocation ** 1.Create Connection at Startup 2.Publish Messages During Normal Operation 3.Close Connection at Shutdown
  • 4.
    ©2015, J.R. Cohen SimpleBlinking LED on Raspberry PI that Publishes the state of the Output via MQTT
  • 5.
    ©2015, J.R. Cohen NoticeStates Startup Normal Operation Shutdown
  • 6.
    ©2015, J.R. Cohen Notthe final versions, Simplified to show you what to do.
  • 7.
    ©2015, J.R. Cohen Twitter:CohenJeffrey LinkedIn: https://www.linkedin.com/in/JeffreyRCohen