element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog PizzaPi: Rethinking The Connection
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dmrobotix
  • Date Created: 14 May 2015 4:40 AM Date Created
  • Views 452 views
  • Likes 2 likes
  • Comments 0 comments
  • design_challenge
  • pizza_pi
  • sci_fi_your_pi
Related
Recommended

PizzaPi: Rethinking The Connection

dmrobotix
dmrobotix
14 May 2015

The Machine-2-Machine protocol, MQTT, has really forced me to rethink how to organize the whole communication process of this project. MQTT stands for Message Queue Telemetry Transport and is touted as the protocol for the developing world of IoT (Internet of Things). Developed by Andy Stanford-Clark and Arlen Nipper, MQTT has been around since 1999. I heard about it while scouring the Raspberry Pi forum for information on communicating between two Pi's over TCP/IP.

 

Here's what the official website says about MQTT:

 

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. For example, it has been used in sensors communicating to a broker via satellite link, over occasional dial-up connections with healthcare providers, and in a range of home automation and small device scenarios. It is also ideal for mobile applications because of its small size, low power usage, minimised data packets, and efficient distribution of information to one or many receivers.

The central point of MQTT is the broker. The broker is like a base station for communication between sensors and subscribers. From my cursory research I've concluded that the broker really ought to be located on a computer that is robust and well, not running around inside a pizza box. MQTT expects connections to be bad on the endpoints and not as a result of the broker being down. The broker will hang onto the sensor data until connections are reestablished. What this means for PizzaPi is that I need a third dedicated Raspberry Pi server that can be kept safe and sound with a reliable internet connection. There are a number of brokers available but Mosquitto is the only open source version that I've found and it is the one I am running.

 

Here's my updated hardware infrastructure:

image

 

The diagram shows how the various devices/users/subscribers interact with the broker and web server that will run on the kit RPi 2. The customer and pizza store will really only directly interact with the web server while the kit RPi B+ and my original RPi B will interact with the broker. Before, I had intended to have the web server run on RPi 2 which is currently hooked up to the PiFace Control & Display 2. The two RPi's would then communicate directly over TCP and then any end users like the pizza store and customer would get information from RPi 2. Clearly, this leads to reliability problems and only running the PiFace CAD is a waste of the upgraded memory and speed on RPi 2, hence the Pi shuffle.


I'll post again soon, the little GPS light is blinking, reminding that I need to get down to business!

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube