Skip to content

A cross-platform implementation of ESP Rainmaker for ESP32 products and Linux using Rust.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rainmaker-rs/rainmaker

Repository files navigation

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

WIP / Not started

  • Local Control:
    Controlling nodes on same LAN without directly without going through the cloud.
  • OTA:
    Support updating firmware over internet.
  • Assisted Claiming:
    Using the capability of phone application to perform node claiming during the provisioning workflow.

Prerequisites

Refer this for setting up environment for building and running rainmaker-rs application.

Executing Examples

On ESP32 series of devices

  1. Erase flash contents
espflash erase-flash
  1. Make sure claiming is performed for your MCU(mentioned in prerequisites)
  2. 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

  1. Create directories for storing persistent data
mkdir -p ~/.config/rmaker/fctry
mkdir -p ~/.config/rmaker/nvs
  1. 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>

  2. 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

About

A cross-platform implementation of ESP Rainmaker for ESP32 products and Linux using Rust.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages