Read the symptom, not the manual: fixing Pi Agent when it stops working
Every other article explains what to do when things work. This one runs backward: read what is on screen — a red number, a spinner that never stops, a video with no sound — and work back.
Bookmark this one instead of reading it
Problems do not arrive in tutorial order: a key that worked for two months returns a 401 one Tuesday morning. So this page is arranged by symptom. Run the three checks, then jump to the section matching your screen.
flowchart TD
A["Something is wrong"] --> B["Three quick checks"]
B --> C{"What is on screen?"}
C -->|"401 / 402 / 429"| D["Key, credit or rate limit"]
C -->|"404"| E["Ingress and the add-on"]
C -->|"spinner or blank page"| F["No error code"]
C -->|"Skill or video step"| G["Workflow sections"]
C -->|"restarts every minute"| H["Watchdog loop"]
D --> I["Last 30 log lines"]
E --> I
F --> I
G --> I
H --> I
I --> J["GitHub issue"]
Under a minute, and usually enough
-
Check 1
Is the add-on still running?
Open
Settings → Add-ons → Woow HA Pi Agent. A green Started means running. If it says Stopped or shows red, select Start, allow 30-60 seconds for initialization, and try again. -
Check 2
Is a provider actually selected?
Look at the model selector above the message box. It should name a provider and model, such as
GLM / glm-4.6. If it is disabled or reads “No model,” open the Models panel, enter the key and confirm Test succeeds. -
Check 3
Can this network reach the internet?
Open
https://www.google.comin a new tab. If that fails, fix the connection first. If browsing works but one provider does not, check its official status page and confirm your network policy allows its API endpoint.
- The button row along the bottom: Stop, Restart, Uninstall, Open web UI. Stop is offered here because this add-on is running; a stopped one offers Start in its place — check 1 above.
- Current version: 0.12.0 under the title, with a Changelog link beside it. Note the number now; every request for help asks for it.
- Watchdog, on in this shot — it restarts the add-on when it stops answering, and it is the toggle you turn off while diagnosing a restart loop.
- The sidebar switch, labeled Add to sidebar on this build and Show in sidebar in the written documentation. If Pi Agent runs but has no entry in the left menu, this is the switch.
401, 402, 429, 404: four different people saying no
A members' club. 401 is the doorman refusing your card. 402 is the bar saying the tab is empty, 429 the same barman asking you to order more slowly. 404 is nobody refusing anything — you are at the wrong door of your own house.
401 Unauthorized
A red “401” or “Unauthorized” in the upper-right corner, and no reply: the provider rejected the credentials. About 90% of the time it is the key.
| Cause | Likelihood | Fix |
|---|---|---|
| Key wrong or expired | 90% | Models panel: pick the provider, enter a current key, select Test. Continue only once it passes. |
| Wrong baseUrl | 5% | Correct it against the provider's current endpoint. Never pair an OpenRouter key with a direct-provider endpoint, or the reverse. |
| Provider outage | 5% | Check the provider's status page — GLM, OpenAI and Anthropic each publish one. Wait, or switch to another configured provider. |
402 Payment Required, or 429 Too Many Requests
A 402, or a message containing insufficient_balance, “insufficient balance,” “rate limit” or “quota exceeded.” Credentials may be valid; the account has no usable credit, has hit a quota, or is being throttled.
insufficient_balance, credits and quota point at account credit. rate_limit and “too many requests” mean a temporary limit: wait one to two minutes, and do not fire duplicates while you wait.
If the balance is empty, top up at the provider handling your route — GLM bigmodel.cn, OpenAI platform.openai.com, Anthropic console.anthropic.com, OpenRouter openrouter.ai. No restart needed; the next request uses the new balance. Or switch to a second provider and model already configured and tested, checking its charges and limits first.
404 Not Found
“404 Not Found” or “Ingress token invalid,” after selecting Pi Agent in the sidebar or Open Web UI. Nearly always Ingress, the mechanism Home Assistant uses to proxy an add-on's web interface: it issues a temporary keycard, and keycards expire.
| Situation | What you see | Fix |
|---|---|---|
| Expired Ingress token | Worked earlier, 404s when you come back | Go to the Home Assistant home page and select Pi Agent again; a new token is issued. In rare cases you may need ha core restart. |
| Add-on is not running | Does not open at all; Open Web UI does not respond | Check the status on the Info tab. If stopped, select Start and wait 30-60 seconds. |
| Sidebar entry is missing | Pi Agent runs, nothing in the left sidebar | The three checks below. |
No sidebar entry at all
| Check | What to do |
|---|---|
| The sidebar switch | Settings → Add-ons → Woow HA Pi Agent → Info: Add to sidebar in the current interface, Show in sidebar in the documentation. Since v0.8.0 the add-on normally registers it through the Supervisor API at startup; switch it on by hand if that failed. |
| Administrator account | The panel uses panel_admin: true, so only an Administrator sees the entry — a standard account shared with family never will. Settings → People → Users, select the user, enable Administrator only if that level of access is appropriate. |
| One Home Assistant restart | Supervisor occasionally fails to register the side panel with Core. Run ha core restart, or use Restart Home Assistant in the interface. |
The spinner turns and no answer arrives
Nothing names the problem: the message sends, a spinner appears in the lower-right corner, nothing comes back. Four things, in order.
-
First
Confirm the basics
Is a model selected? Does Test succeed for that provider in the Models panel? If either answer is no, fix the configuration first.
-
Second
Allow for latency
Reasoning-capable models may take 30-60 seconds or longer before they begin responding. There is no universal ninety-second threshold — latency depends on the model, route, request size and provider load. Send the same prompt to another configured model to tell which it is.
-
Third
Check whether the network blocks the endpoint
A corporate VPN, school network, DNS filter or regional policy may block a provider's
baseUrl. Openinghttps://api.openai.comin a browser is a basic connectivity check, not a complete API test — also read the official status page and test DNS and HTTPS from the host that makes the requests. If blocked, switch to another configured route your network and location support. -
Fourth
Give Watchdog its minute
Rarely, pi-web keeps running but stops answering. Wait for automatic recovery: the Watchdog added in v0.10.0 probes
/api/homeonce a minute and asks Supervisor to restart an unresponsive add-on. It notices within 60 seconds, so allow 60-90 seconds in total, then reopen Pi Agent and read the log.
If the request still never completes, open the Log tab and read the final 30 lines around the failed attempt. Copy them, redact anything sensitive, and use them in a GitHub issue.
- Each tool card carries its elapsed seconds —
write notes.md5s,read notes.md2s — with a token and cost line under it:1,180 in · 70 out · $0.0080. New cards appearing is work still happening. - Waiting for model… sits under the last card. That line is the honest version of the spinner: the turn has not finished, and the screen is saying what it is on.
- The session total in the top bar — $0.02 here — climbs as work happens. A figure still moving is a useful sign of life.
- The message box has become Steer now / queue follow-up with Steer, Follow-up and a red Stop. That Stop, not Send, is the button for a turn you want to end.
Other quiet symptoms
The sections above cover roughly 90% of what goes wrong. The rest:
| What you see | Fix |
|---|---|
| The whole pi-web page is unreachable — not a 404, no page at all | Open the Home Assistant home page in another tab. If that fails too, Home Assistant is down — restore it first. If only Pi Agent is unreachable, use the 404 checks above. |
| The page opens but stays blank or gray | F12 for developer tools, then read the Console. Failed to load /_next/... suggests an Ingress asset-routing problem — restart the add-on once. ChunkLoadError suggests a stale browser cache — hard refresh with Ctrl+Shift+R. |
| Send is grayed out | The model selector has no active selection — common right after creating a Session. Open it and choose a configured provider and model. |
| Everything looks normal, but the Log tab is empty | log_level is too restrictive. The default info records important events; error records only errors. Use info normally, debug only while tracing. |
| A Session closes immediately and drops you back to the home page | The Session file may be missing or damaged. Each conversation is a .jsonl file under /data/pi-agent/sessions/; invalid content stops pi-web loading it. Restore the sessions directory from a Home Assistant backup. |
| Pi Agent feels slower after an update | The first startup may run the video-tools-init check and pi-web may rebuild its .next cache, so a slow first start can be normal. If it persists across two or three starts, read the log and check system resources. |
When the failure is in a chain of tools
A video workflow strings 5-6 tools together — text-to-speech, Playwright capture, ffmpeg composition, subtitle rendering, rclone upload — so the question is which stage it stopped at.
A relay team. When the baton hits the ground you do not retrain the squad — you find out which handover dropped it. Pictures but no voice means the voice runner never got going; voice but no subtitles means the last leg did.
| Stage that fails | Likely cause | Fix |
|---|---|---|
script.yaml stalls, or has no usable structure | The model is not following the structured script format | Use a current reasoning-capable model through a configured provider, then retry asking it to validate the YAML structure. |
| Playwright video entirely black or gray | Chromium incomplete, or the Playwright cache damaged | Configuration tab: reset_video_tools to true, save, restart. Allow 3-8 minutes for the 720MB download. Supervisor normally reverts the option to false; if the log says auto-revert failed, turn it off yourself. |
| Images, no narration | edge-tts cannot reach the Microsoft TTS endpoint | Search the log for edge-tts — a timeout or network error. If your network blocks speech.platform.bing.com, follow your network policy or configure another supported TTS workflow instead of retrying a blocked endpoint. |
| Images and narration, no subtitles | The SRT file exists, but ffmpeg did not render it | pitch_video's SKILL.md renders subtitles with the ffmpeg -vf subtitles= step. Search the log for subtitles. Missing fonts-noto-cjk → reinstall or update the add-on; reset_video_tools does not reinstall image packages. Wrong SRT path → compare with script.yaml. |
| Video complete, upload fails | The rclone Google Drive authorization is invalid, revoked or expired | Reopen rclone --config=/data/pi-agent/rclone/rclone.conf config to test or reconnect the remote. Do not assume a fixed token lifetime; go by the actual rclone error and the provider account. |
Cannot start — no python, ffmpeg or rclone | video-tools-init unfinished, or the add-on image incomplete | Missing Python environment: set reset_video_tools, restart, allow 3-8 minutes for the 720MB initialization while watching video-tools-init in the log. ffmpeg and rclone come from the add-on image — reinstall or update it. |
log_level to debug, restart, reproduce the failure once. Each stage then logs far more detail. Set it back to info afterward.A Skill will not install, or will not activate
| Symptom | Fix |
|---|---|
| Add from URL produces nothing | Two causes. An invalid package specification — Pi does not accept a bare owner/repo such as elmo/fridge-check; use a full URL such as https://github.com/elmo/fridge-check, or a supported Git specification such as git:github.com/elmo/fridge-check, and check for stray spaces or missing characters. Or a private repository: a plain HTTPS clone cannot prompt for credentials, so use a documented SSH package specification with keys configured in the container, or make the repository public. |
| The clone completes, but the Skills panel stays empty | F5 to refresh, then Reload Session or a new Session. Confirm the package contains a SKILL.md — uppercase SKILL, lowercase .md — in a directory Pi scans. A repository keeping Skills in an unsupported nested layout installs cleanly, leaving nothing to discover. |
| The Skill is listed, but the AI never uses it | Read the description field in SKILL.md. The agent uses it to decide whether the Skill applies, and “helps with household tasks” gives it almost nothing. State the task plainly and name the requests that should trigger it. |
| Description is good and it is still ignored | Check the Skill appears in the current Session's available Skills, reload the Session, ask the agent to use it explicitly. Then compare against another reasoning-capable model — lightweight ones such as GLM-4-Flash may follow complex system instructions less consistently. Switching models cannot repair a Skill never discovered or malformed, so keep this order. |
Green status, and a log that keeps starting over
The add-on shows green, but the Log tab shows video-tools-init or pi-web starting again roughly every 60 seconds, and conversations disconnect mid-reply. Watchdog is doing its job: it probes once a minute and restarts an add-on that does not answer. When startup itself fails every time, the protection becomes an endless loop.
| Step | What to do |
|---|---|
| Find the error just before the restart | Read the newest Log entries — the lines just before startup repeats — for Error, Failed or fatal. Usual culprits: an interrupted video-tools-init download, a port already in use, or pi-web unable to read models.json. |
| Reset only the downloaded tools | If video-tools-init is at fault, set reset_video_tools on the Configuration tab, restart, let initialization finish — 3-8 minutes. It rebuilds the Python environment and Playwright cache; it does not reinstall packages belonging to the add-on image. |
| Turn Watchdog off while you read | Repeated restarts erase the context you need. Settings → Add-ons → Woow HA Pi Agent → Info, switch Watchdog off — same area as the sidebar toggle. The failed process then stays stopped. |
| Reinstall, as a last resort | Info tab: Uninstall, then install again from the store. Data under /data/pi-agent/ — Sessions, Skills, models.json — is separate from the image being replaced. video-tools-init may run again, so allow 3-8 minutes, and verify your backup before relying on this step. |
Where roughly 90% of answers actually are
Open Settings → Add-ons → Woow HA Pi Agent and select the Log tab; the panel scrolls to the newest entry. A log runs to thousands of lines, so read the last thirty around whatever just failed, and work backward only if the error points at an earlier initialization step.
- Mostly request lines. Each carries a client address, a timestamp, the request and its status code —
"GET /api/agent/running/events HTTP/1.1" 200here. Warnings share the same stream, like theepoll_wait() reported that client prematurely closed connectionline a few rows up. Startup messages from bashio and output from pi-web are interleaved in the same view. - Newest at the bottom. Start there — the last 30 lines are usually enough for a first report.
- Search logs, above the panel, is where you type a keyword; the browser's own Ctrl+F works on what is already on screen. Note that those long
hassio_ingressURLs carry a session identifier — redact them before pasting a log anywhere public.
Keywords worth searching for, and what a match usually means:
| Keyword | What it usually means |
|---|---|
| Error / ERROR | A general error — read the whole message and the lines around it |
| Failed / failed | A failed step, usually followed by the reason |
| fatal | Serious enough to end the add-on process |
| denied / Permission | A file or directory permission problem, possibly chmod or SELinux |
| timeout | A network timeout reaching a provider or other upstream service |
| 401 / 402 / 404 | An HTTP status matching the sections earlier on this page |
| ENOENT | A missing file or command — wrong path, or an incomplete install |
| EADDRINUSE | A port already in use — often a process that never exited |
For more detail, change log_level from info to debug on the Configuration tab, save, then Restart. Reproduce the problem once — the request that returns 401, for example — then set it back to info. Debug output can grow to thousands of lines a minute; do not let /var/log fill up.
If you still need help
Open an issue at https://github.com/WOOWTECH/Woow_ha_pi_agent_add_on/issues, searching existing ones first — “401,” “video-tools,” “blank iframe” — someone may already have reported your symptom. Four things make a report answerable:
- Your Pi Agent version from the top of the Info tab, such as 0.13.1.
- Your Home Assistant version from
Settings → Aboutor the system information page. - The final 30 relevant log lines, in three backticks so GitHub renders a code block.
- Everything you already tried — “restarted, replaced the key, Test succeeds, sending a message still returns 401.”
Write in English if you can. The maintainers read Chinese, but an English report is also readable by people elsewhere who might help; Chinese is fine if English is uncomfortable.
Bearer <REDACTED>. Never post an API key, your external home address in any form (Nabu Casa URL, DuckDNS URL, public IP), personal details such as names, addresses or phone numbers, or a complete Session file, which contains your private conversation with the AI. Replace sensitive values with <REDACTED>. If a real key does get published, treat it as compromised: revoke it in the provider dashboard immediately and create a replacement.My symptom is not described anywhere on this page
How long does a reply to a GitHub issue take?
Is there paid support I can buy?
I found a mistake, or a better fix. How do I contribute it?
Woow_ha_pi_agent_tutorial repository, and this chapter is ch22_troubleshoot.html. An issue naming the section and the proposed correction, if you would rather not use Git. Or a GitHub Discussion, for a technique that should be reviewed by the community first.What should I check before updating the add-on?
CHANGELOG.md, especially any BREAKING notice — v0.13.0 moved API keys from add-on settings to the pi-web Models panel, requiring them to be entered again. And consider waiting two or three days before a larger update such as 0.10 → 0.11, so early reports surface.Everything returned 401 the moment I upgraded to v0.13. Is it broken?
How can I verify the video tools are really installed?
docker exec -it <discovered-container-name> bash literally — run docker ps | grep pi_agent first and use the exact name returned, which may resemble addon_a1b2c3d4_woow_ha_pi_agent. Inside the container run which python3, which ffmpeg, which rclone and which chromium. Each should return a path such as /data/pi-agent/venv/bin/python3 or /usr/bin/ffmpeg. A “not found” for Python or Chromium means video-tools-init is incomplete — use reset_video_tools to rebuild the downloaded tools. A missing ffmpeg or rclone is the add-on image: reinstall or update it.Image uploads fail on my phone but work on my PC
Will an update remove my Skills, Sessions, or settings?
models.json and rclone.conf live under /data/pi-agent/, the add-on's persistent storage; an update replaces the image, not that directory. Regenerable components such as venv and playwright-cache may be excluded from backups and rebuilt when needed, so do not assume everything under /data is backed up. Before v0.10.0, Pi's worktree lived in the container root filesystem and could be lost during an update; v0.10.0 set HOME=/data/pi-agent/home to make that state persistent. Keep a current Home Assistant backup before upgrading.Where to go from here
Sixteen parts, one workspace, and a page to come back to
The last article in the series. The full guide has chapter-length versions of everything here, plus appendices on configuration and provider keys.
Open the full guidePart 16 of the Pi Agent Onboarding Guide series, published by WoowTech.
Based on the Woow HA Pi Agent Onboarding Guide, produced by WoowTech and released under CC BY 4.0.
The Smart Space Solution · 智慧空間解決方案 · © 2026 WOOW Technology Co., Ltd.