knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.82k stars 1.47k forks source link

What about Zigbee? #26

Closed thekarlmiller closed 9 years ago

thekarlmiller commented 10 years ago

Have you considered support for a Zigbee messaging transport for MQTT? This would be assuming a 6lowpan implementation in the mix (I imagine) - I haven't really done the homework, but can see a MQTT-based BUS (maybe even with Mule) as a very useful application platform, especially if you can connect anything with an arduino and a zigbee radio on it to the bus for events and commands.

Thanks, Karl Miller

knolleary commented 10 years ago

As I wrote in response to the comment on my blog:

MQTT is principally a TCP-based protocol, hence the focus there.

The transport layer used by the client is pluggable; the constructor takes an implementation of Client.h which provides a common interface with connect/read/write type methods. If someone produced an implementation of Client.h that worked with ZigBee, then it could be passed straight into the PubSubClient constructor and it ought to Just Work.

Creating a ZigBee Client.h implementation is not scope for this project.

thekarlmiller commented 10 years ago

Thanks for the quick reply. The reason why I like this marriage of zigbee with mqtt is because of this; http://blogs.mulesoft.org/raspberry-pi-gets-an-api/

If you consider the benefit of a IoT BUS that extends out to Arduinos with inexpensive (and even battery operated) xbee radios, then you have some pretty flexible controller options - think OpenHAB.

I just might take a whack at the zigbee client.h and will keep you updated.

Otherwise, does the concept make sense (assuming the zigbee messages get ultimately routed to an IP network)? Thanks, Karl On Oct 23, 2013 4:24 PM, "knolleary" notifications@github.com wrote:

As I wrote in response to the comment on my blog:

MQTT is principally a TCP-based protocol, hence the focus there.

The transport layer used by the client is pluggable; the constructor takes an implementation of Client.h which provides a common interface with connect/read/write type methods. If someone produced an implementation of Client.hhttps://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/Client.hthat worked with ZigBee, then it could be passed straight into the PubSubClient constructor and it ought to Just Work.

Creating a ZigBee Client.h implementation is not scope for this project.

— Reply to this email directly or view it on GitHubhttps://github.com/knolleary/pubsubclient/issues/26#issuecomment-26942270 .

knolleary commented 10 years ago

Indeed it does make sense - that's what a lot of us are already doing.

If you haven't already, you should take a look at my other project Node-RED.

Flori1989 commented 10 years ago

For message transport over Zigbee I would recommend the MQTT-SN protocol which has been specially developed for wireless networks without TCP/IP.

MQTT-SN Implementation for Zigbee