• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
Home96 boardUse pcDuino8Uno and 96board as Zigbee Gateway
Previous Next

Use pcDuino8Uno and 96board as Zigbee Gateway

Posted by: admin , May 12, 2016

LinkSprite released a family of zigbee sensors for home automation and a zigbee gateway module to control these sensors.

In this tutorial, we show how to use pcDuino8 Uno  or 96 boards with the zigbee gateway module to work as a zigbee gateway.

 

Create a device on linksprite.io:

(1) Login to http://www.linksprite.io/signup to register for an account, and then login to the account:

Screen Shot 2016-05-12 at 10.39.22 PM

    (2) Create a DIY device:

        We can enter whatever names for Device Name, Group Name, please use 00 for the Device type, which means Custom device type:

Screen Shot 2016-05-12 at 10.41.57 PM

Click ‘Create’ to obtain the API key and device ID.

Screen Shot 2016-05-12 at 10.43.01 PM

 

Screen Shot 2016-05-12 at 10.43.10 PM

 

 

2.  Add api key and device ID to zigbee_usb.py. The zigbee.py can be found at our github.

Edit zigbee_usb.py, and modify deviceID and apikey:

Screen Shot 2016-05-12 at 10.48.56 PM

3. Launch the test program

    Connect the zigbee gateway with USB to TTL to pcDuino8 Uno, and copy zigbee_usb.py and pyserial-2.7 to pcDuino8 Uno, and install pyserial:

      Open pyserial-2.7, run:

     -> python setup install

   Wait for its finish, and run zigbee_usb.py

    -> python zigbee_usb.py

  Before the zigbee sensor device can be connected to the zigbee gateway, we need to press and hold the reset button for 2 seconds, and wait for the green LED to fast blink:

Screen Shot 2016-05-12 at 10.53.27 PM

 Add the zigbee sensor devices repeatedly, if the green LED stops blinking after reset, that mean the sensor has been added to the gateway successfully, and the program will return 0x02 8A 00. If now the sensor has been triggered, the program will return the current MAC address:

Screen Shot 2016-05-12 at 10.56.14 PM

The above shows that the current alarm device is door sensor, and the MAC address is the MAC address of the door sensor. Put the MAC address into the program as below:

Screen Shot 2016-05-12 at 10.57.32 PM

Add more device following the above procedure, and in this case,we only have two devices. Now we can go to www.linksprite.io to check the status:

Screen Shot 2016-05-12 at 10.58.42 PM

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors