Green Power On/Off Switch
Introduction
This document discusses how to use the Green Power On/Off Switch Sample App and the different parts that compose it. Green Power On/Off Switch Sample Application is an example which exercises different features of TI Z-Stack for a green power device implementation.
Some of the features exercised include:
- Green Power application id configuration for source id or IEEE.
- Security level configuration.
- Auto commissioning.
- Sequence number capabilities.
Hardware Prerequisites
Software Prerequisites
- Code Composer Studio(CCS) v7.3 or higher
Functional Description
Software Overview
This section describes software components and the corresponding source file.
Application Files
- gpd_sw.c/.h: Contains the application’s event loop, device initialization function calls (for timers, peripherals, Nvm, LEDs, Switches), Application notifications and all On/Off Switch specific logic.
- gpd_sw_data.c: Contains the Green Power Data Frame definitions for this sample application.
- main.c Defines the application task, the application stack size.
Example Usage
This section describes how to use this sample application.
Buttons
BTN-2
: Sends Toggle GPDF.
LEDs
DIO6
: Reflect when the green power device finishes GPDF send by a 500ms blink. If there is a failure during send, the LED1 will remain ON.DIO7
: Reflect when the green power device starts a GPDF send by a 500ms blink.
Commissioning the device Into the network
Green Power Devices can be commissioned to a zigbee network by sending a commissioning GPDF, a GPDF with auto-commissioning or a commissioning tool. A zigbee device with green power proxy capabilities can create an entry for a Green Power Device with the commissioning data. The proxy device will translate the GPDF commands to ZCL notifcations for the zigbee network.
Interfacing with the Light Sink Example App
Once the Light Sink and another routing device are in the same network, put the Light Sink in GP Commissioning Mode from the App Menu in the Green Power Sink Commissioning Screen.
Green Power Commissioning screen
Send the On/Off GPDF from the GP On/Off Switch which has Auto-Commissioning enabled. Then from the Green Power Sink Commissioning Screen disable the GP commissioning mode.
Green Power Commissioning screen
Once the GP commissioning mode is disabled, sending the On/Off GPDF with the GP On/Off Switch will toggle the Light Sink LED.
NOTE: If the LED is not toggled just repeat the commissioning process and try again.