Built a small Arduino-style UI/control library for ESP32 (Trellis) — looking for feedback

Hi all,

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

Design goals

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

Everything is embedded directly in firmware.

Current features

Right now it supports things like:

  • switches
    sliders
    sensors
    color controls
    text-style inputs
    auto-generated UI from declared capabilities

It also exposes device/system information like:

  • RSSI
    free heap
    uptime
    chip type

Desktop companion app

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

The Pico W side is compile-tested, but I don’t yet have one on the bench to run every example end-to-end, so I’d especially appreciate feedback there if anyone tries it.

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

What I’d love feedback on

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

Examples of things I’m considering adding:

  • rotary encoder support
    matrix keypad support
    stepper controls
    richer grouping/layout options

Repo

GitHub:

Examples currently in the repo include:

  • BasicSwitch
    GreenhouseController
    RGBLed
    TemperatureSensor
    AutoConnect

AutoConnect runs a captive portal AP for first-boot Wi-Fi provisioning.

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. :D

I moved your topic to an appropriate forum category @ovexro.

In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

Fails to compile due to

WebSocketsServer.h: No such file or directory

Could you please give more details? So I can debug the issue and implement the fix.

Thanks in advance. :blush:

Here is the entire verbose compile output

loading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/230-Ultimate-Switch-Bounce-Eliminator: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ESP32-Cheap-Yellow-Display: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/EspExceptionDecoder: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/FreeRTOS-Kernel-Book: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/KAMP-for-K1-Series: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/MiniCore: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/PN532: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/SDVirtualRAM-main: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ServoSmoothing: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Solar-Power-Load-Sharing: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/TTGO-T-Display: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/TeensyDocuments: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/XIAO-PowerBread: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/artyom-beilis.github.io: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/docs: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/electronics_cookbook: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/experiment-with-the-sense-hat: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/led_task: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/nebula_firmware: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/pi-spi-display: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/pure-bash-bible: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/pure-sh-bible: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/simple-electronics-gpiozero-2e: invalid library: no header files foundloading library from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/zephyr: invalid library: no header files found
FQBN: esp32:esp32:esp32doit-devkit-v1
Using board 'esp32doit-devkit-v1' from platform in folder: /Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7
Using core 'esp32' from platform in folder: /Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7

/usr/bin/env bash -c "[ ! -f \"/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor\"/partitions.csv ] || cp -f \"/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor\"/partitions.csv \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/partitions.csv"
/usr/bin/env bash -c "[ -f \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/partitions.csv ] || [ ! -f \"/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1\"/partitions.csv ] || cp \"/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1\"/partitions.csv \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/partitions.csv"
/usr/bin/env bash -c "[ -f \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/partitions.csv ] || cp \"/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7\"/tools/partitions/default.csv \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/partitions.csv"
/usr/bin/env bash -c "[ -f \"/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor\"/bootloader.bin ] && cp -f \"/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor\"/bootloader.bin \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/TemperatureSensor.ino.bootloader.bin || ( [ -f \"/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1\"/bootloader.bin ] && cp \"/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1\"/bootloader.bin \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/TemperatureSensor.ino.bootloader.bin || \"/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esptool_py/5.1.0\"/esptool --chip esp32 elf2image --flash-mode dio --flash-freq 80m --flash-size 4MB -o \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/TemperatureSensor.ino.bootloader.bin \"/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7\"/bin/bootloader_dio_80m.elf )"
esptool v5.1.0
Creating ESP32 image...
Merged 2 ELF sections.
Successfully created ESP32 image.
/usr/bin/env bash -c "[ ! -f \"/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor\"/build_opt.h ] || cp -f \"/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor\"/build_opt.h \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/build_opt.h"
/usr/bin/env bash -c "[ -f \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/build_opt.h ] || : > \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/build_opt.h"
/usr/bin/env bash -c ": > '/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts'"
/usr/bin/env bash -c "cp -f \"/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7\"/sdkconfig \"/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA\"/sdkconfig"
Detecting libraries used...
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for Trellis.h: [Trellis@0.4.3]
ResolveLibrary(Trellis.h)
  -> candidates: [Trellis@0.4.3]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for ArduinoJson.h: [ArduinoJson@7.4.3]
ResolveLibrary(ArduinoJson.h)
  -> candidates: [ArduinoJson@7.4.3]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for WiFi.h: [WiFiEspAT@1.5.0 WiFiNINA@2.0.1 WiFi@3.3.7]
ResolveLibrary(WiFi.h)
  -> candidates: [WiFiEspAT@1.5.0 WiFiNINA@2.0.1 WiFi@3.3.7]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WiFi/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for Network.h: [Networking@3.3.7]
ResolveLibrary(Network.h)
  -> candidates: [Networking@3.3.7]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WiFi/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/Network/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for ESPmDNS.h: [ESPmDNS@3.3.7]
ResolveLibrary(ESPmDNS.h)
  -> candidates: [ESPmDNS@3.3.7]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WiFi/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/Network/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/ESPmDNS/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for WebServer.h: [WebServer@3.3.7]
ResolveLibrary(WebServer.h)
  -> candidates: [WebServer@3.3.7]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WiFi/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/Network/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/ESPmDNS/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WebServer/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for FS.h: [FS@3.3.7]
ResolveLibrary(FS.h)
  -> candidates: [FS@3.3.7]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WiFi/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/Network/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/ESPmDNS/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WebServer/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/FS/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
Alternatives for Update.h: [Update@3.3.7]
ResolveLibrary(Update.h)
  -> candidates: [Update@3.3.7]
/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp-x32/2511/bin/xtensa-esp32-elf-g++ -c @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/cpp_flags -w -Os -Werror=return-type -w -x c++ -E -CC -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -DARDUINO_PARTITION_default -DARDUINO_HOST_OS="macosx" -DARDUINO_FQBN="esp32:esp32:esp32doit-devkit-v1:UploadSpeed=921600,FlashFreq=80,DebugLevel=none,EraseFlash=none" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_USB_CDC_ON_BOOT=0 @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/defines -I/private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor -iprefix /Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/include/ @/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/flags/includes -I/Users/ronalexander/Library/Arduino15/packages/esp32/tools/esp32-libs/3.3.7/dio_qspi/include -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/cores/esp32 -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/variants/doitESP32devkitV1 -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src -I/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/ArduinoJson/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WiFi/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/Network/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/ESPmDNS/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/WebServer/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/FS/src -I/Users/ronalexander/Library/Arduino15/packages/esp32/hardware/esp32/3.3.7/libraries/Update/src @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/build_opt.h @/Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/file_opts /Users/ronalexander/Library/Caches/arduino/sketches/FF78DB451C33968633F5907136CBD2EA/sketch/TemperatureSensor.ino.cpp -o /dev/null
In file included from /Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src/Trellis.h:23,
                 from /private/var/folders/g9/g923bvbn7995gtv9ndrdbkdc0000gn/T/.arduinoIDE-unsaved202639-22800-15gta8i.j1oc/TemperatureSensor/TemperatureSensor.ino:14:
/Users/ronalexander/Documents/Electronics/SourceCode/Arduino/libraries/Trellis/src/TrellisWebServer.h:6:10: fatal error: WebSocketsServer.h: No such file or directory
    6 | #include <WebSocketsServer.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Alternatives for WebSocketsServer.h: []
ResolveLibrary(WebSocketsServer.h)
  -> candidates: []
exit status 1

Compilation error: exit status 1

There are 889 hits on WebSocketServer in github. Care to narrow that down?

Thanks for the detailed output! The issue is that the Arduino IDE doesn't automatically install library dependencies. Trellis requires two libraries:

  1. ArduinoJson by Benoit Blanchon (you have this one)
  2. WebSockets by Markus Sattler (this one is missing)

To fix it: In Arduino IDE, go to Sketch → Include Library → Manage Libraries, search for "WebSockets" by Markus Sattler, and install it. Then the sketch should compile.

I'll add this to the README to make it more visible. Sorry for the confusion!

OR just click the Library Icon and then search.

Ok, it now compiles so I will grab an ESP32 and try the examples when I finish my other tasks.

When you install a library via the Arduino IDE Library Manager, a dialog will appear that offers to also install the dependencies specified by the library's metadata:

If the user clicks the "INSTALL ALL" button in that dialog, Arduino IDE automatically installs those dependencies.

So I conclude that @sonofcy either selected the "INSTALL WITHOUT DEPENDENCIES" button in the dialog, or else installed the library via a mechanism other than Library Manager.

I downloaded the zip and I think I did see the dependencies pop up BUT it only listed ArduinoJson.

OK, this explains it. The dependencies installation system is exclusive to Library Manager. You do indeed need to handle installation of dependencies if you choose to use an alternative method of installing the library, such as the "Add .ZIP Library..." feature.

I recommend remove that false information from the readme.

I think what happened is I saw the github reference in post 1 and assumed that was how I was supposed to get access to the library and examples. When I see a github link I will almost always take it as my luck at searching the library manager is pitiful. Maybe I should ask if there is a trick' to searching the library manager. I have on many occasions used the include name as the search string and come up empty.

Thanks @ptillisch. :blush: You're right, that was incorrect in the README.

I've fixed it: Library Manager does offer to install dependencies automatically when you click "INSTALL ALL". The manual steps now only apply to zip installs.

@sonofcy, good to know the GitHub link led you down the zip path. For what it's worth, Trellis was only added to the Library Manager index a few days ago, and the Arduino indexer is still catching up, so searching for it there wouldn't have found it yet.

Once it's indexed, searching "Trellis" should surface it directly.

I'll make the Library Manager installation more prominent in the README once it's live.

It is worth noting that there are unique considerations regarding downloading a library from GitHub vs. installing via Library Manager. Library Manager only offers the release versions of the library. You can also obtain those from GitHub, but by default the ZIP file you download from GitHub will be the revision of the library from the tip of the default branch of the Git repository. This would generally be the development version of the library, which includes all the changes the developers made to the library since the time of the last release.

So if you wish to do beta testing, or if you require capabilities or fixes that have not yet been released, then installing the library via Library Manager will not be suitable and downloading the ZIP file from GitHub is the way to go. If your intent is to test the library and provide @ovexro with feedback, then you made the correct decision by getting the development version of the library from GitHub (since feedback on the current revision of the library is more useful than feedback on a release version which may be missing significant development work).

Conversely, for someone whose goal is only to obtain a stable library to use in their projects, they should be careful about obtaining the library from GitHub. The development/beta version of a library you will get by default may contain work that is either incomplete, or hasn't passed through the validation the maintainer would perform prior to feeling it was ready for release to production usage.

Library Manager searches against the content of the metadata that is defined by the library developers. It is even smart enough to be fuzzy in regards to the replacement characters that may be present in the header filename, but not in the metadata. For example, if you use the search query Adafruit_GFX, you will find the "Adafruit GFX Library" in the search results, even though that library's metadata does not contain the text Adafruit_GFX:

However, the search feature isn't magical. If the metadata of a library doesn't happen to contain the query in any form, then it isn't going to appear in the search results. In this case, the problem may be either that your query is not well formulated, or that the library metadata is incomplete or lacking in the detail that would provide sufficient keyword matches. If the latter, you can submit a report to the library maintainer, or a proposal for improving the metadata. Something that can be very helpful for searchability is for the library developer to add the optional includes property to the metadata. This will ensure a search for the filename of the library's primary header file will get a match in the case where the header file doesn't match against the library name.

The Library Manager search does have an advanced capability (as described here). However, it is for being more targeted in the case of queries that produce a large number of result. So it won't be helpful in the case where the target library is not present in the results for your query.

First, thank you for the information. Some of this I did not know and some I could have guessed but always took the wrong path.
I should explain the first time I heard of github was when I got involved with the Arduino community. In my working years I never encountered it because both my major employers were 'niche' software environments.

I sort of knew about the 'tip' vs Releases and one time used a release to good advantage. I must admit that I have been less than professional in my old age but will endeavour to rectify that going forward. That does raise 1 question though, if I install the last stable release will the auto update offer the 'tip' or does it only work from the released branch and is there a stable release vs a release that is not stable yet?

I did notice the Library Manager search was sometimes very clever, but when I have encountered issues I have as a test tried to search for a library I had installed and sometimes I needed 3, 4, 5 guesses and rarely never found it. When that happens I use github. Nobody has ever educated me as to what libraries are in the Library Manager and which are only in Github. I have always assumed it was VERY hard to get listed in the Library Manager. I until now thought you needed to prove hundreds if not thousands of hours of testing prior to beig allowed to get listed in the Library Manager.

I just had a look at the 'advanced' search capabilities and can see me using them in the future. Would it not make sense to hook that to a ? symbol on the Library Manager like the following?

No. Arduino IDE's library update feature uses the Library Manager system. Library Manager distributes release versions of libraries. The only way to get non-release versions is to install that non-release version of the library via the "Add .ZIP Library..." feature or manually.

It is up to each library maintainer to determine how they want to manage releases. They can indeed make "pre-releases" if they like. Library Manager only has an understanding of releases, and not of what the significance might be of the version number of a release.

The technical requirements for acceptance of a library are listed here:
https://github.com/arduino/library-registry/blob/main/FAQ.md#what-are-the-requirements-for-a-library-to-be-added-to-library-manager

Beyond that, the person submitting the library must have the technical competence to be able to add the URL of the library to a text file, and to submit a pull request to our repository for that change. We provide detailed instructions for doing this:
https://github.com/arduino/library-registry/tree/main#adding-a-library-to-library-manager

Working with GitHub is a bit complex, but this is a system for use by people who have the technical competence to create and maintain a library suitable for sharing with the entire Arduino community. Anyone who can do that should have no difficulty learning how to use the GitHub pull request system, if they don't already have that skill which is commonplace for software developers. And the effort to learn the skill will surely have benefits far beyond only accomplishing a library submission, as this will also apply to collaborative work on many open source software projects.

That is a great idea. It definitely should be documented.