[ale] Z-Wave or ZigBee

Alex Carver agcarver+ale at acarver.net
Wed Aug 5 10:29:10 EDT 2015


On 2015-08-05 06:06, Chris Fowler wrote:
> ----- Original Message -----
> 
>> From: "Alex Carver" <agcarver+ale at acarver.net>
>> To: ale at ale.org
>> Sent: Tuesday, August 4, 2015 8:08:09 PM
>> Subject: Re: [ale] Z-Wave or ZigBee
> 
>> Yep, same idea as the Spark Fun versions of the board. However,
>> remember there's a TTL UART already on the IO header of the RasPi if you
>> haven't used it already. You can wire that right to an XBee.
> 
> I have plenty of Pis and BeagleBone Blacks. Okay, ZigBee is simply architecture for IoT that can do automation. I had known about IoT, but I 
> am confusing ZigBee for only being for automation. Automation is just a sample application of IoT. I found some outlet plugs on eBay that support it. 
> 
> I like the idea of the ethernet gateway. The ZB devices can simply be on their own subnet. Are there any support for this gateway architecture in Linux, or am I restricted to a device like what Digi has created? 
> 
> Chris 

Yes, Zigbee is all about local networks for a variety of tasks not just
home automation.  You could put sensors, controls, or communication
bridges in the Zigbee network (e.g. a very low speed wireless serial
link between two devices).  Since it is a mesh or star topology it is
slow so the data frames are kept small.  It's great for passing around
tiny packets of data (a sensor reading, a switch command) and a little
less for serial data but still possible (e.g. reprogramming settings in
a microcontroller device like a thermostat)

The gateway is pure TCP/IP so it's going to be OS agnostic.  You talk to
the gateway over its Ethernet port and the gateway connects to the
Zigbee mesh on its RF port and provides you an in-road to the Zigbee
network.  Zigbee meshes are not normal networks so there's no subnet.
It is based on  802.15.4 at Layer 1  (Zigbee is Layer 2 and above) so it
is a MAC/serial number based mesh network, no IP addresses.

If you use a dongle instead of the gateway you achieve the same goal,
it's an inroad to the mesh network but in both cases it requires the
assistance of the dongle or gateway which can act like a master node
(the "Coordinator").  The Coordinator collects information about the
state of the network (what nodes have advertised their presence, first
hop to any particular node, etc.)  It must run a specialized version of
firmware to give it the coordinator status.  The rest of the devices use
use lower capability firmware (Full Function Device or Reduced Function
Device) and learn what is around them and build up their own routing
tables.  An FFD can do a packet store and forward and can act as a
middle node in the mesh but an RFD can only be an end node.  RFDs use
less power than FFDs because an RFD can sleep frequently.  FFDs must be
awake almost constantly to handle routing of packets between more
distant nodes.

Also do watch out that there's a Zigbee and Zigbee PRO set of protocols.
 They will interoperate but a Zigbee network will force PRO devices to
be endpoints and a PRO network will force standard devices to be
endpoints.  The routing system is different between the two protocols so
a wrong-protocol device can't participate in the intermediate nodes.  On
top of each device protocol is the additional "profile" which could be
Home Automation, Control, Security,m etc. which defines what sorts of
data and inputs are exposed by the device (e.g. a light bulb as a member
of the LightLink profile exposes on/off, perhaps bright/dim and maybe
color like the Hue but does not expose a sensor or a serial port since
those would be members of a Sensor or Data profile;  this is similar to
the concept of Bluetooth stacks/profiles).

As an example, the Philips Hue bulbs use Zigbee for their communication
network.  The starter kit has an Ethernet gateway but the Zigbee layer
is abstracted away a little by their gateway (the gateway only responds
to REST HTTP commands).  It doesn't offer lower level communication like
the Digi gateway or dongle would.


More information about the Ale mailing list