flua is usually quiet when things go well and loud when they do not. This post is the short version of the troubleshooting skill: the most common problems, what they mean, and the fix — for Windows and macOS. No programming background required.
Before anything else, run:
flua doctor
It checks the nine things that usually go wrong — the flua install, the Python environment, the HC3 credentials and whether the controller is reachable (without ever printing your password), the VS Code setup, and more. Each line is a ✓ or ✗ with the reason. If doctor is all green and something still fails, the sections below cover the usual suspects.
flua: error: online mode requires HC3_URL (or HC3_HOST) in the environment
flua runs offline against a simulated HC3 by default — no controller
needed. This error means something asked for the real controller:
--api remote on the command line, or --%%mode:online /
--%%mode:proxy in the QA file's header — but flua could not find
the controller's address.
Two fixes:
.env file (in the
project folder, in your home folder, or as environment variables):
HC3_URL, HC3_USER, HC3_PASSWORD.flua --api local myqa.lua, or
--%%mode:offline in the QA header.If the credentials are wrong, flua stops immediately instead of
retrying — the HC3 locks itself after 4 failed attempts, and flua will not
burn those on your behalf. Fix the password in .env, wait for
the lock to clear, and run again: exactly one attempt was spent.
Symptom: you upgraded flua, something went wrong, and now every command dies with a Python traceback like:
ImportError: cannot import name '__version__' from 'flua'
What happened: the upgrade was interrupted halfway — often a running flua process (or an antivirus scan) locked files on Windows — so the install folder now holds a mix of new and old files. Re-running the upgrade says "all requirements already satisfied", because pip only compares version numbers, not files.
The fix is a forced reinstall. Close all flua windows and VS Code debug sessions first, then:
python3 -m pip install --upgrade --force-reinstall --no-cache-dir fibaro-flua
On Windows, use python -m pip ... and add --user
if your error path mentions AppData\Roaming\Python (that is
the "user install" location — it must match how you installed flua the
first time). --force-reinstall overrides "already satisfied",
and --no-cache-dir rules out a corrupted download. Verify with
flua --version.
Proxy mode (--%%mode:proxy) runs your QA on the laptop while
the device lives on the HC3. Button presses travel from the HC3 back to
your computer — so two things must be true:
flua: proxy connected — MyQA_Proxy (57) sends actions and UI events to http://192.168.1.23:8080
The IP must be your computer's real network address. On Windows compare
with ipconfig, on macOS with ipconfig getifaddr en0.
If it shows a VPN or virtual-machine address instead, that is the problem:
the HC3 cannot route to it. (Running flua inside WSL on Windows has the
same effect — run it in normal Windows Python.)
If the address looks right but presses still do nothing, it is almost always the firewall — the most common cause on both systems, because everything flua sends works while everything incoming is silently blocked:
netsh advfirewall firewall add rule name="flua proxy" dir=in action=allow protocol=TCP localport=8080
The rule belongs to one Python installation — a new venv or a new Python
version needs its own. Change the port with FLUA_PROXY_PORT in
.env if 8080 is taken (flua silently moves to the next free
port — the log line above always names the real one).
Quick test for both systems: while flua runs, open
http://<your-ip>:8080/ in a browser on your phone
(same Wi-Fi). Any answer — even "not found" — proves the network path is
open; a timeout means the firewall (or the router's Wi-Fi client
isolation) is still in the way. To see whether flua is listening: on
Windows netstat -ano | findstr :8080, on macOS
lsof -nP -iTCP:8080 -sTCP:LISTEN.
flua exits when nothing is pending — no timers, no messages, no
connections. A QA that just waits for HC3 events needs to say so:
--%%keep-alive:true in the header (proxy QAs do this
automatically), or run with flua --run-for 0 /
flua --ui to stay alive while you experiment.
WARNING flua.config: unknown --%% directive: --%%instnat:true
That is a typo in a --%% header line (here:
instant). flua parses it anyway and warns at runtime;
flua --check myqa.lua reports it with the file name. And
if startup fails with unknown device type, the error names the
closest matches — the full list of supported types is one command away:
flua --tool catalog
Three things, in order:
flua --check myqa.lua — static problems, named and
located.flua --log json myqa.lua — one JSON object per log line,
easy to search; and the engine keeps its own diary at
http://localhost:<ui-port>/flua/systemLog when the
viewer runs.self:debug("...") lines — plus
--%%debug:refreshState=true,api=true,http=true,ws=true in the
header to see every event and API call the emulator sees.If you work with an agent (Claude, Copilot, …), point it at the
flua-troubleshooting skill — it carries the deeper sections
(bridge errors, virtual-time surprises, the debugger) with the exact
remedies.