From 8a4907d55debe8dc2e7139c95bf90a27d80d74e8 Mon Sep 17 00:00:00 2001 From: Zhang Wei Date: Tue, 5 Sep 2023 09:46:20 +0800 Subject: [PATCH] Update application note for ESP-NOW bridge to include data models. --- examples/esp-now_bridge_light/README.md | 4 + .../docs/esp-now-bridge-datamodel.drawio.svg | 401 ++++++++++++++++++ .../docs/esp-now-bridge-overall.drawio.svg | 136 ++++++ .../docs/esp-now-bridge-with-button.md | 14 +- 4 files changed, 554 insertions(+), 1 deletion(-) create mode 100644 examples/esp-now_bridge_light/docs/esp-now-bridge-datamodel.drawio.svg create mode 100644 examples/esp-now_bridge_light/docs/esp-now-bridge-overall.drawio.svg diff --git a/examples/esp-now_bridge_light/README.md b/examples/esp-now_bridge_light/README.md index 2047174f4..c888123f4 100644 --- a/examples/esp-now_bridge_light/README.md +++ b/examples/esp-now_bridge_light/README.md @@ -6,6 +6,10 @@ In the ESP-NOW part, it acts as a responder whereas a ESP-NOW switch is an initi In the Matter part, it creates a Color Temperature Light device and an aggregator device using the ESP Matter data model. When binding with an ESP-NOW switch is complete, it also creates a dynamic OnOff Switch device that works like a normal Matter switch. When unbind from the ESP-NOW switch, the dynamic switch device is removed. +This diagram gives a simplistic view of the data models involved in the interaction. + +![data model](./docs/esp-now-bridge-datamodel.drawio.svg) + See the [docs](https://docs.espressif.com/projects/esp-matter/en/main/esp32/developing.html) for more information about building and flashing the firmware. ## 1. Additional Environment Setup diff --git a/examples/esp-now_bridge_light/docs/esp-now-bridge-datamodel.drawio.svg b/examples/esp-now_bridge_light/docs/esp-now-bridge-datamodel.drawio.svg new file mode 100644 index 000000000..06d766d76 --- /dev/null +++ b/examples/esp-now_bridge_light/docs/esp-now-bridge-datamodel.drawio.svg @@ -0,0 +1,401 @@ + + + + + + + + + + +
+
+
+ + Endpoint + + 1 +
+ + Device Type + + : Color Temperature Light +
+
+
+
+
+
+
+
+ + Endpoint 1... + +
+
+ + + + +
+
+
+ + Endpoint + + 2 +
+ + Device Type + + : Aggregator +
+
+
+
+ + Endpoint 2... + +
+
+ + + + +
+
+
+ + Dynamic Endpoint + + n +
+ + Device Type + + : +
+ - Bridged Node +
+ - On/Off Light Switch +
+
+
+
+
+
+
+
+ + Dynamic Endpoint n... + +
+
+ + + + +
+
+
+ + Cluster Client + + : On/Off +
+ + Commands + + : On, Off, Toggle +
+
+
+
+ + Cluster Client: On/Off... + +
+
+ + + + + + +
+
+
+ ESP-NOW Responder +
+
+
+
+
+
+
+ + ESP-NOW Responder... + +
+
+ + + + +
+
+
+ ESP-NOW Attributes +
+
+
+
+ + ESP-NOW Attributes + +
+
+ + + + + +
+
+
+ Mapping of ESP-NOW Attributes to +
+ Cluster Attributes/Commands +
+
+
+
+ + Mapping of ESP-NOW Attributes to... + +
+
+ + + + +
+
+
+ Matter +
+
+
+
+ + Matter + +
+
+ + + + +
+
+
+ ESP-NOW +
+
+
+
+ + ESP-NOW + +
+
+ + + + +
+
+
+ + ESP-NOW Matter Bridge + +
+
+
+
+ + ESP-NOW Matter Bridge + +
+
+ + + + +
+
+
+ + Cluster Server + + : On/Off +
+ + Attributes + + : OnOff +
+
+
+
+ + Cluster Server: On/Off... + +
+
+ + + + + +
+
+
+ ESP-NOW Initiator +
+
+
+
+
+
+
+ + ESP-NOW Initiator... + +
+
+ + + + +
+
+
+ ESP-NOW Attributes +
+
+
+
+ + ESP-NOW Attributes + +
+
+ + + + +
+
+
+ + Coin Cell Button + +
+
+
+
+ + Coin Cell Button + +
+
+ + + + + + +
+
+
+ + Endpoint + + 1 +
+ + Device Type + + : Color Temperature Light +
+
+
+
+
+
+
+
+ + Endpoint 1... + +
+
+ + + + +
+
+
+ + Cluster Server + + : On/Off +
+ + Attributes + + : OnOff +
+
+
+
+ + Cluster Server: On/Off... + +
+
+ + + + +
+
+
+ + Matter Light + +
+
+
+
+ + Matter Light + +
+
+ + + + +
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/examples/esp-now_bridge_light/docs/esp-now-bridge-overall.drawio.svg b/examples/esp-now_bridge_light/docs/esp-now-bridge-overall.drawio.svg new file mode 100644 index 000000000..be79efc0d --- /dev/null +++ b/examples/esp-now_bridge_light/docs/esp-now-bridge-overall.drawio.svg @@ -0,0 +1,136 @@ + + + + + + + +
+
+
+
+
+ + Matter Fabric + +
+
+
+
+ + Matter Fabric... + +
+
+ + + + + + + + + + + + + +
+
+
+ ESP-NOW Bridge +
+
+
+
+ + ESP-NO... + +
+
+ + + + + + + +
+
+
+ ESP-NOW +
+ control/bind/unbind +
+
+
+
+ + ESP-NOW... + +
+
+ + + + + +
+
+
+ Matter control +
+
+
+
+ + Matter control + +
+
+ + + + + +
+
+
+ Matter control +
+
+
+
+ + Matter control + +
+
+ + + + + +
+
+
+ Matter control +
+
+
+
+ + Matter control + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/examples/esp-now_bridge_light/docs/esp-now-bridge-with-button.md b/examples/esp-now_bridge_light/docs/esp-now-bridge-with-button.md index e51a166dc..a3c40ea60 100644 --- a/examples/esp-now_bridge_light/docs/esp-now-bridge-with-button.md +++ b/examples/esp-now_bridge_light/docs/esp-now-bridge-with-button.md @@ -2,7 +2,19 @@ ## Overview -This application note describes the application of controlling the ESP-NOW Matter bridge using the ESP-NOW coin cell button, focusing on the power saving aspect of the application. Please refer to this [Application Note](https://github.com/espressif/esp-now/tree/master/examples/coin_cell_demo/switch/docs/button_in_matter_bridging.md) for the coin cell button part of the application note. For general ESP-NOW bridge application description, please refer to the [README](../README.md). +This document outlines the application of controlling the ESP-NOW Matter bridge through the use of ESP-NOW coin cell button. Please refer to this [Application Note](https://github.com/espressif/esp-now/tree/master/examples/coin_cell_demo/switch/docs/button_in_matter_bridging.md) for the coin cell button part of the application note. For general ESP-NOW bridge application description, please refer to the [README](../README.md). + +## Data Models + +The diagram below gives an overview of the interactions between various devices in this application. + +![bridge overview](./esp-now-bridge-overall.drawio.svg) + +This diagram gives a simplistic view of the data models involved in the interaction. + +![data model](./esp-now-bridge-datamodel.drawio.svg) + +The coin cell button binds to the ESP-NOW Matter bridge so that it is able to send ESP-NOW controls to the bridge, then the bridge controls the Matter light through ONOFF Cluster. ## Power Saving