This example demonstrates:
The example uses two instances of the Generic OnOff client model. These on/off clients can be configured to control desired servers by the provisioner.
The following figure shows such a hybrid network that contains a device outside of the Bluetooth Mesh Network, a translator client, and servers. All servers have the relay functionality enabled, which allows the EnOcean switch to control the state of any of the servers in the network.
The translator client linked with the EnOcean switch has a provisionee role in the network. The client receives messages from the PTM215B switch and converts them to equivalent on/off client messages to control the state of LED 1 on servers. The client instantiates two instances of the Generic OnOff Client model (A and B, each with two buttons) and can either be provisioned and configured by the provisioner example or by a GATT-based provisioner (nRF Mesh mobile app).
Table of contents
You need at least two supported boards for this example:
Additionally, you need one of the following:
See Compatibility for information about the supported boards.
To test this example, you need to use the server example from the light switch example folder, regardless of the number of server boards you use: <InstallFolder>/examples/light_switch/server
The example is configured to store security material for two EnOcean switches. If you want this example to support more than two EnOcean switches in parallel, set the value of MAX_ENOCEAN_DEVICES_SUPPORTED
to the desired number of switches.
Additionally, if you decide to use the static provisioner example, you also need the provisioner example firmware: <InstallFolder>/examples/provisioner
See the Light switch example page for more information about the provisioner and the server examples. For details about the API usage of these two examples, check the provisioner details and server details pages.
You can find the source code of the EnOcean example in the following folder: <InstallFolder>/examples/enocean_switch
true
).false
).To test the EnOcean switch example, build the examples by following the instructions in Building the mesh stack.
MAX_PROVISIONEE_NUMBER
(in example_network_config.h
) to the number of boards available and rebuild the provisioner example.After building is complete, use one of the following methods, depending on the preferred provisioning approach:
Once the provisioning is complete, you can start interacting with the boards.
If the provisioner encounters an error during the provisioning or configuration process for a certain node, you can reset the provisioner to restart this process for that node.
See the information on the main Examples page for detailed steps required to provision and configure the boards using the nRF Mesh mobile app.
When using the nRF Mesh app with this example, take the following information into account:
nRF5x Mesh Enocean Translator
.nRF5x Mesh Light
.The following model instances must be configured in the app for this example:
nRF5x Mesh Light
server board: Generic On Off Server.nRF5x Mesh Enocean Translator
switch board: Generic On Off Client.To capture the commissioning data of the EnOcean switch, put the EnOcean switch in the radio-based commissioning mode:
0b0
(default state).Once entered the radio commissioning mode, PTM215B transmits the commissioning telegrams. These telegrams will be captured by the translator, and the security material contained within those telegrams will be stored in the flash.
Once one of the commissioning telegrams is captured by the translator, 4 LEDs will blink 4 times.
Once the provisioning and the configuration of the EnOcean translator client node and at least one of the server nodes are complete and the commissioning data is captured, you can press rocker switches on the EnOcean switch to control various servers. See LED and button assignments section.
If any of the devices is powered off and back on, it will remember its flash configuration and rejoin the network. For more information about the flash manager, see Flash manager.
If you want to reset the application data without re-flashing the firmware, press Button 4. LED 1 will blink twice to indicate that application specific data and mesh related data has been erased. Press Reset button to reset the board and start the application.