PHOS web administration user manual
Navigation
The current sidebar is grouped into Basic, Advanced and Settings. Basic contains Dashboard, PHOS Status, Controls and Connectivity (Native Controller, MQTT, MQTT Discovery and ESPHome). Advanced contains Sensors, API, Diagnostics and System Actions. Settings contains Credentials, Agents, Configuration, Appearance, Network, Runtime, Voice & Speech, Behavior and Integrations. The nested Appearance, Network and Runtime pages are listed in the sidebar. Individual operations remain protected by the administrator session and CSRF checks.
Using PHOS day to day
Web Admin is optional. When it is already enabled, open its configured address from a browser on the trusted local network. The existing access and first-login instructions describe the configured address and bootstrap password; this guide does not repeat the deployment procedure. Change the initial password when prompted. There is no username.
Start at Dashboard for a status summary. Open PHOS Status for runtime state and health, or Sensors for current readings and their availability. Treat stale or unavailable readings as unknown; a retained last value is not necessarily current. Use Controls to request a robot state, expression, visual source or overlay. Each control has its own action and result message; opening the page sends no command.
To request an expression, select one on Controls, then choose Apply expression. The requested expression can be temporary; the configured visual source and local behavior may resume. To change how the face looks over time, use the relevant Appearance or Behavior settings instead of repeatedly requesting a temporary expression.
For supported local speech commands, configure Voice & Speech and the separate interaction settings first, then start a finite listening session using the available voice control or API. Voice and command execution are disabled by default. The exact phrases and expected results are in Voice Commands. TTS output is separately configured; see Voice and speech.
When changing configuration, use the page for that feature and select Save. Check Diagnostics for saved-versus-active differences. Settings marked immediate apply after saving; other settings need the lifecycle operation shown there. System Actions → Reload configuration applies only the documented reloadable settings. Restart PHOS applies restart-required settings under the managed user service and interrupts PHOS, but does not reboot the Pi. See Save vs Reload vs Restart.
For sensor meanings, optional hardware and unavailable readings, see Environmental awareness, Motion awareness, and the hardware overview. An unavailable optional peripheral does not provide a usable value; it is not evidence that PHOS measured zero.
For MQTT, use Connectivity → MQTT to configure brokers, test the saved connection, and apply live changes. Use Connectivity → MQTT Discovery to review candidates and run the isolated Topic Explorer. Detailed mapping, approval, lifecycle, and security behavior is maintained in the canonical MQTT observations guide; the ESPHome over MQTT guide is a concrete temperature-sensor walkthrough. For direct device setup and the ESPHome-specific security and mapping boundaries, see the ESPHome Native API guide.
An obsolete unapproved Discovery candidate can be deleted from its row after confirmation. This is local candidate management, not broker administration: PHOS does not publish an empty retained configuration payload, and a retained announcement may cause the candidate to reappear. Revoke an approved source first; then delete its row. Use an external, authorized MQTT administration client to remove the retained broker announcement if that is the intended device-retirement operation.
Connectivity configuration
Connectivity groups physical-provider configuration without changing its canonical configuration or runtime ownership. Native Controller contains the existing serial-controller settings and diagnostics. MQTT contains the saved provider configuration (including multiple brokers, authentication references, TLS, reconnection policies, manual mappings, availability and freshness) plus runtime diagnostics; it remains available when MQTT is disabled or its optional dependency is absent. MQTT Discovery is the sole web page for reviewing candidates, edits, approval, rejection and revocation. Approved sources activate dynamically when their current announcement and subscriptions are validated; unavailable brokers remain pending and retry after reconnect. Broker-level changes apply dynamically through the shared lifecycle service, replacing only affected connections. Security boundary changes invalidate discovery approvals and require explicit review again. Saved/applied settings are reported separately from actual broker connectivity. The MQTT page uses dedicated broker forms with Advanced Settings and write-only credentials; see broker administration for supported fields, persistence and Test Connection behavior. Network listener settings remain under Settings → Network.
Current controller-backed sensor status uses sensors.ens160 and sensors.aht21. The Sensors page distinguishes ENS160 validity/warm-up, AQI-UBA (1–5), compensation and per-measurement usability from AHT21 controller-provenance temperature/humidity. No direct-Pi ENS160/AHT21 configuration path exists.
PHOS includes an optional single-administrator configuration editor. It uses the same typed configuration model and validation as startup, with no camera, AWS or display access from the web worker. Runtime-page saves apply camera-preview settings and logging level through the parent runtime boundary; other Runtime settings are saved as Restart PHOS pending changes. System Reload remains available for the other documented reloadable settings.
Presentation Owner migration and skin resolution
PHOS retains the legacy optional Presentation Owner in
appearance.presentation_owner.agent_id. It remains readable and is preserved
when configuration is saved, but it is no longer a runtime appearance authority:
appearance.mode is authoritative. This explicit migration rule prevents a
stale manual owner from competing with automatic activity selection. Existing
files without appearance.mode load as global, so their canonical global
appearance remains safe and predictable; no legacy owner data is deleted.
The legacy read-only resolver can still describe that owner's assignment. It is
not used for visual activation. Selecting or clearing an owner never overwrites
the canonical global display appearance.
Agent appearance administration
Settings → Agents can assign an available built-in, declarative, or custom skin while creating or editing an agent. Select Use agent-specific skin and choose an entry from the catalog. Clearing that checkbox disables an existing assignment while retaining its skin ID, so it can be re-enabled later; agents without assignment metadata remain Global. The list identifies Global, Disabled, Assigned, and Missing assignments. A missing reference is preserved and safely falls back to the global appearance until an administrator selects a replacement.
The same page retains the legacy Active Presentation controls during the migration. They preserve or clear the legacy value only; they do not activate a skin. The Default Agent is a separate MCP compatibility setting.
The Active Presentation panel separates configured intent from runtime result: Presentation Owner is the saved administrator choice, Resolved appearance is the currently valid skin or fallback, and Runtime activation reports whether the running display accepted that temporary update. An unavailable or failed runtime leaves the saved owner and global display configuration unchanged; a later reconciliation, including startup, can recover when the renderer becomes available.
Agent appearance policy foundation
appearance.mode defaults to global. In global, PHOS applies the complete
Skin selected by appearance.global_skin_id when it is valid; this includes
appearance (including optional eyes.shape), semantic LED palette, and Skin-owned Physical Personality. Legacy
global appearance values remain supported when no global Skin is selected and
use the analytical personality fallback. Preview remains visual-only and
does not save or select a global Skin. In follow_agent, PHOS applies the
complete skin snapshot of the highest-priority recently active eligible agent.
Agents
may carry optional appearance policy metadata:
participate (default true), priority (default 50, 0–100), and
activity_timeout_seconds (default 30, 5–3600). This timeout will be a
monotonic appearance-activity window, not an MCP session, credential, or
transport timeout. Static eligibility requires participation and a valid enabled
skin; it never implies that an agent is currently active. When no active agent
qualifies, PHOS restores the latest global appearance. Runtime status reports
the mode, automatic selected identity, resolved skin, fallback reason, and
whether the display accepted the temporary update.
Configure this without editing YAML: open Appearance → Skins and select Global Appearance or Follow Active Agent. The same page reports the selected agent, runtime activation and any fallback. In Settings → Agents, enable an assigned complete skin, then set participation, priority and activity timeout. For example, an Ambient skin at priority 100 with a 10-second timeout temporarily wins over a Minimal skin at priority 50 with an 80-second timeout. Recent authenticated MCP semantic activity—not merely an MCP connection—starts or renews the timer. The Agents page shows configured policy; Appearance → Skins shows current runtime arbitration.
Appearance → Skins also offers Use default agent skin for anonymous MCP
activity, stored as appearance.anonymous_mcp_use_default_agent_skin and
disabled by default. In Follow Active Agent mode, a permitted request with no
authorization header can start a separate 30-second monotonic anonymous lease.
It uses the configured default agent's enabled, valid, participating skin only
as a transient visual fallback; it does not authenticate or authorize the
caller as that agent. The anonymous candidate has lower precedence than every
eligible authenticated agent. A missing/disabled default skin, global mode,
connection/discovery traffic, denied requests, or any supplied invalid bearer
falls back to the canonical global appearance. The page displays the resolved
default skin, diagnostics, current source, and remaining lease.
Install and enable
Use the PHOS 1.3.0 installation procedure on the Pi (Python 3.11+). Its unified installer creates the canonical environment and installs the Web Admin dependency together with all other supported runtime components. For contributor-specific manual setup, use the concise advanced/manual path; do not create a separate Web Admin environment.
The canonical web section defaults to enabled: false, host: "127.0.0.1",
port: 8080, preserving eyes-only startup without extra dependencies. Existing
deployments must add this required section to their complete configuration file; source
sync does not overwrite deployed settings.
For access from another device on a trusted LAN, edit the existing section:
web:
enabled: true
host: 0.0.0.0
port: 8080
An explicit LAN interface IP is more restrictive than 0.0.0.0, which binds all
IPv4 interfaces. IPv6 literals are also accepted. Hostnames are not bind settings.
No separate web CLI flags exist.
Use the user systemd service for production and browser restart. For a foreground diagnostic run:
cd /home/pi/phos
PYTHONPATH=src .venv/bin/python -m robot.main --config config/phos.yaml
With dependencies already available to system Python, the unchanged command is
PYTHONPATH=src python3 -m robot.main --config config/phos.yaml.
Open http://hostname -I. With the default loopback binding, only
http://127.0.0.1:8080/ on the Pi can connect. A custom port changes both URLs.
web.host and web.port are startup-only listener settings: save the complete
active configuration and restart PHOS (for example, systemctl --user restart
phos.service) before using the newly configured address. They are not applied
by Reload configuration.
Do not configure router port forwarding or expose this interface to the Internet.
Local Admin Access
The Dashboard Network card shows PHOS's selected LAN IPv4 address, interface and
the effective Admin URL. On the physical display, double-tap the top-right 20%
of the screen to open the Admin Access overlay. Scan
its QR code with a phone on the same LAN, or enter the displayed URL
manually. A single tap closes the overlay. PHOS uses its current LAN IPv4
address only; it does not require phos.local, mDNS, Internet access, or router
port forwarding. The QR code contains only the Admin URL and updates when the
cached network information refreshes (at most every 30 seconds).
First login and password changes
- Enter the bootstrap password
phos; there is no username field. - The editor remains inaccessible until you change that password.
- Enter current password
phos, a different new password of 12–256 characters, and its confirmation. Prefer a long, unique passphrase. - Log in again using the new password. Configuration is now available.
Use Change password later; current password and confirmation are required. Every successful change ends all sessions, including your own. Log out also invalidates that session on the server. Sessions expire after 30 minutes from login (not extended by activity) and all expire when PHOS restarts. Up to 32 sessions are retained; a new login beyond that retires the oldest.
The single account permits five password-verification attempts per minute across all clients, including successful logins and password-change attempts. Wait one minute after a throttle message. This global budget prevents bypass by changing IP or cookies, but another LAN client can temporarily deny login. Limits reset on restart. There is no persistent lockout or remote password reset.
Live presence and attention
Dashboard and PHOS Status show read-only Presence state, people count, Attention state, target ID, normalized target position, and confidence. The initial semantic status snapshot is refreshed through the existing SSE stream; edge events refresh the target state without adding a writable vision control. Unavailable detector confidence is displayed as unavailable rather than as a synthetic 100% value.
They also show Observed Expression separately from PHOS's own expression. This is a read-only, uncertain selected-face classifier result with availability, label, confidence, provider, model and observation time. It may be unavailable while Presence remains present; it never controls PHOS expression or state.
Edit configuration
The administration home is Dashboard. The sidebar groups read-only and writable runtime pages under Basic/Advanced, followed by configuration Settings; System Actions is a direct Advanced destination. The same navigation appears on every authenticated page and wraps for phone and tablet screens. The current page is highlighted. No frontend framework is needed.
| Page | Settings and actions |
|---|---|
| Dashboard | Read-only overview and navigation to configuration pages. |
| PHOS Status | Read-only semantic state and subsystem health summary. |
| Controls | Writable runtime actions only: separate Robot State, Expression, Visual Source and Overlay cards. Each action uses Remote API capabilities and reports feedback in its own card. |
| Network | Web bind address (web.host) and port (web.port). Wi-Fi, DNS and other OS networking remain managed on the Pi. |
| Display & Appearance | Display dimensions, fps, fullscreen and transitions; blink/gaze intervals, gaze smoothing and reaction decay from behavior. |
| Runtime → Vision | Face tracking, camera resolution/cadence and face detection. These settings require Restart PHOS. |
| Runtime → Camera Preview | Optional display-only camera picture-in-picture preview. Its settings apply immediately when saved. |
| Runtime → Expression | Provider selection/enabling and observation cadence/crop margin; smoothing; local ONNX model, labels and preprocessing; AWS region/confidence/timeouts; a separate cloud cost/rate-limit group. These settings require Restart PHOS. |
| Display & Appearance | Display, eye behavior and base visual source (Manual, Environment, or PHOS State); error/sleep and IMU reactions temporarily override it. The legacy LED ring editor remains visible for compatibility; keep its enabled setting false for the ESP32 build. Configure the serial connection through Hardware Controller; firmware owns the WS2812B pin/count. See controller ring setup. |
| Sensors | Environmental type (BME280/BMP280), controller-backed ENS160/AHT21 status, environmental behavior and GY-521/MPU-6050 motion. sensors.ens160 and sensors.aht21 are read-only public status records; ENS160 values require validity and usability, while AHT21 freshness is independent. No direct-Pi AHT21 provider is configured. |
| Runtime → Logging | Supported log level, output file and expression diagnostics. Log level applies immediately; output file and diagnostics require Restart PHOS. No credential/payload logging switches; SDK credential/request debug output remains suppressed. |
| Advanced Configuration | Complete YAML editor for advanced users. |
| Web Administration / Security | Enable/disable web administration (web.enabled) and a link to the separate password-change page. Passwords are never runtime configuration. |
| Diagnostics | Read-only runtime health and saved-versus-active configuration diagnostics. |
| System Actions | Reload configuration and, when managed by the documented systemd service, review/confirm Restart PHOS. Restart is visually marked as disruptive; reboot and shutdown are not supported. |
Active-configuration information is shown in Diagnostics, visually separated
from editable settings. Deprecated CLI overrides, if used, appear in startup
settings but do not change the saved file. The software version comes from the authoritative robot.__version__; live
health is not inferred from the active configuration snapshot.
Every editable page has its own Save button. It merges only that page's fields into the same active configuration file, validates the complete configuration, and atomically saves it. Other areas are preserved. There are no per-page configuration files or independent validation schemas. Save before navigating away: unsaved input is not carried between pages. A save in another tab makes previously loaded pages stale, including pages in other areas.
Fields use checkboxes, numeric inputs, text inputs, comma-separated arrays and
provider/log-level dropdowns. Optional paths/region may be blank. Numeric pairs
are entered as 640, 480 or 3.5, 6.5; labels are entered in model-output order.
The canonical model remains authoritative for all ranges, types and relationships;
see the selected field reference.
Advanced Configuration YAML editor
Open Settings → Configuration for the complete advanced editor. It always displays and saves the active YAML configuration. The page identifies the active path; saving never switches to another configuration file.
Use Validate to parse YAML and run full RuntimeConfig validation without
writing. Syntax errors include a line/column when available; invalid roots and
semantic validation errors are shown without a stack trace. Save configuration
performs the same validation and atomic active-source save, then requires an
explicit System Actions → Restart PHOS choice before settings become active.
It never reloads or restarts PHOS automatically. A stale revision is rejected
with a request to reload rather than overwriting another editor's save.
Invalid configuration is rejected before persistence, but advanced settings should still be edited carefully. Structured settings pages remain available for common changes. The editor warns before navigation with unsaved changes.
Navigation is defined by a small domain registry, separate from the canonical schema. Settings → Network → MCP controls only the local MCP listener's enabled state and port, and displays its live status and endpoint; host and path remain fixed in the normal UI. Future implemented subsystems can add areas there.
Choose local or aws under Expression Recognition. The matching provider fields are shown; switching keeps the inactive provider's settings for later use. Both sections remain accessible if JavaScript is disabled. Enabling local expressions requires a readable ONNX model and valid labels. AWS selection does not require an ONNX file. Switching the provider does not implicitly enable expressions.
AWS mode sends selected face crops to AWS when expressions are enabled. Credentials remain exclusively in the external SDK chain/environment/profile/ role mechanism. There are no access-key, secret-key or token fields. This editor does not probe credential availability or make AWS requests.
Credentials
Settings → Credentials is a write-only local store for the implemented provider-neutral slots: ElevenLabs API Key, Google TTS Credentials and Cartesia API Key. It reports only Configured or Not configured. Values are never shown back, masked, included in responses, or logged. A blank password field is always a new value; use the explicit confirmation checkbox to remove one.
The store is separate from phos.yaml: a local .phos-secrets/
directory beside the active configuration contains an authenticated encrypted
secrets.enc file and a separate secret.key. PHOS creates the key only for a
new empty store. If an existing encrypted store has no key, or cannot be
authenticated/decrypted, startup fails safely rather than regenerating or
overwriting it. Permissions are restricted on a best-effort basis for the PHOS
account. This protects against accidental disclosure in configuration, source
control, normal Web administration and logs; it does not protect against a
host/root-level compromise. Back up or recover the key and encrypted store
together. This foundation does not itself configure or contact a cloud provider.
MCP agents
Use Settings → Agents to configure who can connect to PHOS. An Agent ID is the stable identity used for requests; a display name is only a readable label. This does not configure or train the external AI model.
- Select Create agent. Enter an Agent ID, display name and profile. Agent IDs cannot be edited later. Choose observer for read-only access or standard when the client needs supported physical actions. Standard is the complete built-in permission profile; the page has no custom permission editor.
- After creating the agent, use Create credential in that agent's row. PHOS displays the new bearer once. Store it in the external client's secure credential store. The page cannot show it again.
- Use Edit agent to change the display name, profile or optional agent-specific appearance settings. Permission/profile changes affect subsequent MCP requests and do not require a PHOS restart.
- Use Set as default from the row's action menu only when changing the compatibility/default identity is intended. It does not replace a credential-backed identity selected by a bearer.
- If a bearer is lost, select Rotate credential and confirm. Rotation invalidates the old bearer and displays a replacement once; update the external client. Select Revoke credential to block the bearer while retaining the configured agent identity and profile.
- Select Delete agent to remove a non-default agent after confirmation. The current default cannot be deleted until another agent is selected as default.
Credentials are bearer secrets managed by PHOS's write-only secret boundary. The Web Admin never reads them back or stores the token in the agent record. Agent creation, profile changes, credential creation/rotation/revocation and deletion update the registry without Reload or Restart PHOS. There is no per-agent enabled switch: revoking the credential blocks that credential's future authentication. The Default identity is a compatibility setting, not an individual credential; avoid relying on default-agent compatibility for network-reachable connections. See Connect your first MCP client for the first connection procedure and the MCP reference for auth mode details.
The Default agent is marked and protected from deletion until another identity becomes default. Appearance assignment and Follow Active Agent selection are optional and separate from credentials and permissions; see Agent appearance administration.
Save on an editable page converts fields and calls the same model validation and atomic persistence used elsewhere. Invalid input leaves the file unchanged, displays an error in the relevant group and preserves non-sensitive input. If validation finds a problem in another area, the page links to that area; the current changes remain unsaved. All fields, including inactive provider fields, must remain valid. After a validation error all provider groups are shown so inactive settings can also be corrected. Config-relative model/log paths keep their existing interpretation. Missing active model paths can be repaired in the editor while PHOS is already running; malformed configuration or invalid schema edited outside the UI requires local repair.
Successful saves report that configuration is saved and direct you to System actions. Save alone does not change running settings. Use Reload for logging, eye appearance and camera preview settings, or Restart PHOS for all other changes. Turning web off takes effect at restart. A page loaded before another save is rejected as stale: reload it before editing again. Do not edit the active configuration simultaneously from the terminal.
Saving flushes a temporary file in the same directory, then atomically replaces the target file. A validation or replacement failure preserves the old target. No automatic previous-version backup is kept. Before editing, use for example:
cp config/phos.yaml config/phos.yaml.backup
To recover, stop PHOS, restore a known-good complete file with
cp config/phos.yaml.backup config/phos.yaml, and restart. An interrupted worker
may leave an unused hidden temporary file; it is never loaded as configuration.
Local password recovery and storage
Credential data is in .phos-admin/password.json beside the selected
file: normally /home/pi/phos/config/.phos-admin/password.json. This stores
only a salted Werkzeug PBKDF2-SHA256 hash (1,000,000 iterations) and the mandatory
change flag. No plaintext password, session key or AWS credential is stored.
The directory is owner-only (0700) and file owner-only (0600); run PHOS as
its normal OS user. All selected configuration files in the same directory
share this administrator store. Only one PHOS web instance per store is supported.
Forgotten password recovery requires local filesystem/terminal access:
- Stop PHOS completely.
- Disable LAN access temporarily by setting
web.hostto127.0.0.1, or disconnect the Pi from the network during bootstrap. - Move the entire credential directory aside (choose an unused backup name):
cd /home/pi/phos
mv config/.phos-admin config/.phos-admin-recovery-backup
- Restart PHOS. A missing credential directory is created with bootstrap
password
phos. Complete the mandatory change locally. - Restore the desired trusted-LAN binding and restart. Retired hash backups remain sensitive local files; do not commit or share them.
For a custom configuration, use its parent directory instead of config/.
A missing or corrupt password file inside an existing directory fails closed;
it never silently re-enables phos. Use the same whole-directory recovery
procedure. Do not delete only password.json while the server is running.
Security and operational limits
- This milestone serves HTTP, without TLS. Passwords and session cookies can be intercepted on an untrusted network. Only use a trusted LAN; perform initial password setup locally where possible. Public Internet access, cloud access and reverse-proxy/TLS deployment are outside this milestone.
- Flask signed cookies use a random per-worker secret, HttpOnly and SameSite=Strict. Secure is intentionally unset because this server uses HTTP; setting it would prevent LAN browser login over HTTP. Server-side random session IDs allow logout/password-change revocation and absolute expiry.
- Flask-WTF protects all POST actions, including login, password changes, saves and logout, against CSRF. Pages use escaping, a restrictive content security policy, no-store caching and anti-framing headers. Password fields are never repopulated. Request bodies and credentials are not logged.
- Waitress runs in a separate process with two threads, bounded connections and request sizes. Password hashing cannot block the render event loop, but all work still shares the Pi's limited CPU. Measure performance on target hardware.
- The worker starts before the runtime; a startup failure prevents a misleading enabled-but-unreachable launch. Missing dependencies, invalid credential permissions and occupied ports must be fixed locally. Shutdown terminates the worker and releases its port, even if runtime startup fails. If the worker crashes later, the parent shuts down and exits nonzero for supervisor recovery.
- Filesystem access is trusted. The editor can select model/cascade/log paths within the privileges of the PHOS OS account. Run as a normal user, not root.
- Configurations/credentials are atomically replaced, but there is no automatic backup, cross-process edit lock, arbitrary subsystem hot reload or high-availability service. A dead web worker now causes graceful parent shutdown and a nonzero exit for systemd recovery.
Implementation uses Flask security guidance, Flask-WTF CSRF protection, Werkzeug password hashing and Waitress.
Verification on the Pi
Enable LAN access, start PHOS, complete the first login, and check the editor from a phone and desktop. Open Display & Appearance, save a harmless display setting and confirm the eyes keep running unchanged until restart. Verify the saved value after restart, then test logout, wrong password and local recovery. If camera tracking is already enabled, confirm it stays responsive while logging in/saving. Provider switches still require the model/AWS setup and physical verification described in installation and Vision; automated web tests use no camera, display, actual credentials or AWS calls.
Login request rejected
A form/session verification error occurs before the password is checked. Reload
http://<PI-LAN-IP>:8080/login after restarting PHOS and allow cookies for that
address. Old tabs contain tokens invalidated by a restart. If it persists, check
the terminal for Administration CSRF rejection; the reason is logged without
passwords or token values. Browser favicon/missing-page requests do not clear
the login session. Update the Pi's source if using the initial implementation.
Save vs Reload vs Restart PHOS
Lifecycle actions are on System actions, separate from editable domain forms. System / Status remains read-only and links to those actions. Every operation requires administrator authentication after mandatory bootstrap rotation; state changes also require CSRF protection.
| Operation | Effect |
|---|---|
| Save on a domain page | Validates and atomically persists the full active configuration source. Does not change active settings, except Eyes → Save & Apply, which immediately applies the saved Eyes settings. |
| Reload configuration | Reads that same file, validates every setting and active path with startup's model, then applies logging level, iris theme, LED ring visual settings and all vision.camera_preview settings through shared runtime services. Shows applied fields and remaining restart-required fields. |
| Restart PHOS | Requires the managed service and explicit confirmation. Validates the saved file, requests graceful application shutdown, then systemd starts PHOS again from disk. |
If any setting/path is invalid, Reload applies nothing, including logging level. Restart is also rejected before shutdown when the saved file is invalid. No-op reloads report no changes. SDK logging stays at WARNING or above even when PHOS logging is switched to DEBUG. No credentials, tokens or request payloads are exposed by this feature.
Appearance
The Skins section covers supplied skins, package authoring, configuration, and troubleshooting. For mode selection, per-agent appearance, and the difference between live Preview and Apply, see Installing and Activating Skins.
The Appearance → Eyes page offers presets cyan, blue, green, turquoise,
amber, violet and white, plus a Custom colour control. display.iris_color is
stored canonically as #RRGGBB (for example #7A5CFF); existing named preset
configuration is accepted and resolved to the same value. It configures the
base iris colour; semantic accent tints still come from BehaviorEngine-produced
FaceState. Save & Apply validates the form, saves it to the canonical
configuration, and immediately sends the validated Eyes settings through the
runtime's display-loop update boundary. If the renderer rejects the update, the
saved configuration is restored. The iris color blends smoothly into the next
frames. PHOS, Vision, camera, BehaviorEngine and providers keep running.
Vision/provider expression labels do not enter the renderer directly; the
renderer consumes the resolved provider-neutral FaceState expression.
The Expression control lists the canonical manually selectable expressions: neutral, happy, curious, surprised, sad, angry, focused, tired, confused, scared and skeptical. Applying one is persistent semantic intent until another expression (normally neutral) replaces it; it does not change Robot State. The live display and Appearance Preview use the same expression-profile geometry. Custom iris colors work with every expression. HAPPY's blue and SURPRISED's yellow eye-body accents are specific semantic exceptions, not a generic emotion-to-color scheme; geometry remains the principal expression signal.
The Eye Safe Layer optionally adds a cached transparent radial halo behind each eye when an uploaded background could reduce contrast. It is enabled by default and has subtle, balanced and expressive modes. Dark, low-variation backgrounds receive little or no protection; the layer never modifies the uploaded file and can be disabled.
Appearance Preview renders a static 800×600 (4:3) server-generated view of the selected state and expression. It is visual simulation only: previewing does not change PHOS behavior, state or expression. State-effect animation is shown as a representative static frame.
Appearance → Skins lists the three built-ins, configured YAML catalog
entries, and managed custom skins. Import .phos-skin or .zip packages with
a root skin.yaml; new exports use schema version 3, while legacy version-2
packages without version-3 optional blocks remain accepted. Import creates a
new local custom ID and does not activate the skin.
Use Preview for temporary live visual settings, Apply to save the global skin and request reconciliation, and Export to keep a portable package. The card UI does not provide rename, manifest, LED-palette, or Physical Personality editors. Supported packages can supply eye shape, semantic LED colours, and Physical Personality in addition to the appearance blocks.
Settings → Agents supports skin assignment and appearance participation, priority, and activity timeout. Global Appearance retains global selection; Follow Active Agent selects eligible active-agent skins through runtime arbitration. Agent assignments and active owned backgrounds can block deletion of a custom skin. Temporary agent appearance does not overwrite global display configuration or change permissions.
Catalogs use schema version 1 and appearance.config_file; custom metadata is
managed in skins.json, with owned backgrounds under
backgrounds/skins/<custom-id>/ beside the active configuration. Packages do
not fetch remote assets or carry runtime state and secrets. Missing assets,
preview limitations, and activation failures are covered in the dedicated guide.
See Installing and Activating Skins for the full workflow, Skin Configuration for supported fields, and Creating a Custom Skin for a validated tutorial.
State Backgrounds accepts validated PNG and JPEG files from the managed
backgrounds directory. display.backgrounds.max_upload_bytes sets the
per-image limit (the shipped value is 4 MiB); the page shows that same limit.
Images are limited to 1920×1080 to bound decoded memory on the Pi. Uploading,
deleting and assignment selection always use the directory-backed asset list.
The Vision page also manages the optional camera preview on the physical PHOS display. It is off by default; choose a corner, scale and maximum preview FPS, then select whether to show the current face box and expression diagnostics. Save to apply these fields immediately. The preview uses the existing camera owner and latest in-memory frame, stays on the local display, and is neither recorded nor exposed over this administration interface.
Iris color is reloadable; camera preview settings apply directly from Runtime saves. Display geometry, cadence, fullscreen and behavioral timing still require restart. Other implemented settings requiring restart are web enabled/host/port; camera resolution/tracking/detection; expression enabled/provider, preprocessing, smoothing and AWS policy; log destination and expression diagnostics. Switching local/AWS is never done live. Password changes use their separate immediate session-revoking mechanism, independent of Save/Reload.
The page shows configuration path, last successful startup/reload UTC time, whether saved and active settings differ, reloadable differences and fields requiring restart. Active settings are tracked by the parent application service, not inferred from the saved file. The timestamp does not mean restart-only settings were applied: those remain listed as pending. Runtime health and AWS credential availability are not monitored.
To reload, open System actions and click Reload configuration. To restart, click Review and confirm restart, read the interruption notice, check the confirmation checkbox and press Restart PHOS. GET/page navigation never restarts anything. A confirmation can be used only once. The acknowledgement is: Restart requested. PHOS will reload the configuration on startup.
Expect temporary web loss and log in again after a few seconds. A slow connection may lose the acknowledgement as shutdown begins; check the service locally before retrying. The saved network settings determine the new URL. If web administration was disabled, use the Pi terminal to enable it again. Unsaved form edits are lost.
Follow managed startup to install the user service. Manual terminal launches support Reload, but browser Restart is unavailable; stop and rerun the normal startup command locally. Do not run a manual copy beside the service (camera/port contention). No reboot, arbitrary command execution, privileged shell or generic service-management API is provided. Reboot Raspberry Pi is deferred beyond 1.3.0.
Configuration must remain valid until restart completes. Avoid concurrent local file edits; a file changed or hardware removed after validation can still cause startup to fail. Systemd bounds repeated startup failures; inspect its journal and repair locally as described in installation. A lifecycle channel failure reports unavailable rather than pretending that settings were applied.
Preview reload failures are shown as errors and logged in the parent. Earlier successful appearance changes may already be active; inspect System actions after correcting the camera/dependency problem. Invalid JSON/schema applies nothing. An accepted preview configuration does not certify live image quality; check the physical display and logs. The lifecycle channel waits up to five seconds. If a native camera start takes longer, the action may still complete; the response reports uncertainty and the channel stays unavailable until PHOS restarts. Check locally rather than assuming the operation was cancelled.
Sensors — BME280 / BMP280
After I2C setup, open
Sensors, select Type → BME280 or BMP280, enable the sensor, choose the actual 0x76/0x77 address and save.
Polling and stale timeout are seconds; the editor uses canonical validation.
All changes, including timing and disable, require System actions → Restart
PHOS (or a manual stop/start). Reload leaves them pending without touching
sensor, display or Vision services. Saving enabled does not mean a sensor exists.
The read-only panel reflects the parent application/status service at page load: it shows the runtime's semantic robot state, active visual source, resolved expression and interpreted motion state alongside the provider-neutral sensor snapshot. The web worker never imports or reads a sensor provider directly. Temperature (°C), relative humidity (%) for BME280, and atmospheric/station pressure (hPa), last successful UTC update, age in seconds, and status. Refresh for another snapshot after saving any edits. This is not an automatically refreshing dashboard. No sensor driver runs in the web worker and no extra network sensor endpoint is introduced.
BMP280 has no humidity sensor: its value is null and the panel shows Not supported, including when unavailable. The panel shows the active sensor type and uses explicit capabilities from runtime. A saved selection does not change the displayed active type/capabilities until restart.
Status is disabled, starting, available, unavailable, stale or stopped. Failed and stale measurements are hidden, while last-update/age remain visible for diagnosis. Before the first successful read there is no timestamp. Missing libraries/hardware, wrong chip/address and I/O errors show unavailable; errors are sanitized to their exception type. Consult the Pi journal and installation troubleshooting. A broken parent channel shows status unavailable, never guessed values from saved configuration. Sensor failures do not change PHOS behavior.
Selecting a sensor type does not install its driver. If the sensor error is
ModuleNotFoundError and the Pi journal says No module named 'bmp280', follow
the BMP280 driver recovery instructions
to install and verify the dependency in PHOS's virtual environment. Check the
active configuration path under System / Status if the logged sensor type
differs from the file you edited.
ENS160 air quality and AHT21 environment
The Sensors page shows controller-backed ENS160/AHT21 state. sensors.ens160
contains estimated eCO2, TVOC, AQI-UBA, validity, compensation and measurement
usability; sensors.aht21 contains controller-provenance temperature and humidity
with independent freshness. The page does not configure or access a direct-Pi
AHT21 provider. See the ENS160/AHT21 installation procedure.
The read-only panel shows eCO2 (estimated equivalent CO2), ppm, TVOC, ppb,
last successful UTC update, age, health and compensation input. eCO2 is not a
direct NDIR CO2 measurement. Values are hidden during warming_up, unavailable,
stale or disabled states; the initial timestamp is absent. Refresh for a new
snapshot; this page does not acquire hardware or automatically stream readings.
The runtime withholds readings for 20 minutes after initialization. A new sensor needs longer first-use conditioning; see installation. Missing DATA_READY keeps polling without restarting the conditioning period. Fault recovery or PHOS restart does initialize it again. Fresh BME280 temperature/humidity may supply compensation automatically. BMP280 lacks humidity; stale, failed or missing environmental data use clearly labeled device defaults. The panel reports the input last written, not a guarantee that the displayed gas sample already incorporates it. Consult the journal for hardware ERROR_ID diagnostics.
GY-521 / MPU-6050 motion
The GY-521 / MPU-6050 motion group edits enabled state, 0x68/0x69 address,
polling and stale timeout, which require System actions → Restart PHOS. Its
motion threshold subgroup is live-reloadable: save then use Reload
configuration, without resetting the sensor. The
read-only panel shows acceleration X/Y/Z in m/s² and angular velocity X/Y/Z in
°/s, interpreted motion state, tilt direction, last event, timestamp, age and status. Factory scale only; no offset calibration
means the adapter converted its ±2 g / ±250 °/s raw scale but did not require a
motionless startup calibration. Values are hidden whenever unavailable or stale;
the page never opens I2C itself. Setup and Pi verification are in the
MPU-6050 installation guide.
IMU visual intensity and timing appear under Display & Appearance → Eye
behavior. They are applied by Reload configuration. Persistent movement and
tilt react while their motion state remains active; SHAKE and IMPACT use brief
alert overlays followed by smooth decay. imu_tilt_eye_asymmetry_strength
mirrors horizontal tilt eye sizes; impact strength must exceed shake strength so
the strongest alert remains unambiguous. Robot states such as
sleeping, speaking and error retain priority.
Skin LED palettes (SKIN-03)
A skin may optionally carry an led_palette alongside its eye appearance. It
is declarative theme metadata applied only through the existing runtime
SemanticLedService. Configure this metadata directly in a skin YAML/package
definition; Appearance → Skins does not edit palettes. Its Active LED
Palette status reports the current runtime skin, palette state, semantic state,
and available colors without creating a second palette selection or draft.
Supported semantic states are idle, listening, thinking, speaking,
sleeping, success, attention, and ambient. Omitted colors use the
semantic LED fallback; catalog palettes may inherit parent colors. Warning and
error remain protected system colors. The external-controller SemanticLedService
remains the exclusive authority for intent, priority, animation, expiry, safety
signals, and controller capability fallback.
The palette shape is {"enabled": true, "colors": {...}}. Colors must be
canonical #RRGGBB values. Supported semantic keys are idle, listening,
thinking, speaking, sleeping, success, attention, and ambient.
warning and error are deliberately excluded: their safety colours remain
arbiter-owned. A palette may be partial; omitted colors fall back to the
arbiter's existing command colors. {"enabled": false, "colors": {}}
explicitly disables a palette.
For catalog skins, an omitted led_palette inherits the parent palette; an
enabled palette overlays only named colors; null removes an inherited palette;
and a disabled palette stops inheritance. Built-in and custom skins without a
palette are unchanged. Package exports now use manifest schema version 3 while
imports remain compatible with schema version 2 packages. Read-only resolution
follows the currently effective agent/default-agent skin, but no global LED
settings are mutated.
The runtime supplies the resolved palette only after the corresponding visual
appearance has been accepted. SemanticLedService then re-evaluates its current
winner: a configured themeable color replaces that command's default color;
missing/disabled/global palettes clear theme colors and use the existing command
color; warning/error always use protected colors. This does not create, cancel,
or extend an intent, so priorities, effects and expiries are unchanged. A
controller reconnection still uses the existing arbiter reapply path, now with
the current themed command. Read-only LED status includes palette metadata and
whether the active color is palette, fallback, or protected.
Authenticated MCP appearance activity
PHOS can retain per-agent appearance policy metadata: participation, priority,
and an activity timeout. In appearance.mode: follow_agent, the runtime records
an in-memory lease only after a registered agent has authenticated and completed
an accepted MCP semantic tool or resource interaction. A successful MCP
connection, transport keepalive, health check, anonymous request, invalid token,
or permission-denied request does not renew a registered agent lease.
Leases use a monotonic clock and are never persisted. They expire after the agent's configured timeout, including when no new requests arrive. A restart therefore begins with no active leases. Eligible agents must participate and have an enabled, available assigned skin. The selector chooses the highest priority active eligible agent; equal priorities retain the previous winner while it remains eligible, otherwise their canonical IDs provide a stable tie break. The Default Agent does not affect this decision.
The arbitration result is lifecycle-owned and safe for later administration read models; it contains identities, selected skin IDs, priorities and lease state, never bearer values or secret references. Anonymous MCP clients retain their configured permissions and are never mapped to the default agent; when the explicit Appearance → Skins fallback is enabled they can select only its low-priority temporary skin candidate. Multiple authenticated sessions for one agent share one lease.
SKIN-02d.2 deliberately does not apply this result to the physical display. Existing manual Presentation Owner behavior remains unchanged; runtime visual activation is deferred to SKIN-02d.3.