Silicon Labs
|
Silicon Labs Community Silicon Labs Community
  • Products
    1. 8-bit MCU
    2. 32-bit MCU
    3. Bluetooth
    4. Proprietary
    5. Wi-Fi
    6. Zigbee & Thread
    7. Z-Wave
    8. Interface
    9. Isolation
    10. Power
    11. Sensors
    12. Timing
  • Development Tools
    1. Simplicity Studio
    2. Third Party Tools
  • Expert's Corner
    1. Announcements
    2. Blog
    3. General Interest
    4. Projects
How to Buy
English
  • English
  • 简体中文
  • 日本語
//
Community // Blog

Tech Talks Blog: Z-Wave Software Structure – Command Classes and Reference Code

07/191/2020 | 02:43 PM
Tracy Boyd
Employee

Level 4


In this Tech Talks session, Senior Field Applications Engineer, Carlos Hernandez, describes Z-Wave command class structure and provides reference code examples. Click here to watch the entire session and register now for future Tech Talks. The following is an overview of Carlos’s presentation.

What is Z-Wave?

Z-Wave is a low-power, wireless mesh network communications protocol designed specifically for control, monitoring and status reading applications in residential and light commercial environments.

Z-Wave operates through regional Sub-GHz frequencies, ensuring product interoperability throughout the region. Every product in the Z-Wave ecosystem is interoperable and backward compatible all the way to the first generation.

Any device using Z-Wave must use command class structure, which is the “language of Z-Wave” and is classified in the Z-Wave specification.

Command Class Structure

Z-Wave commands are structured so that the most significant byte is always the “command class”, which is a group of commands that perform a specific function. The next byte is the command itself, such as “Set”, “Get” or “Report”.  The next set of bytes can range in size from 0 to the maximum Z-Wave packet size, which is the payload of 64 minus the header. In the binary switch set command scenario, the third byte is the value itself – either 00 or FF, based on what you want the device to do, such as turn off or on a light.

7

6

5

4

3

2

1

0

Command Class = COMMAND_CLASS_SWITCH_BINARY

Command = SWITCH_BINARY_SET

Value

 

There are four command class types in the Z-Wave realm:

  • Application command class is a group of commands with a specific set of functions. All specific applications have a command class.
  • Management command class allows you to control devices in the network and manage the way devices behave.
  • Encapsulation command class includes commands that encapsulate other commands containing extra information.
  • Network command class allows you to perform network operations such as including and excluding nodes, and preprovisioning nodes into the network.

Most command classes have three types of commands.

  • Set command – the first type of command, allows a controller or gateway to set a specific state variable in another device.
  • Get command – requests spec info from the device. For example, requests the status of a light. The light will respond with an “On” or “Off”.
  • Report command – responds to a Get command type with the state of the variable that was requested. In the example of a light, “On” or “Off”.

For a list of Z-Wave command classes, visit our Z-Wave specification page.

Structure of a Z-Wave End Device

 

Z-Wave end devices are structured in the following order:

  • Bottom layer — Z-Wave module or SoC (currently 700 series)
  • Z-Wave Protocol layer —  precompiled in a set of libraries that you can add to your application to enable your protocol stack.
  • Building block modules (3) — prewritten, pre-certified C code modules that address 90% of development needs. This is the application framework, or Z-Wave “skeleton code”, that all applications are built on.

The Sample Application and Product Specific Code layer sits on top of the application framework. Applications in this layer are pre-written and have undergone the full Z-Wave certification process. This is the best place to start designing your application. By reusing this sample code in your own application, you can significantly reduce your development time.

Getting Started

The first step to building your application is to order our Z-Wave Wireless Starter Kit (WSTK), which contains everything you need to get your project going, including the following:

  • WSTK mainboard
  • Radio board
  • Buttons and LED expansion boards
  • Controller and network sniffer USB sticks

Our Simplicity Studio tools further speed development by providing software examples, demos, sample code and supporting documentation. Using our WSTK, you can develop any Z-Wave application.

For more information on Z-Wave products and development tools, contact your Silicon Labs sales representative.

  • Blog Posts

Tags

  • Wireless
  • High Performance Jitter Attenuators
  • EFR32FG22 Series 2 SoCs
  • EFR32MG21 Series 2 SoCs
  • Security
  • Bluegiga Legacy Modules
  • Zigbee SDK
  • ZigBee and Thread
  • EFR32BG13 Series 1 Modules
  • Internet Infrastructure
  • Sensors
  • Wireless Xpress BGX13
  • Blue Gecko Bluetooth Low Energy SoCs
  • Z-Wave
  • Micrium OS
  • Blog Posts
  • Low Jitter Clock Generators
  • Bluetooth Classic
  • Makers
  • Flex SDK
  • Tips and Tricks
  • timing
  • Smart Cities
  • Smart Homes
  • IoT Heroes
  • Reviews
  • RAIL
  • Simplicity Studio
  • Tiny Gecko
  • EFR32MG22 Series 2 SoCs
  • Mighty Gecko SoCs
  • Timing
  • Temperature Sensors
  • Blue Gecko Bluetooth Low Energy Modules
  • Ultra Low Jitter Clock Generators
  • General Purpose Clock Generators
  • EFR32BG22 Series 2 SoCs
  • Industry 4.0
  • Giant Gecko
  • 32-bit MCUs
  • Bluetooth Low Energy
  • 32-bit MCU SDK
  • Gecko
  • Microcontrollers
  • Jitter Attenuators
  • EFR32BG21 Series 2 SoCs
  • News and Events
  • Wi-Fi
  • Bluetooth SDK
  • Community Spotlight
  • Clock Generators
  • Biometric Sensors
  • General Purpose Jitter Attenuators
  • Giant Gecko S1
  • WF200
  • Flex Gecko
  • Internet of Things
  • 8-bit MCUs
  • Wireless Jitter Attenuators
  • Isolation
  • Powered Devices
  • Power

Top Authors

  • Avatar image Siliconlabs
  • Avatar image Jackie Padgett
  • Avatar image Nari Shin
  • Avatar image lynchtron
  • Avatar image deirdrewalsh
  • Avatar image Lance Looper
  • Avatar image lethawicker

Archives

  • 2016 February
  • 2016 March
  • 2016 April
  • 2016 May
  • 2016 June
  • 2016 July
  • 2016 August
  • 2016 September
  • 2016 October
  • 2016 November
  • 2016 December
  • 2017 January
  • 2017 February
  • 2017 March
  • 2017 April
  • 2017 May
  • 2017 June
  • 2017 July
  • 2017 August
  • 2017 September
  • 2017 October
  • 2017 November
  • 2017 December
  • 2018 January
  • 2018 February
  • 2018 March
  • 2018 April
  • 2018 May
  • 2018 June
  • 2018 July
  • 2018 August
  • 2018 September
  • 2018 October
  • 2018 November
  • 2018 December
  • 2019 January
  • 2019 February
  • 2019 March
  • 2019 April
  • 2019 May
  • 2019 June
  • 2019 July
  • 2019 August
  • 2019 September
  • 2019 October
  • 2019 November
  • 2019 December
  • 2020 January
  • 2020 February
  • 2020 March
  • 2020 April
  • 2020 May
  • 2020 June
  • 2020 July
  • 2020 August
  • 2020 September
  • 2020 October
  • 2020 November
  • 2020 December
  • 2021 January
  • 2021 February
Silicon Labs
Stay Connected With Us
Plug into the latest on Silicon Labs products, including product releases and resources, documentation updates, PCN notifications, upcoming events, and more.
  • About Us
  • Careers
  • Community
  • Contact Us
  • Corporate Responsibility
  • Privacy and Terms
  • Press Room
  • Investor Relations
  • Site Feedback
  • Cookies
Copyright © Silicon Laboratories. All rights reserved.
粤ICP备15107361号
Also of Interest:
  • Bring Your IoT Designs to Life with Smart,...
  • A Guide to IoT Protocols at Works With...
  • IoT Hero Rainus Enhances the In-Store Shopping...