I’ve been working on a small library for ESP32 called Trellis, and I thought it might be useful to share here and get some feedback from people actually building with these boards.
What it does
The main idea is:
Instead of building a custom web UI for every ESP32 project, you declare the device’s controls/sensors in code, and Trellis automatically generates the interface.
So rather than writing HTML/CSS/JS for every project, you do something like this:
Code: Select all
#include <Trellis.h>
Trellis trellis("Greenhouse");
void setup() {
trellis.addSwitch("pump", "Water Pump", 13);
trellis.addSensor("temp", "Temperature", "C");
trellis.addSlider("fan", "Fan Speed", 0, 100, 25);
trellis.begin("YourSSID", "YourPass");
}
void loop() {
trellis.setSensor("temp", readTempSensor());
trellis.loop();
delay(2000);
}That gives you:
- a built-in dashboard at `http://<device-ip>/`
live updates over WebSocket
OTA updates
mDNS (`<name>.local`)
automatic device telemetry
a JSON capability endpoint for external tools
I tried to keep it simple and self-contained:
- no cloud dependency
no required MQTT broker
no account / pairing flow
no SPIFFS / SD card requirement
no external frontend assets or CDN
works offline on the LAN
Current features
Right now it supports things like:
- switches
sliders
sensors
color controls
text-style inputs
auto-generated UI from declared capabilities
- RSSI
free heap
uptime
chip type
I also built a desktop app for Linux / Windows / macOS that auto-discovers Trellis devices on the LAN and renders them into one unified dashboard.
That part is optional though — each ESP32 still works fully on its own through the built-in local web UI.
Compatibility
At the moment:
- ESP32 is the main target
Pico W is also supported at the source level
What is still missing / rough
A few things are definitely not finished yet:
- battery / deep sleep awareness
multi-device coordination / mesh-style behavior
more advanced hardware capability types
If anyone takes a look, I’d especially appreciate opinions on:
- whether the auto-generated UI idea feels useful or too restrictive
what capability types are missing
whether this would fit your workflow better than writing a small custom web UI per project
- rotary encoder support
matrix keypad support
stepper controls
richer grouping/layout options
GitHub:
https://github.com/ovexro/trellis
Examples currently in the repo include:
- `BasicSwitch`
`GreenhouseController`
`RGBLed`
`TemperatureSensor`
`AutoConnect`
Small note
I also just pushed v0.4.2, which fixes a no-WiFi `LoadProhibited` crash in `loop()` that could occur if `begin()`’s return value was ignored.
If anyone here gives it a spin, I’d genuinely appreciate any feedback — good or bad.
Thanks.