40 January 2016
(Nuts&Volts_xBee.xml) available at the article link, and
save it to your local hard drive. Using the XC TU software,
load the configuration file from your local hard drive and
write it to your XBee. (Refer to Figures 4, 5, and 6.) This
configuration file sets the parameters shown in Table 4.
Once this step is complete, your radio is programmed
to join any ZigBee HA network; you won’t have to do this
again. As soon as you reset your radio, it will start looking
for an open ZigBee HA network to join. To allow it to join
the network, you will need to tell Smart Things to open the
network and allow a new device to join. (More on this
later. For now, you can unplug your radio and move on to
the next step.)
Step 2) Build Your
Circuit.
The sample code outlined in
the next step is designed to work
with the schematic in Figure 7. If
you’re building your own circuit,
you don’t have to worry about
connecting your XBee, LED, and
pushbutton to the same pin
numbers shown here. We can
configure that in the code.
Please note, we connect the
Propeller to the XBee with five pins:
Dout, Din, Reset, CTS, and RTS.
We need all five pins as we are
going to implement hardware
handshaking to the XBee. If we had
to, we could get by without the
XBee’s “reset” pin, but without it
you may find yourself power
cycling your circuit from time to
time.
On pin 12 of the Propeller
Mini, we connect an LED and a
220 ohm current-limiting resistor.
This is the LED we will control with
SmartThings.
On pin 13 of the Propeller
Mini, we connect a 10K ohm pull-up resistor and pushbutton to
ground. This button will also be
Smart Things awarded the CoopBoss
Best in Show for their “Show Us Your
Smart Things” contest. Check it out at
http://blog.smartthings.com/stories/a-smart-chicken-coop.
Parallax features the technology used
by the CoopBoss on their “learn
website” at http://learn.parallax.com/
inspiration/coop-boss.
The CoopBoss is an open source
project. More information is available at
CoopBoss.com. This fall, you will be
able to order a complete CoopBoss
system from DoodleDooCoops.com.
CoopBoss ZigBee Configuration.
The following is a list of the endpoints and clusters used by the CoopBoss.
ZigBee End Points
0x38 Input Cluster 0x0000 Basic Cluster
Output Cluster 0x0101 Door Lock Cluster
Output Cluster 0x0402 Temperature Cluster (Temperature of XBee radio)
0x39 Input Cluster None N/A
Output Cluster 0x0402 Temperature Cluster (Coop Probe 1)
0x40 Input Cluster None N/A
Output Cluster 0x0402 Temperature Cluster (Coop Probe 2)
ZigBee Cluster
0x0101
commands
$00 Close Door
$01 Open Door
$03 Toggle Door Lock
$04 High Current Door Close
ZigBee Custom Commands for Cluster 0x0101
$0A Enable Auto Close Door
$0B Disable Auto Close Door
$0C Enable Auto Open Door
$0D Disable Auto Open Door
$0E Set Close Light Level to Current Level
$0F Set Open Light Level to Current Level
$10 Set Close Light Level (to Long Value)
$11 Set Open Light Level (to Long Value)
$12 Set Auto Close and Open Light Levels back to factory
$13 Set Normal Door Close Current to value of Last Door Close Current
ZigBee Cluster 0x0101 Attributes
$0000 Read LockState; see page 344 of ZCL, type 0x30 $30 = eight-bit enumeration
$0001 Read Lock Type; see page 344 of ZCL, type 0x30
$0002 ActuatorEnabled; see page 344 of ZCL, type 0x10
$0003 Read DoorState; see page 344 of ZCL, type 0x30, Reportable
ZigBee Custom Attributes
$0400 Custom Attribute for Current Light RC Time value, type 0x23
$0401 RC Time value that will trigger a door close, type 0x23
$0402 RC Time value that will trigger a door open, type 0x23
$0403 Read Auto Door Close Setting 0=Disabled, 1=Enabled, type 0x10
$0404 Read Auto Door Open Setting 0=Disabled, 1=Enabled, type 0x10
$0405 Current of last door close
$0406 Seconds to next close window
$0407 Seconds to next open window
$0408 Object detection sensitivity (1 to 100) 1 = very sensitive
$0409 Read Normal Door Current Setting