Chassy Component for ESP32
Overview
The Chassy Component is a library for ESP32 devices that enables seamless integration with the Chassy services. It provides functionality for device registration, authentication, and over-the-air (OTA) firmware updates. This component simplifies the process of connecting ESP32 devices to the Chassy cloud, allowing for remote management and monitoring of your fleet.
Key Features
Automatic device registration and enrolment
Secure authentication and communication using modern TLS protocols
OTA firmware updates
Status reporting to the Chassy endpoint
Requirements
ESP-IDF v5.5 or later: This component is built and tested with ESP-IDF version 5.5. Earlier versions may not be fully compatible.
OTA Partition Configuration: Your device must have at least 2 OTA partitions of 1 MB each to support the OTA update functionality.
NVS Storage: A minimum of 4 KB of NVS (Non-Volatile Storage) must be reserved for Chassy component use. This storage is used for maintaining device credentials, deployment information, and update status.
Network Connectivity: The device must have Wi-Fi or Ethernet connectivity to communicate with Chassy services.
Prerequisites
ESP-IDF: This component requires the Espressif IoT Development Framework (ESP-IDF). Follow the official installation guide to set up ESP-IDF on your development machine.
Bootstrap Token: A bootstrap token from your Chassy account is required for initial device enrolment.
Configuration
The component requires the following configuration in your device's Non-Volatile Storage (NVS):
hostname
: A unique name for your devicebootstrap_token
: The token obtained from your Chassy accountendpoint
: Set to either "development" or "production" depending on your environment
Integration Guide
To include the Chassy component in your ESP32 project:
Add the Chassy component as a library to your project
In your initialization function, call:
chassy::ChassyDeviceManager::run_on_init(device_ip_address);
In your main loop, periodically call:
chassy::ChassyDeviceManager::update_chassy_endpoint(device_ip_address);
To check for and perform updates when available:
auto status = chassy::ChassyDeviceManager::update_chassy_endpoint(device_ip_address); if (status == chassy::ChassyDeviceManager::CheckUpdateStatus::kUpdateAvailable) { chassy::ChassyDeviceManager::perform_update(device_ip_address); }
Enrolment
For a guide on how to enrol a new ESP32 device, please follow this guide.
Last updated