Reusable ESP IoT template application based on ESP-IDF as a standalone device with a basic feature-set:
- Over-the-air update via BLE
- Provisioning via BLE to create or connect to a nearby WIFI Network
- Handle a single sensor (components/button)
- Control a single actor (components/lighting)
- Install Microsoft Visual Code
- Open the project folder
esp32
within vscode - install the recommended ESP-IDF extension
- run the Espressif IDF Setup wizard
- Install Android studio
- Open the project folder
android
within the IDE - run a gradle build by invoking
$ ./gradlew installDebug
This project is using automated processes known as continuous integration and continuous delivery (CI/CD) by using github actions
Pull requests will automatically run automated tests on a self-hosted runner. Self-hosted runners are used to access custom hardware, in this particular project an ESP32 device to run target based unit tests on it.
Testing without a real device is called Host-based testing and is currently not supported by this template since it is still experimental.
├── android
├── docs
└── esp32
├── components
│ ├── bluetooth Handle communication via bluetooth LE
│ │ ├── include
│ │ ├── src
│ │ └── test
│ ├── lighting Change the state of the LEDs regarding the configuration.
│ │ ├── include
│ │ ├── src
│ │ └── test
│ ├── button Observe button states and react regarding the configuration.
│ │ ├── include
│ │ ├── src
│ │ └── test
│ └── wifi Handle communication via Wireles LAN
│ ├── include
│ ├── src
│ └── test
├── host_test Test application to run on a Linux Host
├── main Main application to run on an esp device
├── sdkconfig.defaults Default project configuration
└── test Test application to run on an esp device
Run tests on a real device locally connected by build and flash the application inside the esp32/test
folder.
idf.py --project-dir esp32/test --build-dir esp32/test/build flash monitor
Run host-based test by
esp_ble_device/test_host$ idf.py --preview set-target linux
run the following command to get the cgroup properties
ls -l /dev/ | grep tty.usbserial
Based on the ESP-S3-WROOM-1
-
Button Long-press on/off device
-
BLE Profile OTA Service OTA Control OTA Data Communication Service Communication Control Communication Data
-
Wifi start/stop AP
- Housing
- PCB
- BLE Pairing / Bonding
- OTA Firmware update
- Sensor (button / rotary)
- Actuator (LED Ring / Piezo Buzzer)
The case is designed with OpenSCAD based on this devkit-v4-case
The PCB is designed with KiCad & KiCad libraries by Espressif
- EREMIT 3.7V 2500mAh LiPo (JST PH 2.0mm)
Rotary CLK 4 DT 15 SW 13
- 3V GND GND
BLE Pairing & Bonding ESP32-Devkit-Type-C ESP32-Devkit Case JLCPCB PCB fabrication espbs