Claiming Documentation
September 17, 2025 ยท View on GitHub
ESP RainMaker requires devices to be claimed before they can be used. This documentation explains the claiming process.
Overview
Claiming is the process of associating an ESP32 device with your ESP RainMaker account. It involves:
- Connecting to the device
- Generating cloud credentials
- Flashing these credentials to the device
Claiming Command
esp-rainmaker-cli claim <port> [options]
Where:
portis the serial port where your device is connected
Options:
--platform: Node platform (ESP32, ESP32-S2, ESP32-C3, etc.)--mac: Node MAC address in the format AABBCC112233--addr: Flash address where claim data will be written (default: 0x340000)--outdir: Directory to store claim files--matter: Use Matter claiming (for Matter-enabled devices)--type: Special RainMaker Node type (e.g., "camera" for camera devices)
Example:
esp-rainmaker-cli claim /dev/ttyUSB0 --platform esp32
Claiming Process in Detail
Prerequisites
Before claiming:
- Have an ESP32-based device with ESP RainMaker firmware
- Know which serial port the device is connected to
- Have the device in a claimable state (typically after flashing the firmware)
Steps
-
Connect the device: Connect your ESP32 device to your computer via USB
-
Find the serial port:
- On Linux/macOS:
ls /dev/tty* - On Windows: Check Device Manager under Ports (COM & LPT)
- On Linux/macOS:
-
Claim the device:
esp-rainmaker-cli claim /dev/ttyUSB0(Replace with your port name)
-
During claiming:
- The CLI will connect to the device
- Generate cloud credentials
- Program the credentials to the device
- The device will reboot
-
After claiming:
- The device should be listed in your ESP RainMaker account
- Use
getnodesto check if the device is listed - The device is now ready to be provisioned (see Provisioning Documentation)
Advanced Claiming Options
Claiming with Custom Flash Address
If your firmware expects the claim data in a specific flash location:
esp-rainmaker-cli claim /dev/ttyUSB0 --addr 0x350000
Specifying MAC Address
For some workflows, you may need to specify the MAC address:
esp-rainmaker-cli claim --mac AABBCC112233
Saving Claim Data
To save the claim data files to a specific location:
esp-rainmaker-cli claim /dev/ttyUSB0 --outdir ~/my_devices/
Matter Claiming
For Matter-enabled devices:
esp-rainmaker-cli claim /dev/ttyUSB0 --matter
Camera Device Claiming
For camera devices that require video streaming capabilities:
esp-rainmaker-cli claim /dev/ttyUSB0 --type camera
This will:
- Automatically apply the standard MQTT policy for basic device communication
- Automatically apply the videostream policy for camera-specific features
- Enable video streaming capabilities for the device
Troubleshooting
Claiming Issues
Connection Problems
If the CLI cannot connect to the device:
- Check if the correct port is specified
- Ensure the device is connected and powered on
- Try a different USB cable or port
- Check if you need special drivers for your device
Flashing Problems
If the claiming process fails during flashing:
- Ensure the device is in bootloader mode (some devices need a button press sequence)
- Try specifying the platform with
--platform - Verify the flash address is correct for your firmware
Best Practices
- Update Firmware: Always use the latest firmware on your devices
- Secure PoP Codes: Keep your Proof of Possession (PoP) codes secure, as they provide access to your devices
- Documentation: Document the claim details of your devices for future reference
- Backup Claim Data: Store the claim data securely as it may be needed for recovery