UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Silicon Labs' compact and cost-effective smart outlet reference design is based on the Zigbee 3.0 standard and can be used in conjunction with a Zigbee 3.0 home automation system. This reference design kit features Silicon Labs' EFR32MG1P232F256GM48 (RD-0051-0201) or EFR32MG12P432F1024GM48 (RD-0100-0201) Wireless Microcontroller (MCU), the Si7021 temperature and relative humidity sensor, and the Si1141 ambient light sensor. KEY POINTS * Quick start demonstration * Recommended next steps * Kit overview * Device operation * Hardware and firmware considerations * Ecosystem considerations * Engineering and manufacturing testing This document contains instructions and guidelines for the following: a quick-start demonstration and next steps, system overview and operations, hardware, firmware and ecosystem considerations, and engineering and manufacturing testing. This guide applies to EmberZNet PRO 6.0 and later. The reference design comes preprogrammed with the Zigbee Z3SmartOutlet sample application and is fully functional out of the box. All hardware design files are available within Simplicity Studio, Zigbee firmware application source code is available within the EmberZNet PRO stack, and Thread firmware application source is available within the Thread stack. Access to Zigbee and Thread stacks is available after purchasing and registering a wireless starter kit such as the SLWSTK6000B. Additional information about acquiring a wireless starter kit is available at: https://www.silabs.com/products/ development-tools/wireless/mesh-networking/mighty-gecko-starter-kit. A wireless starter kit mainboard (sold separately) and SLSDA001A Simplicity debug adapter board (included in the reference design kits after December, 2017, and also sold separately) are required to program the reference design. Additional information about acquiring the SLSDA001A Simplicity debug adapter board is available at: https://www.silabs.com/ products/development-tools/mcu/32-bit/simplicity-debug-adapter-board. The Smart Outlet RD-0100-0201 may be reprogrammed with the Smart Outlet sample application from the Thread 2.4 stack and later. While this document is specific to the Zigbee function, efforts have been made to achieve functional parity. Future versions of this document will discuss Thread functionality in detail. silabs.com | Building a more connected world. Rev. 0.2 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Introduction 1. Introduction There is an increasing desire in the market for a standards-driven, low-cost, and low-power wireless home automation system. For many entrant systems a smart outlet is usually employed to remotely activate and deactivate the source power feeding into room lamps, personal fans, and consumer electronics. In addition to home automation, consumers are employing an array of low-cost sensors to further enhance their home automation's autonomous behavior. Silicon Labs has developed a compact and cost-effective smart outlet reference design targeted at these applications. This reference design kit features Silicon Labs' EFR32MG1P232F256GM48 (RD-0051-0201) or EFR32MG12P432F1024GM48 (RD-0100-0201) Wireless Microcontroller (MCU), the Si7021 temperature and relative humidity sensor, and the Si1141 ambient light sensor. The outlet also features voltage, current, and power measurement capability, as well as current and thermal overload shutdown features. The reference design can be directly integrated into a connected Zigbee home automation application, as shown in the figure below. Figure 1.1. Zigbee Smart Outlet Reference Design Figure 1.2. Zigbee Home Automation with Smart Outlets silabs.com | Building a more connected world. Rev. 0.2 | 2 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Quick Start Demonstration 2. Quick Start Demonstration The Zigbee Outlet Reference Design can be demonstrated as part of a Zigbee network. All Zigbee networks must have one device, such as a gateway, that plays the role of coordinator and allows commissioning of new devices on the network. Other Zigbee devices may be present in order to evaluate interoperability with the reference design. An example Zigbee network is shown in the figure below. Figure 2.1. Example Zigbee Network 1. Set up an Zigbee 3.0 gateway. 2. Supply power to the Zigbee Smart Outlet. a. Ensure the reference design is connected to a main power source. Note that the outlet power supply is rated to 240 VAC, however, the North American plug is rated to 120 VAC. b. The reference design is powered when the green LED momentarily flashes at least once. 3. Connect the Zigbee Smart Outlet to the Zigbee network. a. Follow the directions provided with the Zigbee gateway to enable the smart outlet reference design to join its Zigbee network. b. Depress and hold external front button for more than three seconds, then release to begin the network join procedure. c. The outlet has joined the Zigbee network when the green LED blinks six times. 4. Demonstrate Zigbee Smart Outlet functionality. a. Send an "on" command from the gateway to the smart outlet. This should cause an audible click to occur (from the internal relay), the red LED will blink once and power will be applied to the front female plug outlet. b. Send an "off" command from the gateway to the smart outlet. This should cause an audible click to occur (from the internal relay), the red LED will blink once and power will be removed to the front female plug outlet. c. To manually provide or remove power from the female front outlet, hold the front button for more than half a second, but less than two seconds to toggle between states. d. If supported by the gateway, the on-board sensors on the reference design can be viewed by the user interface of the gateway. silabs.com | Building a more connected world. Rev. 0.2 | 3 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Recommended Next Steps 3. Recommended Next Steps 3.1 Evaluate the Smart Outlet The Zigbee smart outlet reference design can support most smart power outlet application requirements. Typical areas of evaluation include: 1. Zigbee network behavior, such as network join and leave. 2. Deploying on-off commands remotely. 3. Measuring energy consumption of the controlled load. 4. Monitoring ambient temperature, humidity, and ambient light. 5. RF performance, such as range. 3.2 Evaluate the Firmware If firmware modification is needed to support your application: 1. Visit the Zigbee Getting Started page and order an EFR32 Mighty Gecko starter kit. 2. Refer to Section 7. Firmware of this document. 3.3 Build Proof of Concept Out of the box, the smart outlet reference design can be used for a rapid proof of concept. One can demonstrate the look, feel, and function of a final product. Refer to Section 7. Firmware to change functional behavior, such as LED blinking or button functionality. 3.4 System Integration Section 6. Hardware of this document describes the considerations for integrating the reference design into a typical application. Often the reference design can be designed into a system without modification. In cases where a change is required, the hardware section of this document also offers modification guidelines. 3.5 Engineering and Manufacturing Tests Section 9. Engineering Tests of this document provides engineering test information for UL, FCC and Zigbee 3.0 Section 10. Manufacturing Tests of this document offers considerations for simplified manufacturing tests. 3.6 Manufacturing Please contact Silicon Labs to access our manufacturing partner network for the reference design, or a modified version of the design. silabs.com | Building a more connected world. Rev. 0.2 | 4 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Overview 4. Overview 4.1 Part Numbers The part number convention is RD-XXXX-YYYY, where: RD Reference Design XXXX Reference Design Number YYYY Reference Design Component This document will use the reference design number (RD-XXXX) when describing the complete design, and the reference design component (RD-XXXX-YYYY) when describing a specific component. The following table provides a description and PCB marking for each part number. Note: Some cases lack sufficient space on the PCB, and an internal "IST" marking appears on the PCB instead of the "RD" part number. Table 4.1. Part Numbers and Description Part Number PCB Marking RD-0100-0201 NA RD-0100-0101 IST-A0081 rev 2.0 (Power Board) Description Zigbee Smart Outlet Reference Design Kit with North America plug using EFR32MG12P432F1024GM48, Si7021, Si1141 and PCB Antenna. Zigbee Smart Outlet Reference Design Evaluation Board with North America plug using EFR32MG12P432F1024GM48, Si7021, Si1141 and PCB Antenna. IST-A0100 rev 1.0 (Radio Board) IST-A0075 rev 2.0 (Sensor Board) RD-0051-0201 NA RD-0051-0101 IST-A0081 rev 2.0 (Power Board) Zigbee Smart Outlet Reference Design Kit with North America plug using EFR32MG1P232F256GM48, Si7021, Si1141 and PCB Antenna. Zigbee Smart Outlet Reference Design Evaluation Board with North America plug using EFR32MG1P232F256GM48, Si7021, Si1141 and PCB Antenna. IST-A0074 rev 4.0 (Radio Board) IST-A0075 rev 2.0 (Sensor Board) 4.2 ZigBee Smart Outlet Reference Design Kit Kit Contents: * Zigbee smart outlet reference design RD-0051-0101 or RD-0100-0201. * SLSDA001A Simplicity debug adapter board (from December 2017). * RD-0091-0201 isolated debug adapter (from December 2017). * Quick start card to obtain the latest reference design collateral. silabs.com | Building a more connected world. Rev. 0.2 | 5 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Overview 4.3 Zigbee Smart Outlet Reference Design This reference design contains many features for the evaluation of a smart outlet, including the following: Table 4.2. Zigbee Smart Outlet Reference Design Features Reference Design Features 15 A power relay Energy monitoring circuit Temperature and relative humidity sensor Benefit Allows for power control of most household electronic products. Provides power, voltage and current status of a device being powered by the reference design. Provides room environmental sensing capability. Ambient light sensor Provides room lighting status information in proximity to the reference design. Network status LED Provides feedback on the RF network status. Power status LED 10-pin Mini Simplicity Connector Provides feedback on the power circuitry. Facilitates Zigbee packet trace and debugging. User button Eases network commissioning (join/leave) and manual power override. Test points Simplifies hardware-level debugging. 4.4 Hardware Features The smart outlet hardware reference design contains the following features: * Silicon Labs EFR32MG1P232F256GM48 or EFR32MG1P432F1024GM48: * 32-bit ARM(R) Cortex -M4 with DSP and FPU * 2.4-GHz IEEE 802.15.4-2003 transceiver & lower MAC. * Hardware Cryptographic Acceleration for AES 128/256, SHA-1, SHA-2 (SHA-224 and SHA-256) and ECC. * 256 kB user programmable flash with 64 kB RAM (EFR32MG1P232F256GM48) or * 1024 kB user programmable flash with 256 kB RAM (EFR32MG12P432F1024GM48) * Flexible ADC, UART/SPI/I2C serial communications, and general-purpose timers. * Highly efficient Thumb-2 instruction set. * Silicon Labs Si7021 relative humidity and temperature sensor: * Temperature sensor accuracy: 0.4 C * Humidity sensor accuracy: 3% RH * I2C interface * Silicon Labs Si1141 ambient light sensor: * Ambient light sensor range: 1 to 128 kilo lux * I2C interface * Additional hardware features: * Integrated PCB antenna. * Energy monitoring device * Full packet trace port for RF communications debugging. * Pushbutton for manual on-off power and network join. * Green Network/status LED. * Red power status LED. * Fully qualified BOM for 0 to 55 C operation. * Pre-certified FCC Part 15. * Pre-certified UL. silabs.com | Building a more connected world. Rev. 0.2 | 6 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Overview 4.5 Firmware Features The reference design firmware application contains the following features: * Pre-compiled and source application firmware. * Over-the-Air (OTA) upgradable. * Zigbee 3.0 pre-certifiable clusters: Basic, Identify, On/Off, Metering, Temperature Measurement, Electrical Measurement, Diagnostics, and OTA Cluster. silabs.com | Building a more connected world. Rev. 0.2 | 7 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Operation 5. Operation Three types of button presses are defined. A short button press is less than 500ms, a medium button press is 500ms to 2 seconds, and a long press is greater than 3 seconds. In cases where more than one short button press is required, there may be no more than two seconds between each press. 5.1 Outlet Behavior 5.1.1 Remote Control The Zigbee smart outlet reference design utilizes a 15 A controllable relay to manually or remotely toggle power to a device connected to the front female outlet of the device. If it receives an "on" command from the gateway, it will close the relay contact to supply power to the load. If it receives an "off" command from the gateway, it will open the relay contact to prevent power to the load. When the outlet changes state from off to on, the red LED will turn on for one second. When the outlet changes state from on to off, the red LED will turn on for 250 ms. 5.1.2 Manual Control The state of the outlet may be toggled with medium press of the button. When the outlet changes state from off to on, the red LED will turn on for one second. When the outlet changes state from on to off, the red LED will turn on for 250 ms. 5.1.3 Overload Protection and Indication The switch features current and thermal overload protection and indication. If current or thermal overload is detected, the outlet will disa- ble power. For current overload indication, the red LED will blink 250 ms on and 750 ms off, for two minutes. For thermal overload indication, the red LED will blink 250 ms on and 250 ms off, for two minutes. If the overload condition is still present after the two minute indication, the cycle will repeat. 5.1.4 AC Power Sensing and Energy Measurements The reference design uses a Cirrus Logic CS5463 power/energy IC is used to measure various attributes of the mains power input. While the device provides an array of attributes, the following data is collected by this reference design as they are relevant for a lowcost, smart outlet: * RMS Voltage * RMS Current * Active Power * AC Alarms Mask * AC Voltage Overload * AC Current Overload * AC Active Power Overload silabs.com | Building a more connected world. Rev. 0.2 | 8 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Operation 5.2 Zigbee Network Behavior This section describes the various operational states that the design can occupy as it joins and leaves a Zigbee network. The input mechanism for operation utilizes the external push button. The green LED and red LED operates as output signaling information as the reference design traverses or occupies a functional state. Figure 5.1. Device Operation State Diagram 5.2.1 Power-up After the hardware has been powered for the first time, the device will be in a factory default mode and will be placed in the ACTIVE NTWK SEARCH state. If the reference design successfully joins a network and is powered off at a later time, upon re-powering, it will return to the ON NETWORK state. 5.2.2 OFF NETWORK State In this state, the reference design is not connected to a network and is not searching for a network. If the button is long-pressed or short-pressed, the reference design will move to the ACTIVE NTWK SEARCH state. 5.2.3 ACTIVE NTWK SEARCH State In this state, the reference design is actively searching for a network. The green LED will flash once per two seconds in this state. The process of searching for a network will repeat for three different security keys: an install code derived preconfigured link key, default global trust center link key and a distributed security global link key. If the process has repeated 20 times without finding a network, the reference design will move to the OFF NETWORK state. If a network is found, the reference design will enter the NETWORK JOIN state. silabs.com | Building a more connected world. Rev. 0.2 | 9 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Operation 5.2.4 NETWORK JOIN State In this state, the reference design will attempt to join the network with the security key selected in the ACTIVE NTWK SEARCH state. If joining the network is successful, the green LED will flash six times in three seconds and the reference design will move to the ON NETWORK state. If joining is not successful, the reference design will move to the ACTIVE NTWK SEARCH state. 5.2.5 ON-NETWORK State In this state, the reference design is connected to a Zigbee network and is not searching for another network. If power to the reference design is removed and later restored, the reference design will not seek other networks unless the user forces it to leave its joined network. If the button is short-pressed once for more than three seconds, the reference design will enter the LEAVE NETWORK state. If the button is short-pressed two times, the reference design will temporarily enter the IDENTIFY state while remaining on its joined network. If the button is short-pressed three times, the reference design will temporarily enter the NETWORK STATUS state while remaining on its joined network. If the button is short-pressed five times, the reference design will enter the SEND IDENTIFY state. If the button is short-pressed six times, the reference design will enter the FINDING AND BINDING state. 5.2.6 IDENTIFY State This state has two purposes. The first purpose is to support EZ Mode finding and binding, whereby the reference design becomes discoverable by other devices on the network as a candidate for pairing. The second purpose of this state is to help an installer (or user) identify which device is communicated to by visually flashing the green LED in a specified pattern to locate the targeted device. In this state, the green LED will flash twice every two seconds for a default three minutes. This value can be changed by modifying the IDENTIFY time in the IDENTIFY cluster. While in this state, the device will continue to send reports as previously configured. If the button is short-pressed two times or the timer expires, the reference design will return to the ON NETWORK state. If the button is long-pressed one time, the reference design will enter the LEAVE NETWORK state. 5.2.7 NETWORK STATUS State The purpose of this state is to help an installer (or user) to identify if a device is successfully connected to a network. In this state, the green LED will flash six times in three seconds and return to the ON NETWORK state. 5.2.8 SEND IDENTIFY State In this state, the reference design will send an identify request to all devices to which it is bound so that they will enter identify mode. It will move to the ON NETWORK state after sending the identify request. 5.2.9 FINDING AND BINDING State In this state, the reference design will start a finding and binding procedure as an initiator. During this process, the reference design searches for identifying target devices and if one is found, the reference design will bind any matching clusters between itself and the target devices. If the binding completes, the reference design will return to the ON NETWORK state. If the button is long-pressed one time, the reference design will enter the LEAVE NETWORK state. 5.2.10 LEAVE NETWORK State In this state, the reference design leaves the network and flashes the green LED three times in three seconds. It will then move to the ACTIVE NTWK SEARCH state. silabs.com | Building a more connected world. Rev. 0.2 | 10 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Hardware 6. Hardware This section describes the key aspects of the reference design. 6.1 Zigbee Smart Outlet Reference Design The reference design is composed of three printed circuit boards: * RF board * Sensor board * Power board The RF board mounts on the power board via connectors. The sensor board mounts to the power board with a ribbon cable connector. 6.1.1 RF Board Highlights * * * * ERF32MG Zigbee Pro radio with an embedded flash Cirrus Logic CS5463 energy monitoring IC Printed circuit board antenna Mini-simplicity header debug connector 6.1.2 Sensor Board Highlights * Si7021 temperature and humidity sensor * Si1141 ambient light sensor * Momentary push button 6.1.3 Power Board Highlights * * * * * * * TI UCC28700DBV constant voltage, constant current, fly-back controller TI LM3671MF switching regulator 3.3 V, 600 mA TE Connectivity 8-1393239-5 SPDT relay 250 VAC, 16 A Diodes Incorporated RH06-T bridge rectifier 600 V, 0.5 A Renco RLTI-1072 transformer 40:3, 2A Bel Fuse slow blow fuse 250 V, 0.5A Green and red LEDs 6.2 Hardware Modification Guidelines For users who wish to modify the reference design, we offer guidelines below for what to expect in the modification process. 6.2.1 Avoid Modification All changes listed here may have serious impacts on performance or certification passage such as FCC or UL: * Modifying the spacing between the EM3587, FEM and the PCB antenna. * Modifying the high voltage sections of the power board. * Changing the PCB antenna length/shape. * Changing any part of the ground pour area. 6.2.2 Bill of Material Cost-saving Options To further reduce overall bill-of-material (BOM) cost of this reference design, the following items and their supporting circuitry can be considered for removal: * Mini-simplicity programming header. * CS5463 and its supporting energy monitoring circuitry. * Si1141 ambient light sensor. * Si7021 temperature and humidity sensor. silabs.com | Building a more connected world. Rev. 0.2 | 11 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Hardware 6.3 Using the Conducted RF Connector The RF connector on the secondary side of the board provides an easy way to access the RF output signal from the chip. This can be useful in setting up conducted RF setups for testing and demos. The RF connector option is only available in RD-0100-0201 reference design boards. Note that the signal coming to the connector is not optimized for performance and FCC emission requirements. Only the radiated signal is guaranteed to perform within FCC specifications. To use the connector, depopulate resistor R13, close solder bridge J6, and populate connector J7. Connector Manufacturer: Murata Electronics Connector Part Number: MM5829-2700RJ4 Please check manufacturers site for compatible mating connectors and cable assemblies. silabs.com | Building a more connected world. Rev. 0.2 | 12 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Firmware 7. Firmware This section describes the reference design application firmware. 7.1 Obtaining the Firmware Application The firmware application is loaded into the flash of the ERF32MG1P232F256 or ERF32MG12P432F1024 during the manufacturing process. The firmware application source code is delivered as part of EmberZNet PRO, which is available to registered users of a wireless starter kit such as the SLWSTK6000B. For more information, visit the Zigbee Getting Started page. 7.2 Firmware Build Instructions The instructions below describe how to build the device firmware. 1. Install EmberZNet PRO. 2. Create a new Application Framework Configuration in AppBuilder and select the SoC stack release. 3. Create a project using Z3SmartOutlet sample application. 4. During Project Setup, verify that the proper chip is selected. 5. In AppBuilder, under the "hal configuration tab", verify the architecture EFR32MG1P232F256GM48 and Board header ist_a0051: Smart Outlet Reference Design are properly selected. Alternately, select architecture EFR32MG12P432F1024GM48 and Board header ist_a0100: Smart Outlet Reference Design. 6. Generate and note the directory in which the project files were created. 7. Save the project file into the directory you just created. 8. Compile with IAR (for version compatibility information see the EmberZNet PRO release notes and QSG106: Getting Started with EmberZNet PRO). At this point you can load the image onto the Smart Outlet reference design using the Board Header Reprogramming method described above. 7.3 Programming the Reference Design The reference design provides two methods to reprogram the demo board: * Using a wireless starter kit mainboard and SLSDA001A Simplicity debug adapter board with an .s37 or .hex image file. * Using the over-the-air (OTA) upgrade feature with an .ota image file. 7.3.1 Board Header Reprogramming The reference design can be reprogrammed with a wireless starter kit mainboard and SLSDA001A debug adapter. The debug adapter plugs into the Mini Simplicity connector on the wireless starter kit mainboard and the debug header on the reference design. Notice the orientation of the connector, where the keyed side of the connector corresponds to the Mini Simplicity key marking found with the silkscreen drawing surrounding the debug header. The SLSDA001A debug adapter ships with the reference design kit after December 2017, and is also available separately for purchase. When using the board header for programming, it is possible to update or replace the bootloader in addition to updating the application. A bootloader is a special piece of firmware that is primarily intended to allow future application firmware updates when a hardwired connection to the device is no longer available (allowing over-the-air firmware updates of deployed devices, for example). The reference design ships with a bootloader already installed, so you do not need to replace it. However, if you ever need to reload the bootloader, it is important to select the app-bootloader-spiflash.s37 for the EFR32MG1P232F256GM48 and bootloader-storage-internal.s37 for the EFR32MG12P432F1024GM48. SHOCK HAZARD: Do not connect the debug header while the reference design is plugged into AC-mains power as this will cause damage to the wireless starter kit, the reference design, or both. Programming may be done while the AC-mains power is disabled. An isolation transformer may be used on the AC-mains supply to allow operation while the programmer is connected. Alternately, an RD-0091-0201 Isolated Debug Adapter may be used to isolate the system. The RD-0091-0201 isolated debug adapter ships with the outlet reference design kit after December 2017, or is available by contacting Silicon Labs. 7.3.2 Over-the-Air Reprogramming The demo board can be reprogrammed with an available .ota file and a device that can perform OTA upgrades such as the RD-0001 or RD-0002 Zigbee USB Gateway Kit supported by Silicon Labs. Refer to the gateway documentation for more information on how to reprogram via OTA upgrade. silabs.com | Building a more connected world. Rev. 0.2 | 13 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Firmware 7.4 General Configuration The device ID used is 0x0051, which represents an outlet device, and the Zigbee Device Type is set to Sleepy End Device. The board header is set to ist_a0051: Smart Outlet Reference Design or ist_a0100: Smart Outlet Reference Design. 7.5 Cluster Support This section details clusters that were implemented as part of this project. Cluster Name Cluster Hex Value Basic 0x0000 Identify 0x0003 On/Off 0x0006 Over the Air Boot Loading 0x0019 Illumination Measurement 0x0400 Temperature Measurement 0x0402 Relative Humidity Measurement 0x0405 Electrical Measurement 0x0B04 Diagnostics 0x0B05 Simple Metering 0x0702 Configuration Cluster 0xFC01 Details about these clusters are provided in the Appbuilder ZCL clusters configuration tab within Simplicity Studio. 7.6 Command Line Interface Support In addition to General CLI the following CLI command summaries are supported. Details about these command line interface features are provided in the Appbuilder Printing and CLI tab within Simplicity Studio. * Address Table * Connection Manager * Counters * EEPROM * EZ-Mode Commissioning * Electrical Measurement Server commands * Identify * Illuminance Measurement Server commands * Manufacturing Library * Manufacturing Library CLI * OTA Bootload * OTA Client * OTA Simple Storage EEPROM * OTA Storage Common * Relative Humidity Measurement Server commands * Reporting * Simple Metering Server * Temperature Measurement Server commands 7.7 Included Plugin Options Numerous plugins are available from the EmberZNET PRO stack. Notable ones are described in this section, along with their set options. silabs.com | Building a more connected world. Rev. 0.2 | 14 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Firmware 7.7.1 Manufacturing Library CLI To assist with the manufacturing process, the outlet reference designs include the manufacturing library as well as the manufacturing library CLI commands. On the factory floor, a unit that has been programmed with these images may be used to also make radio measurements. Theory of Operation The purpose of the manufacturing library CLI plugin (or mfg-lib CLI plugin for short) is to allow access to commands that will put the radio into test mode so that the radio modules can be tested at manufacturing time with the final bulb firmware images. CLI Commands Table 7.1. Commands for the Manufacturing Library CLI Command Notes plugin mfglib mfgenable <0|1> Set the token to pause plugin from scanning for channels to allow for starting the manufacturing library before the stack operation begins. 0 clears the token, 1 sets the token. The effect of setting the token is that you will have 10 seconds after the next power-up to preempt the stack from resuming normal operation and start the mfglib. plugin mfglib start <0|1> Starts the manufacturing library, which will prevent network activity as well as enable the rest of the manufacturing library commands. The argument dictates whether or not to track incoming messages and provide receiver statistics on the incoming packets. plugin mfglib stop Stops the manufacturing library plugin mfglib set-channel Set the radio to the specified channel. Note: channel must be beteween 11 and 26 inclusive plugin mfglib set-power Sets the radio power to be used for manufacturing library transmit commands. plugin mfglib stream plugin mfglib tone Note: There are additional CLI commands for use with the manufacturing library plugin. They can be explored by typing the command "plugin mfglib " and seeing a list of valid commands. Above we are detailing the commands that are most commonly useful to an outlet reference design during the manufacturing process. As an example in using these commands, here is the procedure for starting the manufacturing library: 1. Connect to the reference design and issue the mfgenable command: "plugin mfglib mfgenable 1" 2. Power cycle the reference design. 3. Within 10 seconds of power cycle, issue the start command "plugin mfglib start 0" At this point, any of the manufacturing library commands can be safely executed without interference from the networking stack. For example, to take measurements on a modulated tone on channel 15 at a power of 20, issue the following commands: plugin mfglib set-channel 15 plugin mfglib set-power 20 0 plugin mfglib stream start At this time, take your measurements. plugin mfglib stream stop When the manufacturing tests are completed, it is important that you disable the manufacturing library delay at bootup with the following command: silabs.com | Building a more connected world. Rev. 0.2 | 15 UG171: Smart Outlet Reference Design Kit User's Guide (RD-0051-0201, RD-0100-0201) Firmware plugin mfglib mfgenable 0 It is not necessary to issue the manufacturing library stop command unless you wish to initiate normal networking activity without a power cycle as the manufacturing library operation will be reset at the next power cycle. 7.7.2 Manufacturing Library OTA This plugin implements the manufacturing library custom cluster from Silicon Labs. It provides a means, through radio messages, to put the device into RF testing mode. In the past, enabling such features on a device required the user to physically alter the device (by cutting the case, adding a connector, and connecting to a ribbon cable). For some tests, this is practically impossible. For others, it will alter the results of the test (such as for FCC tests). To overcome these issues, Silicon Labs developed a way to invoke the manufacturing library commands using radio commands. Theory of operation Silicon Laboratories has created a custom Zigbee cluster that provides RF commands for the purpose of putting the device receiving the commands into manufacturing test mode. Specifically, it can force the device to transmit an unmodulated tone, transmit a modulated tone, or receive packets for a short time to check the TX or RX path of the device in the field. First, the user must obtain a gateway that supports this functionality. The Z3Gateway application supports the MFGLIB Cluster, although it is possible to use our development environment to create such a gateway. After the gateway creates the network and the outlet reference design joins the network, the gateway can send commands to the reference design to tell it which RF test to perform and which parameters to use, such as channel and TX power. Each of the RF commands also includes a timeout parameter, which sets the amount of time (in milliseconds) to enable the command. Using a timeout parameter of 0 means that the device will remain in the specified RF test until the next device power cycle. CLI Commands Table 7.2. Manufacturing Library Over the Air Commands OTA Command Notes zcl mfg-code 0x1002 Sets the manufacturing code to 0x1002, which is the Silicon Labs code used for these custom clusters. zcl mfg-code 0 Unsets the manufacturing code. zcl mfglib rx-mode