mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3270] docs: docs/integrations/home-assistant.md is out of date - wrong default port, missing WEBHOOK_LOCAL_URLS_ENABLED step, wrong tool location #1766
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1766
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jul 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3270
Originally assigned to: @SpicyMarinara on GitHub.
docs/integrations/home-assistant.mdhas drifted from the shipped app. Found in a full docs-vs-code audit against v2.1.0. Each item below is independently checkable: open the doc at the noted spot and compare against the app or code. These can all land in one PR that refreshes the file.4 items found.
1. Requirements (line 26), Installation step 2 'Add the integration' (line 42), Troubleshooting 'Cannot connect on setup' (line 158)
(outdated)
The doc states Marinara's default address is localhost:3000 in three places. The server listens on port 7860 by default in every launch path - dev script, all three launchers, installer .env default - and even the Vite dev client uses 5173 (proxying /api to 7860), so 3000 is wrong everywhere. A user who accepts the documented (and integration-pre-filled) port 3000 gets 'cannot_connect' at setup, and the doc's troubleshooting entry then repeats the same wrong port.
Suggested fix: Change all three doc occurrences of 'localhost:3000' / 'localhost / 3000' to 'localhost:7860', and in the same change fix the integration's own default so the doc and the config-flow form agree: const.py:6 (DEFAULT_PORT = 7860) and translations/en.json:6.
2. 'How it works' + 'Done' (lines 9, 20, 53) and Troubleshooting 'Webhook calls failing' (lines 154-155)
(missing)
The doc claims everything works automatically after setup and attributes webhook failures solely to network reachability, never mentioning WEBHOOK_LOCAL_URLS_ENABLED. With that flag off (the default), Marinara's webhook tool executor restricts webhook calls to https: and blocks loopback/private/LAN addresses - but the webhook URL the integration writes into every tool is always plain http on a local address (get_url internal URL or http://<local_ip>:8123 fallback). So on a stock Marinara install every ha_* tool call is refused by the SSRF guard regardless of reachability. The doc is missing a required setup step: set WEBHOOK_LOCAL_URLS_ENABLED=true in Marinara's .env.
Suggested fix: Add a required step to Installation and a first entry under 'Webhook calls failing': set WEBHOOK_LOCAL_URLS_ENABLED=true in Marinara's .env (link docs/CONFIGURATION.md), because Home Assistant webhook URLs are plain-HTTP local addresses that Marinara's outbound-request protection blocks by default. Quote both possible errors users will see in the tool result - "Webhook call failed: Refused to fetch ...: protocol 'http' is not allowed (allowed: https)" and the private-address variant that names the flag - and note the flag takes effect within ~2s without a restart (security.ts:267).
3. Installation 'On startup' bullet (line 48), Troubleshooting 'Tools not appearing' (lines 145-146), 'Finding the webhook URL manually' (line 167)
(outdated)
The doc directs users to 'Marinara → Settings → Custom Tools' to verify synced tools. That location does not exist: the Settings panel has no custom-tools section anywhere. Custom tools are listed in the 'Functions' section of the Presets panel (subtitle: 'Custom function calls available from Chat Settings'). A user following the doc looks in Settings, finds nothing, and concludes the sync failed.
Suggested fix: Replace 'Settings → Custom Tools' with 'Presets panel → Functions section' at lines 48 and 146 (e.g. 'Verify under the Functions section of the Presets panel in Marinara'), and change line 167's 'Marinara's Custom Tools list' to 'Marinara's Functions list (Presets panel)'.
4. 'Re-syncing tools' (line 141)
(outdated)
The doc says 'Tools that already exist are skipped - it's safe to press at any time.' Sync does not skip existing tools: it PATCHes every selected tool with the full canonical payload (description, parametersSchema, webhookUrl, and enabled: true), and additionally disables integration-managed tools whose category was deselected. Any manual edits a user made to an HA tool definition are silently overwritten, and a tool they manually disabled within an enabled category is force-re-enabled - contrary to the doc's safety claim.
Suggested fix: Reword line 141 to match behavior: 'Existing tools are updated in place so schema changes propagate - manual edits to HA-managed tool definitions are overwritten and re-enabled - and managed tools from deselected categories are disabled.' Keep the note that the agent is recreated if deleted. Optionally fix the matching stale comment at custom_components/marinara_engine/init.py:67 in the same change.
@SpicyMarinara commented on GitHub (Jul 5, 2026):
Addressed in #3289.