[PR #3290] [MERGED] fix(ha): default integration port to 7860 to match server #5868

Closed
opened 2026-10-22 04:20:20 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3290
Author: @kolacheee
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/5/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/ha-integration-default-port


📝 Commits (1)

  • f8c668f fix(ha): default integration port to 7860 to match server

📊 Changes

4 files changed (+6 additions, -6 deletions)

View changed files

📝 custom_components/marinara_engine/const.py (+1 -1)
📝 custom_components/marinara_engine/strings.json (+1 -1)
📝 custom_components/marinara_engine/translations/en.json (+1 -1)
📝 docs/integrations/home-assistant.md (+3 -3)

📄 Description

Resolves #3291

Why

Marinara Engine's server listens on 7860 everywhere — packages/server/src/config/runtime-config.ts (DEFAULT_PORT = 7860), .env.example (PORT=7860), start.bat / start.sh / start-termux.sh (export PORT=7860), and scripts/dev.mjs.

But the Home Assistant integration's config flow pre-filled port 3000. A user adding the integration against a stock Marinara install submits the form as-is and immediately hits cannot_connect, because the default never points at a real listener. The fix aligns the integration default with the server's actual port.

What changed

  • custom_components/marinara_engine/const.py — DEFAULT_PORT = 3000 → 7860. This is the value the config-flow form uses as the port pre-fill (config_flow.py _STEP_USER_SCHEMA), so it's the actual behavior fix.
  • custom_components/marinara_engine/strings.json and translations/en.json — both now state (default: localhost:7860). Note: en.json carried a stale localhost:3000 string while strings.json had no default text at all, so these two files were already out of sync — this also brings them back into agreement (HA expects translations/en.json to mirror strings.json).
  • docs/integrations/home-assistant.md — updated the three localhost:3000 references (lines 26, 42, 158) to 7860.

Coordination

  • The three doc-line edits overlap with a separate docs audit that is already reporting the localhost:3000 doc references. They're included here because they're part of the same one-line-of-truth fix, but if the audit's doc change lands first, expect a trivial conflict on those three lines only. The const.py change is the unique, primary deliverable and won't collide.
  • No linked issue currently exists for this fix. Per CONTRIBUTING.md § Before You Open a Pull Request, an issue/feature request should be opened to track it before this PR is merged.

Validation

  • pnpm check passes (typecheck + lint + build, exit 0). (Note: the changed files are Python / JSON / Markdown and are outside pnpm check's TypeScript+ESLint scope, so it confirms the baseline is green rather than exercising this change directly.)
  • Both JSON files re-parse successfully after the edit.
  • No 3000 references remain under custom_components/ or in the HA doc.

Manual verification (not yet done)

  • In a Home Assistant instance, add the Marinara Engine integration against a stock local install and confirm the port field pre-fills 7860 and the flow connects without cannot_connect.
  • Confirm the config-flow form description renders (default: localhost:7860) in the HA UI.
  • Confirm the rendered docs/integrations/home-assistant.md reads correctly at the three updated spots.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated setup and troubleshooting guidance to reflect the current default connection address: localhost:7860.
    • Revised the integration’s user-facing configuration text to match the new default host and port.
  • Bug Fixes
    • Aligned the default connection port with the value expected by the integration, improving out-of-box setup consistency.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3290 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/5/2026 **Status:** ✅ Merged **Merged:** 7/5/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/ha-integration-default-port` --- ### 📝 Commits (1) - [`f8c668f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8c668f60e7ea2a2253aa49725ce43a77e0dfa7c) fix(ha): default integration port to 7860 to match server ### 📊 Changes **4 files changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `custom_components/marinara_engine/const.py` (+1 -1) 📝 `custom_components/marinara_engine/strings.json` (+1 -1) 📝 `custom_components/marinara_engine/translations/en.json` (+1 -1) 📝 `docs/integrations/home-assistant.md` (+3 -3) </details> ### 📄 Description Resolves #3291 ## Why Marinara Engine's server listens on **7860** everywhere — `packages/server/src/config/runtime-config.ts` (`DEFAULT_PORT = 7860`), `.env.example` (`PORT=7860`), `start.bat` / `start.sh` / `start-termux.sh` (`export PORT=7860`), and `scripts/dev.mjs`. But the Home Assistant integration's config flow pre-filled port **3000**. A user adding the integration against a stock Marinara install submits the form as-is and immediately hits **`cannot_connect`**, because the default never points at a real listener. The fix aligns the integration default with the server's actual port. ## What changed - **`custom_components/marinara_engine/const.py`** — `DEFAULT_PORT = 3000` → `7860`. This is the value the config-flow form uses as the port pre-fill (`config_flow.py` `_STEP_USER_SCHEMA`), so it's the actual behavior fix. - **`custom_components/marinara_engine/strings.json`** and **`translations/en.json`** — both now state `(default: localhost:7860)`. Note: `en.json` carried a stale `localhost:3000` string while `strings.json` had *no* default text at all, so these two files were already out of sync — this also brings them back into agreement (HA expects `translations/en.json` to mirror `strings.json`). - **`docs/integrations/home-assistant.md`** — updated the three `localhost:3000` references (lines 26, 42, 158) to `7860`. ## Coordination - The three doc-line edits overlap with a **separate docs audit** that is already reporting the `localhost:3000` doc references. They're included here because they're part of the same one-line-of-truth fix, but if the audit's doc change lands first, expect a trivial conflict on those three lines only. The `const.py` change is the unique, primary deliverable and won't collide. - **No linked issue** currently exists for this fix. Per `CONTRIBUTING.md § Before You Open a Pull Request`, an issue/feature request should be opened to track it before this PR is merged. ## Validation - `pnpm check` passes (typecheck + lint + build, exit 0). *(Note: the changed files are Python / JSON / Markdown and are outside `pnpm check`'s TypeScript+ESLint scope, so it confirms the baseline is green rather than exercising this change directly.)* - Both JSON files re-parse successfully after the edit. - No `3000` references remain under `custom_components/` or in the HA doc. ## Manual verification (not yet done) - [ ] In a Home Assistant instance, add the Marinara Engine integration against a stock local install and confirm the port field pre-fills **7860** and the flow connects without `cannot_connect`. - [ ] Confirm the config-flow form description renders `(default: localhost:7860)` in the HA UI. - [ ] Confirm the rendered `docs/integrations/home-assistant.md` reads correctly at the three updated spots. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated setup and troubleshooting guidance to reflect the current default connection address: `localhost:7860`. * Revised the integration’s user-facing configuration text to match the new default host and port. * **Bug Fixes** * Aligned the default connection port with the value expected by the integration, improving out-of-box setup consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:20:20 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5868
No description provided.