I am trying to make my own smart home system using esp32s. The idea is that I have 1 hub, and then have esp32-powered end devices, such as switches. These end devices will need to be low power consumption as well, so they cannot use wifi (hence why I turned to ESP-NOW). I have been trying the examples, and I can't seem to wrap my head around how this system works.
My goal is only to have the hub be able to use wifi, as it will need to talk to Alexa using ESP-RAINMAKER. I want a pairing functionality where any hub and end device can be paired if their pair buttons are held down for a few seconds in synch. Note, I'm thinking about the large scale, so devices don't know each other's MAC addresses, so they will need to discover each other somehow.
Here is my general understanding.
- Initialize esp-now
- register peer by setting channel, encryption, then a general addr to broadcast to (0xFF,0xFF,0xFF,0xFF,0xFF,0xFF)
- register a callback function for dataSend and dataReceive
- Now, when a button is pressed, use esp_now_send to send a structure of pairing data
- The hub does the same thing, and when either receives the others pairing request, it unpackages that struct and stores the devices mac address and registers it as a peer. This should mean each has the other registered as a peer now and can now sit and wait until further commands.
I would really appreciate any help in clarifying my understanding as I am new to this stuff.
Bi-Directional communication using ESP-NOW
-
- Posts: 5
- Joined: Tue Nov 28, 2023 6:13 am
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: pmi2410 and 72 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.