Skip to content
Flyght
Sign in

FlyghtEdge · Flyght Cloud

Documentation

From installing the library to a device you watch and control from anywhere, step by step.

FlyghtEdge 2.5.0 · ESP32, S2, S3, C3, C5, C6 · What’s new

Get the library with Arduino CLI

Terminal
arduino-cli config set library.enable_unsafe_install true
curl -L -o FlyghtEdge.zip https://github.com/khulqu15/FlyghtEdge/releases/download/2.5.0/FlyghtEdge-2.5.0.zip
arduino-cli lib install --zip-path FlyghtEdge.zip

Needs Arduino CLI and the ESP32 board support; the Quickstart below sets both up. In Windows PowerShell write curl.exe instead of curl.

Getting started · 01

Quickstart

From an empty computer to a board running its own dashboard, in a few steps you can tick off.

Tell the guide what you have and it lays out the steps for you, with the commands to paste. You need an ESP32 board, a USB cable and about twenty minutes. No account is needed to try it.

Fly, your guide

Hi, I’m Fly! Tell me what you have and I will lay out the steps. Tick each one when it is done.

Your computer
Your board
What you want

0 of 7 steps done

  1. Install Arduino CLI

    Download the Windows installer from the Arduino CLI page and run it. Then open a new PowerShell window and check that it answers.

    Terminal
    arduino-cli version

    Open the Arduino CLI page
  2. Add support for ESP32 boards

    The library needs the Arduino-ESP32 core 3.3.x. This tells Arduino CLI where to find it and installs it (a few hundred MB, it takes a while).

    Terminal
    arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
    arduino-cli core update-index
    arduino-cli core install esp32:esp32@3.3.0

  3. Install the FlyghtEdge library

    It comes as a zip from the GitHub release. Arduino CLI treats a zip as an outside source, so the first line allows it once.

    Terminal
    arduino-cli config set library.enable_unsafe_install true
    curl.exe -L -o FlyghtEdge.zip https://github.com/khulqu15/FlyghtEdge/releases/download/2.5.0/FlyghtEdge-2.5.0.zip
    arduino-cli lib install --zip-path FlyghtEdge.zip

  4. Use the first sketch

    The library installed an example that needs only the board: 06_BuiltinLed. This names its folder once, so the next steps can be pasted as they are. Without a key it runs as a 30 minute evaluation.

    Terminal
    $sketch = "$HOME\Documents\Arduino\libraries\FlyghtEdge\examples\06_BuiltinLed"

  5. Plug in the board and find its port

    Use a USB cable that carries data (some only charge). The board shows up as a port; note its name.

    Terminal
    arduino-cli board list

  6. Build and upload

    Replace COM3 with the port from the last step. The first build takes a minute or two.

    Terminal
    arduino-cli compile --fqbn esp32:esp32:esp32s3:PartitionScheme=no_fs $sketch
    arduino-cli upload -p COM3 --fqbn esp32:esp32:esp32s3:PartitionScheme=no_fs $sketch

  7. Set up the board from your phone

    The board makes its own Wi-Fi network named like the sketch (for example smart-lamp-C2D3). Join it with your phone: the setup wizard opens by itself. If it does not, open http://192.168.4.1. Choose a password, then the home Wi-Fi.

    See the setup pages →

Getting started · 02

Overview

What the three pieces are and how they fit.

FlyghtEdge is an Arduino library for ESP32 boards (it comes from the FlyghtNinno project). You declare what the device has, and the board serves its own web dashboard. This site is the other two pieces:

PieceWhereWhat it does
LibraryOn the ESP32Widgets, lights, flows, its own dashboard over Wi-Fi. Works with no internet and no account.
Key registryThis siteCreates the license key (API key) the library checks offline.
Cloud dashboardThis siteClaim devices to your account, watch and control them from anywhere, history, folders, members.

The path from nothing to a controlled device:

  1. Install Arduino CLI, the library and the ESP32 core.
  2. Create a license key in the registry.
  3. Write a sketch and upload it.
  4. Claim the device with the link it prints.
  5. Monitor it: live values, history, folders.
  6. Control it from the dashboard.

Getting started · 03

Install

The library, the core and the partition scheme.

ToolHow
Arduino IDESketch → Include Library → Add .ZIP Library… and pick FlyghtEdge-<version>.zip (or Library Manager when it is listed).
arduino-cliarduino-cli lib install --zip-path FlyghtEdge-<version>.zip
PlatformIOlib_deps = flyght-ninno/FlyghtEdge

Requirements: the Arduino-ESP32 core 3.3.x. Supported chips: ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C5 and ESP32-C6. The release package holds the public headers and a precompiled archive for each chip.

Partition scheme (important)

A full build is 1.3 to 1.7 MB, more than the default 1.2 MB app partition, so pick a scheme with two 1.9 MB slots:

ToolSetting
Arduino IDETools → Partition Scheme → No FS 4MB (2MB APP x2)
arduino-cli--fqbn esp32:esp32:esp32s3:PartitionScheme=no_fs
PlatformIOboard_build.partitions = partitions.csv

Getting started · 04

Key registry

Create, keep and use a license key.

Every build needs a license key, a string that starts with fnk_live_. It belongs to one owner and unlocks one edition. The board checks it by itself when it starts, so it needs no internet to accept it.

Create a key

  1. Sign in with Google or an email link (there are no passwords). The email must be verified.
  2. Open API keys and press New key.
  3. Enter the owner name (1 to 32 bytes; it is printed into the key) and create it.
  4. Copy the key now. It is shown once; the registry keeps it encrypted, and showing it again asks you to have signed in within the last five minutes.
  5. Put it in the sketch (below).
secrets.h, next to the sketch and kept out of version controlC++
#define FN_LICENSE_KEY "fnk_live_..."

// in setup(), before dev.begin():
dev.license(FN_LICENSE_KEY);

Editions and limits

EditionWho makes itIncludes
FreeYou, up to 3 active keys, 5 new keys an hourThe dashboard, widgets, lights, devices, MQTT, HTTP API with tokens, webhooks. Updates with no end date.
ProIssued with the commercial licenseAdds visual flows, users and roles, white label. Covers releases up to its update date.
EnterpriseIssued with the commercial licenseAdds flows on their own RTOS threads.
  • Replace a key with Re-issue; revoke it when it leaks. Revoking frees the Free slot and cuts the cloud for the devices claimed with it.
  • Without a key, a mistyped or revoked key, or a release newer than the key’s update date, the device runs in evaluation mode: every feature on, a banner, and after 30 minutes the app stops until the next reset.
  • Use Verify to check a key: the page checks it in your browser.

Getting started · 05

Your first sketch

Five lines, a Wi-Fi portal and a dashboard.

SmartLamp.inoC++
#include <FlyghtEdge.h>

fn::Device dev("smart-lamp");

void setup() {
  pinMode(2, OUTPUT);
  dev.page("Control").toggle("light", "Porch Light", [](bool on) { digitalWrite(2, on); });
  dev.license("fnk_live_...");  // your API key; without one: 30-minute evaluation
  dev.begin();
}

void loop() { dev.loop(); }

StepWhat you doWhat happens
1Upload (partition scheme No FS 4MB)The board starts its own Wi-Fi smart-lamp-XXXX
2Join that Wi-Fi from your phoneThe dashboard opens by itself (captive portal)
3Choose "I have a key" or "Set up online"Both start with the admin password
4Create the admin passwordYou are signed in; the session lasts 30 days
5Paste the key, pick your home Wi-FiFlyght Cloud connects once Wi-Fi is up (or stay local)
6Open http://smart-lamp-xxxx.local on that networkThe dashboard

Widgets

WidgetValueCallback
toggle(id, label, cb)on / offvoid(bool)
button(id, label, cb)nonevoid()
slider(id, label, min, max, step, cb)numbervoid(float)
select(id, label, {options}, cb)textvoid(const String&)
text(id, label, cb)textvoid(const String&)
gauge(id, label, unit, min, max)number, read onlynone
value(id, label, unit)number or text, read onlynone
chart(id, label, unit, points)number series, read onlynone

Getting started · 06

Connect to the cloud

Claim the device into your account.

Flyght Cloud is off by default. Switch it on in the sketch or in the device’s Settings → Flyght Cloud (it needs a library release that has the cloud module; your version’s README says so).

C++
dev.license("fnk_live_...");   // the same key registers the device
dev.cloud().enable();          // or switch it on in Settings > Flyght Cloud

  1. The device registers with its license key and is told where to connect.
  2. Until it is claimed, Settings → Flyght Cloud shows an activation link. Open it while signed in here.
  3. The device is claimed to your account and appears under Devices, in the folder the key points to (or "unsorted").
  4. It connects over TLS, sends its widgets, and the dashboard shows it online.

What the status means

StatusMeaning
OffNot switched on
No networkWaiting for Wi-Fi
Needs a license keyNo key, or the server does not accept it
Claiming / ConnectingOn its way
OnlineConnected
RetryingServer busy or unreachable; tries again with a growing pause
StoppedThe server refused this device: key revoked, device blocked, owned by another account or no free slot

A license can have 3 (Free), 25 (Pro) or 250 (Enterprise) devices. The device is the owner’s: somebody else cannot claim the same board.