led_light

Example of the component espressif/mesh_lite v0.10.4
Supported Targets ESP32 ESP32-C3 ESP32-S3

LED Light Example(Nova Home)

This example uses the Rainmaker cloud platform to demonstrate the ESP-Mesh-Lite function. User can configure the device through the Nova Home APP and successfully connect to the Rainmaker cloud. The device is connected to the cloud based on Rainmaker, It can also provide other devices with the ability to surf the Internet wirelessly, and form a network with the Mesh-Lite function, which greatly reduces the load on the router and expands the wireless communication range.

Get Start

1. Apps

2. Get Key

Currently, there are two ways for a device to obtain a certificate:

  • Self Claiming: After the network is configured, the device directly sends an http request to pull the certificate from the server, which can only be applied on ESP32-S3 and ESP32-C3. Due to the binding with the MAC, the certificate pulled by each device is the same each time.
  • Assisted Claiming: When configuring the network, the mobile APP requests a certificate from the server, and then sends it to the device through Bluetooth. It is not bound to the MAC. By default, an account has a limit of 5 applications.

Currently, ESP32-S3 and ESP32-C3 use Self-Claiming to obtain certificates by default, while ESP32 can only use Assisted Claiming to obtain certificates.

Nova Home's Assisted Claiming method is currently unstable. If you use ESP32 to obtain a certificate, it is recommended to use the ESP Rainmaker APP for Claiming

3. IDF environment setup & SDK

Refer to README

4. Mesh-Lite function

  • You can choose whether to enable the Mesh-Lite function in the menuconfig Component config → ESP Wi-Fi Mesh Lite. This example enables this function by default.
  • If the Mesh-Lite function is enabled, the first networked device will connect to the target router and serve as the root node, and subsequent devices will be connected to the root node device and act as child nodes to form a Mesh-Lite network. For details, please refer to Mesh-Lite.

5. Build & Flash

After the ESP-IDF environment is successfully set up, you can execute the following commands to compile and burn the firmware.

Plaintext

$ cd esp-mesh-lite/examples/rainmaker/led_light
$ idf.py set-target esp32c3
$ idf.py build
$ idf.py flash

6. Operation Steps

6.1 Add Root Node

  • Open the Nova Home app,The app will automatically discover the devices ready for network configuration.
find_devices
  • Select one of the devices from the list.
select_root_node
  • Enter the network configuration details to proceed with the setup.
select_network
  • After successful network configuration, the device will be added to the app.
img root_device_of_common
  • Page of the Device in the Mesh (Mesh ID is 117)
root_device_of_mesh

6.2 Add child node

  • On the Mesh page of the root node, click the plus icon in the upper-right corner.
mesh_page
  • Choose the child node device you want to add to the network.
select_child_devices
  • Enter the network configuration details (same as the router's), and proceed with the setup.
select_network
  • Network configuration successful.
child_done

6.3 Control all devices in the Mesh network.

  • Access the Mesh page, tap on the corresponding root node to enter the control page. On the control page, you can control the lighting effects of all devices within the Mesh
root_control

6.4 Group control

  • Access the Mesh page, tap on the "Group" option in the lower-left corner.
click_group
  • Create a new Mesh Group.
select_device_for_group
  • Use the created Group page to control the devices associated with that group.
group_control

7. Precautions

  • Currently Nova Home only supports Wi-Fi Provisioning over Bluetooth Low Energy, so this example does not support ESP32-S2 chip currently.

To create a project from this example, run:

idf.py create-project-from-example "espressif/mesh_lite=0.10.4:led_light"

or download archive (~1.04 MB)