MQTT (MQ Telemetry Transport)

I’ve been pondering the thought of having all my Imps (and other bespoke solutions) talking back to my own custom-built home automation system (which supports the ZeroMQ pub/sub architecture). I’d like to support MQTT (http://mqtt.org), or it’s smaller cousin MQTT-SN (Sensor Networks), but there’s a huge hurdle with the Imp in that I need to be able to set up a TCP/IP session, but the Agent only supports HTTP requests. Are there any plans to provide functionality to allow TCP/IP session establishment ?

Yes, I could build a HTTP -> MQTT gateway (as suggested in MQTT-SN), but I’m looking to avoid that. The state machine for MQTT is fairly trivial so implementation wouldn’t be so bad in Squirrel.

This has been suggested before, and is in theory possible, but it’s a long way down the list unless a commercial user asks for it - and none have as of yet.

@davedotnet this is the previous conversation :-

http://forums.electricimp.com/discussion/comment/8252

I guess the issue for the Imp team with IOT interconnectivity solutions is that there are many of these clouds in the sky!

@back_ache appreciate the forum link.

Just to be clear, I wasn’t looking for ‘cloud’ support, or even MQTT support, just the ability to create TCP/IP sessions, eg open/bind, write, write, write, read, read, close.

Presumably Hugo, you’re reference to ‘way down the list of things to do’ was the TCP/IP aspect, not the ‘cloud’ or MQTT.

As we’ve said before, there will not be local TCP stack access on the device. That’s not the point of an imp.

Outbound raw socket creation on the agent may be available at some point once we’ve worked out how to ensure people don’t abuse it (eg: locking down outbound port numbers, etc) - an MQTT API is likely to come first. Inbound is a lot tricker as it means we’d have to have large pools of listening sockets, one for every agent, or a way to request an ephemeral listener and get its details.

@DaveDotNet perhaps this will help

A http mqtt bridge written in ruby


http://eclipse.mqttbridge.com/

@Hugo - Understood. Makes sense to put it on the Agent

@back_ache - Thanks for the links. I had a look at those but I just wanted to avoid bridges altogether. The HTTP element of the bridges doesn’t conform to any MQTT specification, so wanted to avoid that also. So, perhaps I’ll just go REST straight from the Agent to/from my system.

Hello!

I got my first Imp yesterday and while i’m rather impressed with the whole box, i too would very much appreciate MQTT support on the Imp, to my MQTT broker on my LAN.

~rL