2 releases
0.1.1 | Dec 4, 2024 |
---|---|
0.1.0 | Dec 4, 2024 |
#215 in Embedded development
252 downloads per month
215KB
5K
SLoC
Rust Implementation of ESP Rainmaker
A cross-platform implementation of ESP Rainmaker for ESP32 products and Linux using Rust.
- ESP RainMaker is end-to-end IoT development platform which enables development of IoT applications which can be controled remotely.
- However, the C based ESP RainMaker SDK(which can be found here) only supports execution on Espressif's ESP32 SOCs.
- This crate tries to implment similar functionalities for Linux platform along with ESP32(which can further be extended to other microcontrollers).
What is working
- WiFi Provisioning*:
Providing WiFi for a new device. No need to hardcode WiFi credentials! - Remote Control:
Controlling Devices connected to a node over internet using phone application. - User Node Association:
Associating a specific node to a user account for control. - Device sharing:
Share access to a device with multiple members. - Contol using Home Assistants:
RainMaker devices can be added to and controlled using Amazon Alexa / Google Home. More details here
* Currently only supported on ESP32
Prerequisites
Refer this for setting up environment for building and running rainmaker-rs application.
Executing Examples
On ESP32 series of devices
- Erase flash contents
espflash erase-flash
- Make sure claiming is performed for your MCU(mentioned in prerequisites)
- Build and run the project
cargo run --target <mcu-target> --bin <name of example>
List of targets for various chipsets:
MCU | Target |
---|---|
ESP32 | xtensa-esp32-espidf |
ESP32-S2 | xtensa-esp32-espidf |
ESP32-S3 | xtensa-esp32-espidf |
ESP32-C2 | riscv32imc-esp-espidf |
ESP32-C3 | riscv32imc-esp-espidf |
ESP32-C6 | riscv32imc-esp-espidf |
Running on Linux
- Create directories for storing persistent data
mkdir -p ~/.config/rmaker/fctry
mkdir -p ~/.config/rmaker/nvs
-
Make sure claiming is performed for your MCU(mentioned in prerequisites) The claimdata is stored in
/home/<user>/.espressif/rainmaker/claim_data/<account_id>/<mac_address>
-
Run
cargo run --target x86_64-unknown-linux-gnu --bin <example>
OR
cargo run_linux --bin <example>
Once the example is running, open the rainmaker mobile application and follow on-screen instructions for adding device
When running for the first time, you'll need to set RMAKER_CLAIMDATA_PATH
environment variable to the folder containing your claim data (mentioned in step )
Or you can create a new project based on rainmaker-rs template
- Install
cargo-generate
$ cargo install cargo-generate
- Create a new project
$ cargo generate rainmaker-rs/template
More information about the generated template can be found at it's respective repository here
Dependencies
~3–19MB
~204K SLoC