Appendix A

Configuration reference

Since v0.13.0, the Pi Agent add-on’s Configuration page has contained just 4 options. This appendix explains what each option does, its default and valid values, when to change it, and when to leave it alone. You will rarely need this page—but when you do, it is your quick reference.

When to use this reference

Under normal circumstances, you do not need to open Pi Agent’s add-on Configuration page. Once you have installed Pi Agent (Chapter 2) and entered your API key (Chapter 6), you can simply launch it from the sidebar. You may go a year without touching Configuration.

You will need to open it in a few specific situations:

  • Troubleshooting with logs: Set log_level to debug when you need more detailed diagnostic information.
  • Incorrect timestamps: If log timestamps are 8 hours behind your local time, set timezone to Asia/Taipei, or use the appropriate IANA identifier for your location.
  • A broken video pipeline: Reinstall video-tools if the Chromium or virtual environment is corrupted. Chapter 18 explains why this may be necessary.
  • The environment-variable escape hatch: Use env_vars if your network requires a corporate proxy or you need to change the Chromium download mirror.

Each of the four options corresponds to one of these situations. Every section follows the same format: purpose / default / valid values / when to change it / pitfalls / example.

Pi Agent add-on Configuration page
Figure A-1 The Configuration page in v0.13.0 and later contains four options: log_level, timezone, reset_video_tools, and env_vars.

The key point: API keys are not configured here

This is the easiest detail to miss after upgrading to v0.13.0. The add-on Configuration page has no API key fields. Keys for every provider—including OpenRouter, OpenAI, Anthropic, DeepSeek, Groq, MiniMax, and GLM—are managed in pi-web’s built-in Models panel. Chapter 6 explains the process, and Chapter 21 documents the version change.

The four options in this appendix are add-on container-level settings. They control how the add-on runs, how detailed its logs are, which time zone it uses, and whether to reinstall its video tools. They are entirely separate from choosing an AI provider or API key.

What you want to changeWhere to change it
Add an AI provider, replace an API key, or change a base URLpi-web → Models panel (Chapter 6)
Install or remove a Skillpi-web → Skills panel (Chapter 14)
Change add-on log detail, time zone, video-tools installation, or environment variablesThe add-on Configuration page covered in this appendix
Warning: You will not find instructions for adding an OpenRouter or OpenAI key in this appendix because API keys are not configured here. See Chapter 6.

Option 1: log_level—Log detail

ItemDetails
PurposeControls how much detail the add-on prints on the Logs page. It also controls the verbosity of pi-web’s back-end logs.
Valid valueserror, warn, info, debug (from least to most detail)
Defaultinfo
Restart requiredYes. After you save the change, the add-on restarts automatically and applies it.

When to change it

  • Everyday use: Keep info. It includes the information you normally need without producing excessive noise.
  • Troubleshooting: Select debug. It records every HTTP request, Skill scan, and provider call. Remember to change it back when you finish troubleshooting.
  • Warnings only: Select warn to record warnings and errors. This can suit routine monitoring once the system is stable.
  • Errors only: Select error to record nothing but errors. This is not recommended for long-term use, because warnings often provide advance notice of a problem.
Warning: Leaving debug enabled can produce thousands of log lines per minute. Home Assistant rotates its logs when they exceed the size limit, but files inspected directly over SSH may still consume hundreds of MB of disk space. Change the level back to info when you finish troubleshooting.

Example

log_level: debug

Use this while investigating why a video pipeline failed. It exposes each Playwright startup step and every ffmpeg argument. When you have found the problem, change it back:

log_level: info

Option 2: timezone—Time zone

ItemDetails
PurposeAffects three things: (1) timestamps in add-on logs, (2) dates used in Session file names and backups, and (3) SRT subtitle cue timing in video-pipeline output.
Valid valuesIANA time zone identifiers, such as Asia/Taipei, Asia/Tokyo, America/New_York, or Europe/London.
DefaultEmpty (equivalent to UTC)
Restart requiredYes. After you save the change, the add-on restarts automatically.

Why you should set your local time zone

If you leave this setting empty, the Logs page uses UTC. In Taiwan, for example, those timestamps are 8 hours behind local time. An action performed at 8 p.m. therefore appears in the logs at noon, which can make the corresponding entry difficult to find. Setting Asia/Taipei aligns the timestamps with local time; use the correct IANA identifier for your own location.

The setting also affects dates in Session file names. In Taiwan, a Session opened around 11 p.m. can otherwise receive a file name dated earlier that day in UTC, making records harder to reconcile.

Warning: Enter the complete IANA identifier. Using Taipei instead of Asia/Taipei silently falls back to UTC. The same applies to unsupported forms such as +08:00, CST, and GMT+8. Use the standard Region/City form.

Common IANA identifiers

LocationIANA identifier
TaiwanAsia/Taipei
JapanAsia/Tokyo
Hong KongAsia/Hong_Kong
SingaporeAsia/Singapore
Eastern United StatesAmerica/New_York
Western United StatesAmerica/Los_Angeles
United KingdomEurope/London

Example

timezone: Asia/Taipei

Option 3: reset_video_tools—Reinstall video tools

ItemDetails
PurposeOn the next add-on start, deletes /data/pi-agent/venv/, /data/pi-agent/playwright-cache/, and the .video-tools-installed sentinel file, then reinstalls everything from scratch. This forces video-tools-init to repeat the complete download (Chromium + Python virtual environment, approximately 720 MB).
Valid valuestrue / false
Defaultfalse
Restart requiredYes. After you save, Home Assistant Supervisor automatically restarts the add-on and triggers the reinstall—you do not need to restart it manually. When the reinstall finishes, the flag automatically returns to false through the Supervisor API, preventing another reinstall at every startup.

When to enable it

  • The video pipeline repeatedly fails, but the logs do not reveal the root cause. Chapter 18 explains what video-tools does.
  • The installed Chromium version is too old to capture screenshots of certain websites.
  • Python packages in the virtual environment no longer match the main add-on application, which can occasionally happen after an upgrade.
  • As an annual “spring cleaning”: even if nothing is wrong, you can run it during off-peak hours to refresh Chromium.
Warning: Triggering the reinstall takes exactly two steps: enable the option → save. Supervisor then restarts the add-on automatically. At startup, the video-tools-init s6-oneshot service reads the true flag, deletes the sentinel file and the virtual-environment and Playwright-cache directories, and reinstalls them. After a successful run, pi-web uses the Supervisor API to return the option to false automatically, so you do not enter a loop that downloads 720 MB after every restart.
Warning: A reinstall downloads approximately 720 MB, including about 500 MB for Chromium, just as the initial add-on installation does. Allow 5–10 minutes on a slow connection; a Raspberry Pi 4 may take 3–8 minutes. Video features are unavailable during this period, but AI conversations continue to work because pi-web and video-tools-init start in parallel. Chat remains available even if the download fails.

Example (one-time use)

reset_video_tools: true

Save → wait for Supervisor to restart the add-on automatically → watch the Logs page for video-tools-init to begin downloading → when it finishes, reload the Configuration page and confirm that the value has returned to false. No further action is needed.

Option 4: env_vars—Environment-variable escape hatch

ItemDetails
PurposePasses arbitrary environment variables to the main pi-web application. This is an escape hatch for edge cases in which the add-on has no dedicated setting but an underlying tool recognizes a particular environment variable.
FormatA YAML list in which each item is {name: X, value: Y}.
Name rulesNames must match ^[A-Za-z_][A-Za-z0-9_]*$: ASCII letters, numbers, and underscores are accepted, but a name cannot begin with a number. Invalid names include a hyphenated name such as MY-VAR or a name containing Chinese characters. The initialization script skips invalid names and prints a warning on the Logs page. An invalid entry does not break the add-on, but that environment variable does not take effect.
Default[] (an empty list)
Restart requiredYes. After you save the change, the add-on restarts automatically.

Common uses

VariablePurposeTypical use case
HTTP_PROXY / HTTPS_PROXYRoutes pi-web’s outbound traffic through an HTTP proxyA corporate network requires a proxy for internet access
NO_PROXYExcludes specified hosts from the proxyThe internal Home Assistant API must remain on the local network
PLAYWRIGHT_DOWNLOAD_HOSTSets the mirror used to download ChromiumA direct connection to the Playwright CDN is too slow, so a regional mirror is preferable
OPENAI_BASE_URLOverrides the OpenAI SDK’s default endpointThe official OpenAI provider, with no custom base URL, must use an internal gateway or reverse proxy
Danger: Do not put API keys here. For example, entries named OPENAI_API_KEY or ANTHROPIC_API_KEY are not read by pi-web. The interface may accept the variables, but the keys will have no effect. Manage all provider keys in the pi-web Models panel; that is the only correct location.
Warning: Do not treat OPENAI_BASE_URL as a way to change every provider at once. It affects only the OpenAI SDK’s default when no custom base URL is set. OpenRouter, DeepSeek, Groq, MiniMax, and GLM each have their own baseUrl in pi-web’s Models panel. Those provider-specific values take precedence and are not overridden by this environment variable. Only the official OpenAI provider with an unchanged base URL is affected. To change one provider’s endpoint, edit that provider’s base URL in the Models panel instead of working around it with an environment variable.

Example

Route traffic through a corporate proxy:

env_vars:
  - name: HTTP_PROXY
    value: http://192.168.1.1:8080
  - name: HTTPS_PROXY
    value: http://192.168.1.1:8080
  - name: NO_PROXY
    value: 127.0.0.1,localhost,homeassistant.local

Leave the list empty when it is not needed:

env_vars: []

Complete configuration example

A typical configuration for a household in Taiwan looks like this. If you are elsewhere, replace Asia/Taipei with the IANA identifier for your location:

log_level: info
timezone: Asia/Taipei
reset_video_tools: false
env_vars: []

If you are investigating a bug and also need to use a corporate proxy:

log_level: debug
timezone: Asia/Taipei
reset_video_tools: false
env_vars:
  - name: HTTP_PROXY
    value: http://192.168.1.1:8080
  - name: HTTPS_PROXY
    value: http://192.168.1.1:8080
Tip: The Home Assistant add-on Configuration page usually has a YAML/form toggle near the top. Switch to YAML mode to paste the example directly. If you prefer to reduce the risk of accidental edits, use form mode and enter one field at a time. Both modes produce the same result.

Options removed in v0.13.0 (historical reference)

If you upgraded from an older release, you may notice that many fields have disappeared from the Configuration page. Nothing is broken—they have moved. See Chapter 21 for detailed upgrade notes, or use this table as a quick reference:

Former v0.12.x fieldWhere to configure it in v0.13.0 and later
api_key (primary GLM key)pi-web Models panel → GLM (zai) provider → API Key
openai_api_keypi-web Models panel → OpenAI provider → API Key
anthropic_api_keypi-web Models panel → Anthropic provider → API Key
deepseek_api_keypi-web Models panel → DeepSeek provider → API Key
groq_api_keypi-web Models panel → Groq provider → API Key
openrouter_api_keypi-web Models panel → OpenRouter provider → API Key
minimax_api_keypi-web Models panel → MiniMax provider → API Key
extra_allowed_hosts (removed in v0.10.0)No configuration is required. nginx now rewrites the header to Host: localhost, which passes pi-web’s host validation.
Why the move? There are two reasons: (1) API keys can now be backed up and restored with pi-web data (Chapter 20), independently of add-on container settings; and (2) the UI’s Test button provides immediate validation. This is far more convenient than entering a key blindly in an add-on form, saving it, and waiting for a restart before learning whether it works.

Common pitfalls

  1. Nothing happens after I change a setting

    After editing the Configuration page, select Save at the bottom. In some Home Assistant versions, a floating element can obscure the button; scroll down slightly to reveal it. The add-on restarts and applies your changes only after you save them.

  2. Options return to their defaults after the add-on restarts

    This usually indicates invalid YAML—for example, incorrect quoting around timezone or incorrect indentation under env_vars. Open the Logs page and scroll up to find a message containing parse error or invalid config. It should identify the invalid field. Correct the field and save again.

  3. pi-web does not detect an entry in env_vars

    There are three likely causes: (1) the name contains an invalid character, such as a hyphen, begins with a number, or contains Chinese characters; (2) pi-web does not recognize that environment variable—not every OPENAI_* or ANTHROPIC_* variable is supported, and pi-web reads only specific proxy and Playwright variables plus a small number of SDK base URLs; or (3) the entry is an API key, which never takes effect here. Enter API keys in the Models panel instead.

  4. reset_video_tools is enabled, but video-tools is not downloaded again

    The normal sequence is select true → save → Supervisor restarts the add-on automatically → video-tools-init reads the flag → the download begins. If nothing happens after you save, confirm that: (1) you actually selected Save on the Configuration page—scroll down if a floating element obscures it; (2) the Logs page contains entries from video-tools-init—if you see only “exit <100ms,” the flag was not read; and (3) if it still does not trigger, select Restart manually on the add-on page. After a successful download, reload the Configuration page and confirm that the option has returned to false.

  5. timezone is set to Taipei, but timestamps still use UTC

    Use the complete IANA identifier: Asia/Taipei, not Taipei, CST, or +08:00. An invalid value silently falls back to UTC, so it can appear to have been accepted. Enter the correct value, save it, wait for the add-on to restart, and then check the timestamps on the Logs page.

  6. Debug logs are consuming too much disk space

    Change log_level back to info or warn. Home Assistant OS normally rotates log files automatically, but on a Supervised or Container installation you may need to remove old files from /var/log yourself. Do not leave debug enabled indefinitely; use it only while troubleshooting.

Frequently asked questions

How can I back up the add-on configuration for later restoration?
Use a Home Assistant backup (formerly called a snapshot). The Configuration page is part of the add-on and is included in the backup file. Restoring that backup restores all 4 options, so you do not need to record them manually. See Chapter 20 for the complete backup procedure. Alternatively, copy the page’s YAML into a plain-text file; it is a simple but effective manual backup.
Where can I see the complete configuration currently in effect?
There are two places: (1) switch the Configuration page to YAML mode; or (2) connect to the Home Assistant host over SSH and inspect /data/options.json inside the add-on container. The latter is the final JSON configuration that Supervisor mounts into the add-on. It is useful for confirming that the YAML entered in the UI was parsed as intended.
Does timezone affect AI responses—for example, the answer to “What time is it?”
It does not directly affect AI conversations. When the AI needs the current time, the main pi-web application generally obtains it from a system-time API, which uses the Home Assistant host’s system time zone rather than this timezone option. This option affects only log timestamps, dates in Session file names, and video subtitle cue timing. To change the Home Assistant host’s time zone, go to Settings → System → General in Home Assistant. The two settings are separate.
How can I restore the default Configuration values?
Select Reset to defaults at the bottom of the Configuration page—or in the upper-right corner, depending on your Home Assistant version. This resets all 4 options: log_level: info, an empty timezone, reset_video_tools: false, and env_vars: []. API keys are stored in pi-web and are not affected, so this action will not delete them. Remember to save afterward.
Can I use env_vars to set TZ and override the time zone?
Technically, you can set TZ=Asia/Taipei, and some underlying tools, such as Python’s datetime, will read it. However, using the dedicated timezone option is strongly recommended. It is the add-on’s official interface and configures the system, log, and application-layer time zones together. Using env_vars to set TZ affects only some contexts and can leave three parts of the system using different time zones, making troubleshooting more difficult.
Can the 4 options be changed while the add-on is running, or is a restart required?
All 4 options require a restart, but you do not need to restart the add-on yourself. After you save the Configuration page, Home Assistant Supervisor restarts the add-on automatically. This takes approximately 15–30 seconds, and all four options take effect on the next startup. The pi-web process reads log_level, timezone, and env_vars at launch; the reset_video_tools value is read at startup by the video-tools-init s6-oneshot service from /data/options.json. Both steps are automatic.