Z Wave vs. Zigbee vs. WiFi | How it Works & Which is Best

Martin

Disclosure: Links marked with * are Affiliate Links. As an Amazon Associate, I earn from qualifying purchases if you decide to make a purchase through these links – at no cost for you!


Measurement, control and regulation in a house or household traditionally take place at a large number of different points and by means of individualized display and control elements. In addition, entertainment media were either kept on a central device such as a television, video recorder, DVD player, etc., or had to be purchased physically several times in unwanted redundancy or licensed as a software product.

Smart Home counters this with an integrating concept. Measurement, control and regulation are condensed into centrally usable user interfaces, supported by hardware and software solutions. Digitalized media can be stored in central pools and used by all residents of the household.

To achieve such densification, devices with network and application interfaces that are as uniform as possible are required. In addition, the networking must be implemented physically; radio networks are suitable here, which do not require the laying and optical coverage of network cables.

The following section will compare the benefits and possible applications of three such concepts based on wireless networks, namely Wi-Fi, ZigBee and Z-Wave.

Since all three candidates are networks and the so-called “Internet of Things” (“IoT”) is in the offing, it is advisable to preface this with a few basic facts about networks in general and Internet protocols.

Networks in general – OSI model and TCP/IP

The Open Systems Interconnection model – OSI reference model or OSI model for short – is the academic gold standard for describing network communication and maps it to seven layers (English designations in brackets):

7. application layer

6. presentation layer

5. session or communication layer (Session Layer)

4. transport layer

3. switching or network layer (Network Layer)

2nd data link layer

1. physical layer, often referred to as “PHY”, although “PHY” in the strict sense means the chip.

In the IEEE 802 Internet standard, which includes Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11) and ZigBee (IEEE 802.15.4), the second OSI layer is again divided into two further layers, namely:

2b) Logical Link Control, (LLC)

and

2a) Media Access Control, (MAC).

In contrast, the TCP/IP reference model gets by with four layers:

4th application layer (according to OSI 5-7)

3rd transport layer (according to OSI 4)

2. internet layer (according to OSI 3)

1. network access layer (according to OSI 1-2)

In the following, OSI layers 1, 2 (including 2a and 2b) and 3 will become particularly important, the latter in the form of TCP/IP, i.e. as Internet layer 2 with the protocols IPv4, IPv6, ICMP and ICMPv6.

The Physical Layer (PHY)

It is quite likely that you have already connected devices with a power cable for Ethernet (IEEE 802.3) – today usually an eight-core copper cable with a jack plug, so-called “twisted pair”.

The OSI 1 layer – physical layer – specifies what should happen electrically on this cable when a bit is transferred from one network node – e.g. your laptop – to another network node – e.g. your Internet modem – and in which order the eight bits of a byte are transferred.

With wireless technologies such as Wi-Fi (IEEE 802.11), there are no electrical signals on copper cables or light pulses on fiber optic cables. Instead, electromagnetic signals are transmitted between antennas. The specification of how a bit is mapped to those signals changes, but the place of the specification in the layer model is the same.

Layer 2a: Media Access Control (MAC)

Your laptop and Internet modem are connected with the cable, one jack plug is connected to the Internet modem, the other jack plug is connected to the laptop or PCMCIA card.

No further addressing would be needed for the two network nodes; the communication partner is at the other end of the cable.

However, since more than two devices can be interconnected in a star configuration via a central hub in an Ethernet segment, the Ethernet standard provides for a higher-order form of addressing and provides a method for handling contention on the segment, known as the carrier-sense multiple access with collision detection (CSMA/CD) method.

The addresses of this level – the MAC addresses – consist of six bytes, thus of 48 bits. The three high-order bytes identify – with one exception that will become important in a moment – the manufacturer of the network card (more precisely: the network chip), the three low-order bytes are the serial number. Together, these 6 bytes uniquely identify the card or the chip worldwide (“globally unique”).

In hexadecimal notation, a MAC address looks like this, for example:

12:34:56:78:9A:BC

12:34:56 would – actually – be a number to be assigned to a manufacturer and 78:9A:BC would be the serial number, “actually” because this special manufacturer ID is not “globally unique”. The bit pattern of the leading hexadecimal number 12 (decimal 18) looks like this:

00010010,

The second-lowest bit is set, which according to IEEE 802 indicates that it is not a globally unique MAC address, but a locally administered one. On a standard network card with a globally unique MAC, this bit would not be set.

This type of addressing enables a node in an Ethernet segment to distinguish whether a data packet – called a frame on this layer – is intended for the node and which node sent it.

Furthermore, switching hubs – hubs with a higher function than simply interconnecting several cable segments – can use this addressing to deliver frames in such a way that nodes not involved in a communication do not even have to examine them. This suppresses unnecessary load on the lines and increases the effective possible data throughput.

Layer 2b: Logical Control (LLC)

Above the MAC layer is the LLC layer, which ensures that a logical data stream is created between sender and receiver from MAC frames and that any frames lost in a communication are resent.

Layer 3 using the TCP/IP network layer as an example

Segments that are homogeneously operated with local network technology are no longer sufficient when it comes to wide-area networking, as is the case with the Internet in particular.

Therefore, a layer exists above OSI layer 2 that abstracts from media such as Ethernet, Wi-Fi, etc. and creates its own logical address space. In the case of the Internet and also many local home and company networks, this is the Internet Protocol IP.

Two versions with separate address spaces are currently in use: IPv4 (the “v” stands for “version”) and IPv6.

IPv4 addresses are four bytes (corresponding to 32 bits) long and are usually represented by decimal bytes separated by dots, e.g.:

192.168.1.1.

IPv6 addresses are not about six bytes long, but 16 bytes (= 128 bits) long and are grouped to hexadecimal represented 16-bit words separated by colons, e.g.:

2001:DB8:0000:0000:0000:0000:0000:1.

Successive zeros can be omitted together with the colons enclosed by the zeros, “2001:DB8::1” is the shortened representation of the same address.

The Internet can be described as a network of nodes that are grouped into subnets. To take this into account and to be able to deliver packets in a structured manner, Internet addresses are therefore divided into addresses with a network part and a so-called host part.

With IPv4, for example, the notation “192.168.1.1/24” means that the computer is host number 1 in the network with the 8-bit wide address space between “192.168.1.0” and “192.168.1.255”, the “/24” (pronounced “slash twenty-four”) indicates that the network portion comprises the leading 24 bits, the host portion accordingly the 32 – 24 = 8 last bits.

The same is true for IPv6 addresses; the host with the address “2001:DB8:123:4567::1/64” is host number 1 in the network with the 64 bit wide address space between “2001:DB8:123:4567:0000:0000:0000” and “2001:DB8:123:4567:FFFF:FFFF:FFFF”. Instead of the “slash” notation, you can also specify IPv4 network part in a notation similar to the addresses themselves. The “/24” can be written as a so-called “netmask”:

255.255.255.0,

Which means that all bits set in the corresponding bit pattern “11111111111111111000000” should belong to the network part.

With IPv6, such a representation is also possible, but is more likely to be found in machine processing than in user programs; the slash notation clearly predominates with IPv6.

Features of IPv6

IPv6 and SLAAC

IPv4 addresses can still be mastered by you, but when manually entering the dauntingly long IPv6 addresses, you can mistype as easily as you like.

Among other things, this is why IPv6 comes in combination with options for automatic configuration. The simplest option is the generation of so-called “Modified EUI-64” addresses, in which a MAC address is combined with the netmask.

From the above described (“locally managed”) MAC address “12:34:56:78:9A:BC” the Modified EUI-64 address “2001:DB8:123:4567::/64” can be generated automatically for the IPv6 network “2001:DB8:123:4567:1034:56FF:FE78:9ABC/64”. The word “FFFE” is inserted between the third and fourth byte of the MAC address and the bit described above is inverted to distinguish between “globally unique” and “locally managed” MAC addresses.

This procedure is simple and can also be done manually, but it has a considerable disadvantage in terms of the privacy of information about a network due to the coding of MAC addresses.

Since the MAC address of the component can be extracted from a Modified EUI-64 address, the manufacturer of the component can be inferred. If information is available about the distribution of serial numbers across delivery tranches, it is even possible to infer the buyer and user of the component in the worst case.

This opens attack vectors for hacking and profiling, so as an addition to the IPv6-specific SLAAC (“Stateless Address Autoconfiguration”) based on hashing algorithms, the possibility was created to assign stable private addresses (“stable privacy addresses”) instead of Modified EUI-64, which hide the hardware identifier.

IPv6 and ICMPv6

IPv6 considerably extends the ICMP (“Internet Control Message Protocol”) known from the IPv4 tools ping and traceroute.

SLACC is based on ICMPv6, functions to determine the state of routers and network neighbors have been added. Overall, IPv6 is well prepared for dynamically changing networks with ICMPv6.

However, the deep dovetailing of IPv6 and ICMPv6 also has the downside that the method commonly used under IPv4 to hide a network topology – suppressing ICMP through firewalls – can prove counterproductive with ICMPv6.

IPv6 and the Internet of Things

In the smart home sector, IoT refers to the use of Internet technology and Internet standards – such as IPv6 – for the functional integration of measurement, control and regulation equipment. Furthermore, the same technology can be used to make resource pools such as multimedia, document and e-mail servers available centrally in the house or household and to use them decentrally.

Due to the heterogeneous hardware structure and different operating times of the integrated devices, IPv6 is the protocol of choice as it is designed for dynamic network configuration; for example, the specification for energy and water, which is important for ZigBee, is based on IPv6.

Three Solutions for Smart Homes

For all three solutions considered here – Wi-Fi, ZigBee and Z-Wave – integration options with web interfaces or apps are available in addition to remote controls, so that control via PC or smartphone is possible in principle.

Differences are found in terms of network topology, transmission frequencies, range, data throughput and distribution of corresponding control modules.

Wi-Fi

Wi-Fi is a certificate for WLAN (“Wireless Local Area Network”) products compatible with the IEEE 802.11 standard and certified by the Wi-Fi Alliance.

The IPv4 and IPv6 Internet protocols can be easily mapped due to the similarity of IEEE 802.11 frames and Ethernet frames, thus also IoT technologies, including those for smart homes.

The frequencies for Wi-Fi are in the 2.4, 3.6, 5, and 6 GHz bands, and the bandwidth increased from 1-2 Mbps in the 2.4 GHz band under the 1997 standard, also known as “Wi-Fi 0,” to the 2020 Wi-Fi 6E standard with up to over 9Gbps in the 6 GHz band.

The topology of Wi-Fi is star-shaped, with end devices connecting to a central node, often referred to as an “access point.”

In the case of signals on copper cables or optical fibers, housing the cables in locked premises protects against direct physical access to the signals by third parties. In the case of radio signals, this is not possible for physical reasons, so that other measures are required to establish protected communication between the end device and the access point.

Furthermore, the access point must be protected from use by unauthorized end devices, otherwise attackers could gain access to and misuse both end devices and possibly a connection to the Internet offered by the access point.

To protect communication from eavesdropping, communication between the hub and the end device is encrypted using Advanced Encryption Standard (AES) cryptography. The keys required for this are defined during authentication with the access point. In the home user environment, this is done using Wi-Fi Protected Access (WPA, today usually WPA2 or WPA3), which is a simplified version of Wi-Fi Protected Setup (WPS) using a PIN and – often manually operated – switches to establish the connection.

Operating the smart home via Wi-Fi and, building on this, from the controller to the end device using the IPv6 Internet protocol is an obvious possibility because of the immensely large address space offered by a single /64 IPv6 subnet – 2^64, i.e. around 1.8*10^19 addresses. The network technology is in continuous use worldwide on the Internet, the chips for it are mass-produced, and the interfaces are standardized.

On the other hand, the Internet was created as a worldwide communications network with redundant paths between end points of a communication, not to enable the most secure possible communication with one or a few end devices for one or a few users at a time. All security mechanisms on the path between devices are therefore to be seen as additions to the protocol.

ZigBee

ZigBee is a specification for short-range use between a control or sensor module and a router, an application of the IEEE 802.15.4 standard. The name “ZigBee” comes from the flight pattern of bees.

The transmission frequency for ZigBee is generally in the ISM (industrial, scientific, medical) 2.4 GHz range, which is also used by Wi-Fi. The data rate is up to 250 kbit/s. Apart from the Wi-Fi band, there are variants with 784 MHz, 868 MHz and 915 MHz, of which the 868 MHz variant with a maximum of 20 kbit/s is the most important in Europe.

The indoor range is 10-20 meters in the 2.4 GHz band, and up to 100 meters outdoors with a clear line of sight.

The topology of ZigBee is locally star-shaped with a so-called “router” as the center. Routers, in turn, can be interconnected to form trees or general graphs called “mesh”.

A ZigBee End Device (“ZED”) is a component that only controls and/or measures and does not have a higher active role in the network. The component logs on to a ZigBee router.

A ZigBee router (ZR) is the root of a network segment. If the router is the only one in the network, the resulting topology is star-shaped. Several routers can interconnect to form a tree – each router has only one parent router – or a mesh.

A ZigBee Coordinator (“ZC”) is a router that can perform the task of starting the network.

The ZigBee specification for energy and water (“ZigBee Smart Energy”), which is important for smart homes, is based on IPv6. This in turn is operated by means of 6LoWPAN (“IPv6 over Low-Power Wireless Personal Area Networks”) via IEEE 802.15.4.

ZigBee uses 128-bit encryption down to the MAC level, besides individual connections can be encrypted separately.

Z-Wave

Z-Wave is a protocol developed specifically for smart homes and managed by the Z-Wave Alliance, a manufacturer association. The MAC and PHY network layers are standardized as ITU 9959 radio.

The transmission frequency is internationally between 850 MHz and 950 MHz, in Europe the frequencies 868.40 MHz, 868.42 MHz and 869.85 MHz are used.

The indoor range of Z-Wave devices is 30-40 meters, up to 100 meters, depending on the chp set, at data rates of 100 kbit/s, 40 kbit/s and 9.6 kbit/s.

The topology is meshed; in principle, any device can communicate with any device across any device within the radio range. All active devices function as routers. Up to four routers can be involved in a logical end-to-end connection between two devices.

The addresses of Z-Wave networks (“Network ID”), have a length of 32 bits. In addition, there is a node ID with a length of 8 bits. For devices, 232 of the theoretically possible 256 with 8-bit address length can be used, several such segments can be interconnected via bridges.

The disadvantage of Z-Wave is the low data throughput compared to Wi-Fi and ZeeBee. Z-Wave is optimized for short measurement and control signals, not for high throughput or high latency.

Related questions

Do all IoT devices always have to be directly accessible from the Internet?

No. This is a misunderstanding that can be explained by the appearance of the term “Internet” in “IoT”. The network nodes must be reachable in accordance with the network topology, but no node would have to permanently pass Internet traffic from outside to them without a special reason lying in the device.

So I can’t control and monitor my smart home from the Internet after all?

Yes, if a node with the corresponding functionality can be reached via WWW or smartphone app, for example. Of course, security must be taken into account – strong passwords, hard end-to-end encryption, etc.

Conclusion

Wi-Fi makes high bandwidths possible and is indispensable in homes and households with wireless Internet connections from PCs and smartphones anyway. However, decoupling the smart home from incoming Internet traffic, as outlined in the question on IoT and Internet, requires knowledge of network technology that is well beyond the scope of the in-depth outline in this article.

Z-Wave operates away from the crowded 2.4 GHz band and is well suited for reliably transmitting small packets of measurement results and control commands. However, the bandwidth is too low for large data volumes. However, the indoor range of 30-40 meters is very large and can be extended by up to 4 hops between two nodes.

ZigBee uses like the 2.4 GHz band in which many Wi-Fi devices operate. However, the method of using Zigbee applications via an IPv6 layer with a substructure from the ZigBee network is very interesting and, in the opinion of the author of this article, could be forward-looking.

Overall, a coexistence of Wi-Fi and Z-Wave or ZeeBee seems to make perfect sense, but how the decision actually turns out depends – as so often – on the available modules and applications.


Attention: When installing electronic equipment, please be sure to observe the manufacturer’s safety instructions. You have to take care of your own safety. The information on this site only helps you to learn.
Disclosure: This website is the property of Martin Lütkemeyer and is operated by Martin Lütkemeyer. Martin Lütkemeyer is a member of the Amazon Services LLC Affiliate Program, an affiliate advertising program designed to enable Web sites to earn advertising revenue through advertising and linking to Amazon.com. Links marked with * are affiliate links.