Mosquitto is an open source (BSD licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "machine to machine" messaging such as with low power sensors or mobile devices. A good example of this is all of the work that Andy Stanford-Clark (one of the originators of MQTT) has done in home monitoring and automation with his twittering house and twittering ferry. Andy gave a talk on this at OggCamp that explains a bit about MQTT and how he uses it. The slides and audio are available online at slideshare.

See also related links.

Challenge: Web based MQTT graphing

Thanks to a data feed courtesy of an IBM broker, test.mosquitto.org now publishes information on energy generation and demand in the UK (in the energy/ topic tree). I think this could be used as a great demonstration for coupling MQTT and the web.

The challenge

Create a web based report that takes energy data from the broker over MQTT and displays it in interesting and useful ways. Alternatively, an Android/iPhone app would be ok, but web based is the preferred option.

The rules

There are no rules really. Having said that, I’d be most pleased if the end result was something that other people could learn from. There are bonus points for solutions that work where a web proxy is the only internet access. If you want to use new or unusual technologies that’s fine.

The prize

I’m afraid there is no tangible prize – I hope you’ll be content with your work being shown here and the respect of your peers.

Some suggestions

Google charts is definitely worth looking at for generating the actual graphs. Some examples of what you might show are:

  • Pie chart of generation source
  • Gauge of current mains frequency
  • Historical graph of electricity export amount

I look forward to any and all responses!

Version 0.14.4 released

This is a bugfix release:

  • Fix local bridge notification messages.
  • Fix return values for more internal library calls.
  • Fix incorrect out of memory checks in library and broker.
  • Never time out local bridge connections.

Mosquitto Test Server

A publicly accessible Mosquitto server is now available to use. Details are at http://test.mosquitto.org/

Do you use MQTT?

I saw this in the nanode irc channel:

I’ve never seen any real world projects with MQTT… it looks good though.

So I’m looking for real world projects that use MQTT. If you’ve got a project it’d be great if you could mention it in the comments. A short sentence on what it does and how many clients you run on it – really anything you can say. If it’s a secret please still comment if you can, just be very very vague. If you’ve got a blog post describing it, link that instead. I’m interested in everything from a single temperature sensor reporting to a computer up to millions of mobile users.

Thanks!

MQTT on Nanode

Nanode, the popular arduino-with-ethernet board started early in 2011 is ideal for small MQTT based projects but has so far lacked an implementation of MQTT.

Nick O’Leary, the author of the original Arduino MQTT client, has created a Nanode implementation, but it isn’t quite ready for the public.

Nicholas Humfrey has made public some code at https://github.com/njh/NanodeMQTT that he says “still needs some work” but supports publishing QoS 0 messages of up to 127 bytes long and subscribing to topics with QoS 0.

 

Version 0.14.3 released

This is a bugfix release.

  • Fix potential crash when client connects with an invalid CONNECT packet.
  • Fix incorrect invalid socket comparison on Windows.
  • Server shouldn’t crash when a message is published to foo/ when a subscription to foo/# exists (bug #901697).
  • SO_REUSEADDR doesn’t work the same on Windows, so don’t use it.
  • Cygwin builds now support Windows service features.
  • Fix $SYS/broker/bytes/sent reporting.

 

Version 0.14.2 released

This is a bugfix release:

  • Add uninstall target for libs.
  • Don’t try to write packet whilst in a callback.

Version 0.14.1 released

This is a bugfix release.

  • Fix Python syntax errors (bug #891673).

Version 0.14 released

This is a fairly minor feature release. The major changes are the pattern matching ACL support, the support for running directly as a Windows service and the change to the network code to attempt to send packets immediately. The Windows binary is now supplied as an installer rather than a zip file.

  • Add support for matching ACLs based on client id and username.
  • Add a Windows installer file (NSIS based).
  • Add native support for running the broker as a Windows service. This is the default when installed using the new installer.
  • Fix client count for listeners. When clients disconnect, decrement the count. Allow max_connections to work again.
  • Attempt to send all packets immediately upon being queued. This will result in more immediate network communication in many cases.
  • Log IP address when reporting CONNACK packets if the client id isn’t yet known.
  • Fix payload length calculation in python will_set function.
  • Fix Python publish and will_set functions for payload=None.
  • Fix keepalive value being lost when reconnecting a client (bug #880863).
  • Persistence file writing now uses portable file functions, so the Cygwin broker build should no longer be necessary.
  • Duplicate code between the client and broker side has been reduced.
  • Queued messages for clients reconnecting with clean_session=false set were not being sent until the next message for that client was received. This has been fixed (bug #890724).
  • Fix subscriptions to # incorrectly matching against topics beginning with /

New Linux repositories

I’ve just added some more Linux repositories to the download page for Fedora 16 and SLE 10, 11 and 11 SP1.

Note that mosquitto-python isn’t available on SLE 10.