-
-
Notifications
You must be signed in to change notification settings - Fork 5
Troubleshooting
This page collects the most common problems and how to fix them. For protocol- and architecture-level reference, see Protocol Details and Architecture.
./ankerctl.py config show # account configured? printer present?
./ankerctl.py mqtt monitor # MQTT cloud connectivity (Ctrl-C after a few events)
./ankerctl.py pppp lan-search # LAN discovery (printer must appear within ~5s)
curl http://localhost:4470/api/health # web server alive?If any of these fails, jump to the relevant section below.
Symptoms: pppp lan-search returns nothing, no video stream, file uploads fail.
Causes (most common first):
-
Firewall blocking UDP
32108. On Linux withufw, run:sudo ufw allow in proto udp to any port 32108See Firewall ufw for the full background.
-
Different subnet / VLAN. PPPP discovery uses a UDP broadcast — broadcasts do not cross routers. Put
ankerctland the printer on the same L2 segment. -
Wi-Fi client isolation. Some access points (especially "Guest Network" SSIDs) block client-to-client traffic. Disable AP isolation or move both devices onto the main SSID.
-
Docker bridge networking. You must use
network_mode: hostindocker-compose.yaml. Bridge networking blocks UDP broadcasts. macOS and Windows hosts cannot use host networking — fall back to the Python install. -
Printer in sleep mode. Wake it via the touchscreen and retry within a few seconds.
-
Wrong printer selected. If multiple printers are configured, check
PRINTER_INDEXor use the printer selector in the navbar.
Symptoms: No print status updates in the UI, cannot send G-code, dashboard shows no temperatures.
-
Config not imported. Open Setup → Account and either upload
login.json, click Import From eufyMake Studio, or sign in directly. -
auth_tokenexpired. Re-import the cache or re-runconfig login. Tokens expire after extended periods; the symptom is usually a clean disconnect followed by no reconnect. -
Outbound port blocked. MQTT connects to Anker's cloud broker on TCP
8789(TLS). Verify your firewall allows outbound8789. -
Region mismatch. If your account moved regions (US ↔ EU), re-run
config loginsoankerctlre-detects the closest API server. -
Self-hosted broker without CA pin. If you switched to the offline / Mosquitto stack, you must point
ankerctlat the local CA:./ankerctl.py --mqtt-ca-cert /path/to/ca.crt mqtt monitor # or via env var ANKERCTL_MQTT_CA_CERT=/path/to/ca.crt
-
Bind address. Default is
127.0.0.1. For Docker or remote access, setFLASK_HOST=0.0.0.0. -
Port conflict. Default port is
4470. Check:ss -tlnp | grep 4470 lsof -i :4470 -
Host firewall (TCP). Allow the web port:
sudo ufw allow in proto tcp to any port 4470
-
API key configured but not provided. Append
?apikey=<key>to any URL once — a session cookie is set automatically. -
Session expired. Clear cookies and re-bootstrap with
?apikey=<key>. -
Wrong key. Keys are case-sensitive. Verify with
./ankerctl.py config show. Env varANKERCTL_API_KEYtakes precedence over the value indefault.json.
-
PPPP not connected. Check the PPPP status dot in the navbar. If yellow → the IP is a stale fallback. If red → discovery failed (see "Printer not found on LAN" above).
-
Browser codec. The stream is raw H.264 NAL units rendered with jMuxer. Chrome and Firefox work best. Safari and embedded browsers may struggle.
-
Stall detection. No frame for 5 s triggers a soft restart; 3 consecutive failures raises
ServiceRestartSignaland recreates the video service. Reload the page after a stall. -
videoqueuenot started. Confirm withGET /api/debug/services(whenANKERCTL_DEV_MODE=true).
The error message displayed in the red banner is the actual upstream error. Common cases:
- "eufyMake Studio not running" — the LevelDB is locked while the slicer is closed. Open and sign into the slicer, then retry.
- "Login failed: invalid credentials" — re-check email/password. Try the country code that matches your account region.
- "CAPTCHA required" — solve the inline CAPTCHA and retry.
-
File too large. Increase
UPLOAD_MAX_MB(default2048). - PPPP not connected. File transfer uses PPPP. See "Printer not found on LAN".
-
Upload rate too high. On congested Wi-Fi, lower
UPLOAD_RATE_MBPSto5. Raise to25or50only on stable wired networks.
-
"Send and Print" semantics.
ankerctluploads and immediately starts. There is no upload queue on the printer. - Printer busy. A print is already running. Pause or cancel it first.
- Touchscreen conflict. If someone is interacting with the touchscreen at the moment of the start, the printer can ignore the start command. Retry.
-
Slicer compatibility. Use PrusaSlicer, OrcaSlicer, SuperSlicer, or Bambu Studio. Other slicers may emit commands the Anker firmware does not understand (e.g.
M115,M119,M503are stripped from the Anker Marlin fork). - File encoding. Use UTF-8 with LF line endings. CRLF can break the slicer-header parser used to extract layer counts.
- Anker-removed commands. See Protocol Details → Firmware notes for the full list of disabled G-codes.
The printer reports layer counts based on Z-moves, which differs from slicer-declared totals when variable layer height is used. ankerctl extracts ;LAYER_COUNT:N (Orca), ; total layer number: N (Bambu), or counts ;LAYER_CHANGE (Prusa) from the G-code header at upload time. If the slicer omits these markers, the printer's count is shown instead.
-
Feature disabled. Set
TIMELAPSE_ENABLED=true(env var or Setup → Timelapse). -
ffmpegnot installed. Required for video assembly. Verify withffmpeg -version. Docker images ship with it; for Python installs, install separately (apt install ffmpeg,brew install ffmpeg). -
No active print. Capture only runs during prints — it auto-starts on
ct=1000 value=1and assembles onct=1000 value=0.
- Camera unavailable. If PPPP is disconnected during the capture, no frames are saved.
-
Interval too long. For a 10-minute print at the default 30 s interval, you get ~20 frames. Reduce
TIMELAPSE_INTERVAL_SEC. - Resume window. A paused-and-resumed print appends to the same timelapse only if resumed within 60 minutes. Beyond that, a new capture starts.
TIMELAPSE_LIGHT controls the printer LED:
-
snapshot— light on, wait 1.5 s, shoot, wait 1 s, light off (per frame) -
session— light on at capture start, off at finish - (unset) — do not touch the light
Verify the value in Setup → Timelapse or via ./ankerctl.py config show.
-
Apprise server unreachable.
APPRISE_SERVER_URLmust point to a running Apprise API server (the Docker image iscaronc/apprise-api). -
Wrong key.
APPRISE_KEYmust match the key configured in your Apprise server. -
Event disabled. Each event has its own toggle:
APPRISE_EVENT_PRINT_STARTED,APPRISE_EVENT_PRINT_FINISHED,APPRISE_EVENT_PRINT_FAILED,APPRISE_EVENT_GCODE_UPLOADED,APPRISE_EVENT_PRINT_PROGRESS. - Test first. Use Setup → Notifications → Send test to isolate the connection.
-
Live snapshot failed. The Apprise notifier asks
VideoQueuefor a frame; if PPPP is down, it falls back to the G-code preview whenAPPRISE_SNAPSHOT_FALLBACK=true. - No G-code preview. Some slicers do not emit a thumbnail. Enable thumbnail export in your slicer settings.
-
Quality mismatch.
APPRISE_SNAPSHOT_QUALITY=fhdrequires the printer to be in snapshot mode (FHD is not used for live streaming).
-
MQTT broker. Set
HA_MQTT_HOSTandHA_MQTT_PORTto your broker (Mosquitto, EMQX, etc.). Verify withmosquitto_sub -h <host> -t '#' -v. -
Discovery prefix. Default
homeassistant. If you customized HA's prefix, setHA_MQTT_DISCOVERY_PREFIXto match. - Restart HA. After the first publish, restart Home Assistant to pick up the discovery payloads.
- MQTT integration. The HA MQTT integration must be installed and configured.
Multi-printer Camera-Discovery is currently incomplete: HA registers only one camera (the active printer). For 2+ printers, the second camera is not auto-registered. This is a known limitation — see the issue tracker for status.
- MqttQueue not connected. The light command goes via PPPP, which requires a healthy LAN session. Check the PPPP status dot.
-
Topic mismatch. Verify in HA that the
Printer Lightswitch publishes on<HA_MQTT_TOPIC_PREFIX>/<printer_sn>/light/set.
-
Logs first:
docker logs ankerctl(ordocker compose logs -f ankerctl). -
Health check mismatch. The bundled
HEALTHCHECKcurls127.0.0.1:4470. If you setFLASK_HOSTto a specific non-loopback IP that is not also reachable as127.0.0.1, the check fails. UseFLASK_HOST=0.0.0.0(or unset). -
Volume permissions. The container runs as UID 1000 by default. If your host config dir is owned by a different user, the entrypoint cannot write
default.json. Rebuild with--build-arg UID=$(id -u) --build-arg GID=$(id -g)orchown -R 1000:1000 ~/.config/ankerctl.
sudo chown -R 1000:1000 ~/.config/ankerctl/
# or rebuild with matching UID/GID
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t ankerctl:local .Add :z to the mount: -v ~/.config/ankerctl:/home/ankerctl/.config/ankerctl:z.
-
Print active. Switching is blocked during a print and returns
409. Wait for the print to finish, or cancel it first. -
PRINTER_INDEXenv var locked. When set, the navbar dropdown is disabled andPOST /api/printers/activereturns403. Unset the env var and restart.
If you have two printers with the same alias, lan-search may return them in arbitrary order. Use the DUID (not the alias) to identify which one you want and set PRINTER_INDEX accordingly.
For deep inspection set ANKERCTL_DEV_MODE=true and restart. Then:
- Debug tab in the UI exposes State Inspector, Simulation, Service health, Log Viewer
- All
/api/debug/*endpoints become available (auth required ifANKERCTL_API_KEYis set) -
/api/debug/serviceslists every service with state, refcount, and last error
Warning Do not enable in production. The Debug tab exposes internal state and lets you inject synthetic events.
Set ANKERCTL_LOG_DIR to enable per-component log files:
ANKERCTL_LOG_DIR=/var/log/ankerctl ./ankerctl.py webserver runFiles written:
| File | Source |
|---|---|
ankerctl.log |
Root logger + stdout mirror |
mqtt.log |
MQTT cloud client |
web.log |
Flask requests + WebSocket events |
history.log |
PrintHistory |
timelapse.log |
TimelapseService |
homeassistant.log |
HomeAssistantService |
bed_leveling/YYYYMMDD_HHMMSS.bed |
Saved bed grid snapshots |
In Docker, the standard mount path is /logs. View files via the Debug tab → Log Viewer (when ANKERCTL_DEV_MODE=true) or directly on disk.
Before opening an issue, please collect:
-
Version:
git rev-parse --short HEADor the Docker image tag -
Printer model and firmware: firmware is queryable with
./ankerctl.py mqtt send ZZ_MQTT_CMD_FIRMWARE_VERSION -
Log excerpt: the last ~200 lines of
ankerctl.log(redactauth_token,mqtt_key, email) - Repro steps: the exact CLI / UI sequence that triggers the issue
Open at https://github.com/Django1982/ankermake-m5-protocol/issues.