Ubisys Smart Home Application Zigbee Direct Setup


1. Overview

The Ubisys Smart Home Application for iPhone functions as a Zigbee virtual device (ZVD) and may be used to control Zigbee radio devices from a mobile device. In configurations that include both Zigbee direct devices (ZDD) and standard Zigbee devices, the ZDD acts as a bridge to relay commands from your phone to Zigbee devices without Bluetooth capabilities.

This demo shows an STM32WBA55 Zigbee direct device (ZDD) using the Ubisys ZVD iOS phone application to control a Zigbee device via Bluetooth. The ZVD joins the ZDD Zigbee network and controls the Zigbee device by sending On and Off commands.

Zigbee Direct Demo
Connectivity ZigbeeDirectOverview.png

2. Setup

In this section, we will:

  • Download and install the Ubisys Smart Home application on an iPhone.
  • Build and flash the Zigbee_zdd_onoff Zigbee application to the NUCLEO-WBA55CG.
  • Retrieve the public Bluetooth address of the NUCLEO-WBA55CG for use with a sniffing solution.

2.1. iPhone application installation

To install the Ubisys Smart Home application on the iPhone to be used as the ZVD:

  1. Open the App Store app on your iPhone.
  2. Search "Ubisys Smart Home" in the App Store.
  3. Install the app.

2.2. STM32WBA55 ZDD configuration

To configure the STM32WBA55 as a ZDD:

  1. Build the Zigbee_zdd_onoff Zigbee application.
  2. Download the .out ELF image to the NUCLEO-WBA55CG.

2.3. Retrieve public Bluetooth® address

To retrieve the public Bluetooth address of the NUCLEO-WBA55CG:

  1. Connect the NUCLEO-WBA55CG to a computer via USB-serial.
  2. Open a serial terminal.
  3. Power on the NUCLEO-WBA55CG.
  4. Record the public Bluetooth address shown in the debug output.
  5. Use this address to configure your Bluetooth sniffing solution.

When you connect the NUCLEO-WBA55CG to a computer via USB-serial, you will have access to a limited command line. Type help to get a listing of the commands available and their descriptions.

3. Demo Procedure

In this section, we will:

  • Start the ZDD application on the NUCLEO-WBA55CG.
  • Connect the iPhone to the STM32WBA55 ZDD.
  • Add a Zigbee device to the ZDD’s Zigbee network.
  • Add a component to the ubisys Smart Home application.
  • Control the Zigbee device using the iPhone.

3.1. Start the ZDD application

To start the ZDD application on the NUCLEO-WBA55CG:

  1. Power on the NUCLEO-WBA55CG.
  2. The ZDD application starts and begins sending Bluetooth® Low Energy (BLE) advertisement messages.
Info white.png Information
The ZDD stops advertising after approximately 3 minutes.

3.2. Connect the iPhone to the STM32WBA55 ZDD

To connect the Ubisys Smart Home app to the ZDD:

  1. Open the Ubisys Smart Home app on your iPhone.
  2. A screen displaying "Connect Gateway…" appears.
    • Press the "x" in the top left corner to skip this step.
  3. A screen displaying "Facilities" appears.
    • If the Facilities screen does not automatically appear, access the screen from the main menu of the app by selecting the menu path: Settings > Facilities.
  4. Press the edit symbol in the top right.
  5. Select "New Facility."
  6. Select "Create via Bluetooth."
  7. Use the three dots to select the advertising ZDD.
    • If the ZDD appears in the Facilities screen with the message "Does not permit joining," enter the "pjoin" command on the ZDD to re-enable joining.
Connectivity ZigbeeDirectConnectionwithiphone.png
  1. In the opened bubble, confirm that the ZDD has the expected Bluetooth® address and press OK.
Connectivity ZigbeeDirectConnectionwithiphone1.png
  1. This will start the connection process. During this process, the ZVD also commissions the ZDD to form a Zigbee network. Wait for the connection process to finish.
Connectivity ZigbeeDirect waitconnection.png
  1. When the Discover Devices bubble appears, select "Yes, just the device."
Connectivity ZigbeeDirect step10.png

The app begins searching for components. The process completes within a few seconds. At this point, an entry for your ZDD appears in the Facility menu along with an entry in the components menu under the menu path:

Configuration > Basic Configuration > Components

Info white.png Information
It may take a minute after a new connection before the device appears in the components menu.

3.3. Managing components

The Ubisys app uses components to link UI controls to device functions. Functionalities of Zigbee devices are addressed via endpoints. Endpoints are displayed in the app with a preceding hashtag (#). The provided application will have an OnOff cluster on endpoint 1. In this section, we will:

  1. View the components on your device
  2. Edit the component name
  3. Create a room
  4. Add the component to the room

To manage components in the Ubisys app:

  1. Access the components menu by navigating to the menu path:

    Configuration > Basic Configuration > Components.

  2. If you do not see your device as a component, refresh the components menu by swiping down.
    • There may be a delay of a minute or so between the time a new device joins the network and when it appears in the components menu.
  3. Select the device with the correct Bluetooth® address from the components menu.
Connectivity ZigbeeDirect Managing Components.png
  1. Select the edit symbol and change the name of the device to "Light Switch".
Connectivity ZigbeeDirect Managing Components4.png
  1. Navigate to the menu path:
  2. Configuration > Basic Configuration > Rooms

  3. Select the edit symbol.
  4. Select the plus symbol located next to "New Room".
  5. Name the room and select the check mark.
  6. Connectivity ZigbeeDirect Managing Components8.png
  7. Select the newly created room.
  8. Navigate to the menu path:
  9. Edit > Add device

  10. Select the light switch component (OnOff server) on the expected endpoint.
  11. Select the check mark.
  12. Select the check mark again to finish adding devices to the room.

3.4. Adding a Zigbee device

With the ZDD commissioned to form a network, ZVD-to-Zigbee only device control can be validated by adding a Zigbee device to the network. To add a Zigbee device to the network:

  1. Navigate to the menu path:

    Configuration > Basic Configuration

  2. In the Select Open menu, choose New Devices.
  3. Have a Zigbee radio device join the network.

3.5. Sending On and Off Commands

To send On and Off commands to the Zigbee device:

  1. Navigate to the menu path:

    Building Control > <Name of room>

  2. A circle button will appear to toggle the light switch on and off.
Connectivity ZigbeeDirect Sending On and Off Commands.png

With this process complete, the circle button now signifies when the cluster is turned on by changing color to green.

Info white.png Information
There may be a delay of a few seconds between the time the cluster is turned activated and when the circle button changes state.

3.6. Disconnecting the ZVD from the ZDD

To disconnect the ZVD from the ZDD:

  1. Navigate to the menu path:

    Settings > Facilities > Edit

  2. Select the red minus symbol next to the device
  3. Confirm by selecting "delete"