01 · Install

In this chapter you install the two tools you will use from now on, and you run one command that proves everything works. Ten to twenty minutes, no programming.

What you are installing

flua never changes anything on your HC3 until you explicitly tell it to (in a later chapter). Everything in the first chapters happens entirely on your own computer.

Step 1 — Python

Open a terminal and check:

python3 --version

You want 3.11 or newer. If you see an error or an older version, install the latest Python from python.org (Windows: tick "Add Python to PATH" in the installer).

✅ You should see something like Python 3.13.2.

Step 2 — VS Code

Download and install Visual Studio Code from code.visualstudio.com.

Step 3 — flua

In the terminal:

python3 -m pip install fibaro-flua

(On Windows this is usually py -3 -m pip install fibaro-flua.)

Check that it works:

flua --version

✅ You should see flua 0.1.x (or newer).

If the flua command is not found, it still works as a Python module — every flua command in this tutorial can also be written python3 -m flua.

Step 4 — the smoke test

One line, to prove the whole machine runs:

flua --api local -e 'print("Hello HC3!")'
🚀 flua 0.1.x (Lua 5.4, Python 3.x), mode offline
[04.10.2026][20:11:43][DEBUG  ][QA5000]: Hello HC3!

Let's unpack the two lines, because you will type them a lot:

Hello HC3! is your first QuickApp talking. That's the entire loop you will use from now on: write, run, look, adjust.

✅ You should see Hello HC3! in your terminal.

Step 5 — the checkup: flua doctor

flua can check its own health — and yours. One command tells you whether Python, flua, your project folder, and the editor setup are all right:

flua doctor
flua doctor
  ✓ flua              0.1.x (Lua 5.4, Python 3.x)
  ✓ virtualenv        virtualenv at ~/sunset-lamp/.venv
  ✓ HC3 credentials   not configured — offline sim only
  ✓ HC3 connection    skipped — no HC3_URL
  ✗ LuaLS setup       no .luarc.json/.luals — run `flua --tool setup` for HC3 autocomplete
  ✓ VS Code run/debug .vscode/launch.json present
  ✓ VS Code extension installed (version 0.1.84)
  ✓ flua-mcp          flua-mcp on PATH
  ✓ project files     1 QA file(s)
flua doctor: 8 ok, 1 problem(s)

Every ✓ is something that works; every ✗ names the fix right there. (The two ✗ above disappear after the next step.) When something breaks later — and it will — this is the first command to run, and the block to paste when you ask for help.

✅ You should see flua doctor with mostly ✓ marks. The ✗ ones are fine for now; the next step fixes them.

Step 6 — a project folder with everything set up

flua can prepare a project folder with all the VS Code settings you need (run buttons, a debugger setup, language help):

flua --tool setup my-first-qa
  wrote .vscode/launch.json
  wrote .vscode/extensions.json
  wrote .luarc.json
  wrote AGENTS.md
  wrote .github/skills
done — VS Code will suggest the Python and Lua MobDebug extensions on the next open; agents pick up AGENTS.md and the .github files; `flua --ui` serves the UI viewer at http://127.0.0.1:PORT/ (no file to open)
Read on:
  USAGE.md   https://github.com/jangabrielsson/flua/blob/main/USAGE.md
  Tutorial   https://github.com/jangabrielsson/flua/tree/main/docs/tutorial

(No viewer/index.html in the list — flua serves the viewer page itself when you run --ui; you'll meet it in chapter 03.) The two links at the end open in the browser with a cmd/ctrl-click — the USAGE.md manual for when you wonder "can flua do X", and this tutorial.

Now open the folder in VS Code — File → Open Folder… → my-first-qa. A popup asks you to install the recommended extensions (Python, Lua MobDebug, Lua Language Server, and flua) — accept. They give you syntax coloring, error squiggles, and later a debugger. The setup also installed a type library (the hidden .luals/ folder): the language server now knows what QuickApp, fibaro and api look like, so from chapter 02 on you'll get autocomplete and parameter hints as you type QA code.

The setup also installed launch configurations — small scripts that run your QuickApps when you press F5. From the next chapter on, F5 is how you run things; no terminal needed.

Step 7 (optional but smart) — your HC3's address

In a later chapter you will upload the lamp to your real HC3. flua finds it through a small settings file, and setting it up now takes one minute.

In your project folder, create a file named .env (in VS Code: File → New File… → .env):

HC3_URL=http://192.168.1.10/
HC3_USER=admin
HC3_PASSWORD=your-hc3-password

The address is the one you use to open your HC3 in a browser — the same admin user and password. This file stays on your computer; flua reads it and sends the credentials only to your own HC3.

(If you prefer not to, skip it — the next chapters run entirely on your computer and don't need it.)

You're set

Everything is installed. Next: your first QuickApp — seven lines that tick.