Skip to content

First-time setup polish and Marketplace readiness (v0.8.0) - #9

Merged
aniceberg merged 2 commits into
mainfrom
claude/mystifying-kilby-23a877
Nov 5, 2026
Merged

aniceberg merged 2 commits into
mainfrom
claude/mystifying-kilby-23a877

Conversation

@aniceberg

Copy link
Copy Markdown
Owner

Makes first-time setup smoother for Traccar and Bouncie users and prepares the repo for the Marketplace catalog. Not released: no tag or GitHub release, and the version bump only takes effect once someone merges and tags.

What changes

  • First profile: after choosing vehicles, setup opens the bus profile form via next_flow, with the bus preselected. Closing it is harmless, because Add bus profile stays on the integration page. A provider added later gets this without extra work.
  • Traccar addresses: accepts gps.example.com:8082, http://host:8082/login?x=1#/map, https://user:pass@host/traccar/settings and similar. The login is kept out of the stored URL, and a reverse proxy's sub-path is kept.
  • Traccar errors: separate messages for an invalid address, nothing answering, a server that isn't Traccar, a wrong login and no vehicles. A 200 HTML page used to pass login, then crash with an unhandled JSON error while listing devices.
  • Bouncie: the Client ID and Secret are entered in the setup flow, on a screen with the portal link and the exact redirect URI, so nobody has to leave for Application credentials first. docs/bouncie.md is rewritten around this, with My Home Assistant badges and a section on fixing mistyped credentials.
  • Blueprint: blueprints/automation/bus_monitor/announce_bus_alerts.yaml, based on examples/automations/announce_all_alerts.yaml, plus filters for alert kind and profile. The README and docs/automations.md link to it instead of repeating it.
  • Diagnostics: diagnostics.py copies fields from an allowlist rather than redacting stored data, so a future setting can't leak by default. It leaves out addresses, logins, tokens, names, vehicle ids and all coordinates. Schedule times are included.
  • Marketplace: manifest categories are vehicles_transport and presence_location.trackers. The README install steps now use Marketplace wording.

Decisions to check

  • Stop starts at home. The form used to draw a pin at home but ignore it until dragged, then store the map's default 1 km radius, so "arrived" could fire about 1 km early. It now starts at home with 75 m. Someone who submits without moving the pin gets a stop at home, which is visible on the map but no longer blocked by an error. Profiles created earlier by dragging may have 1 km stored; this PR doesn't change them.
  • Plain http for bare addresses. With no scheme, setup checks /api/server on https, then http, without credentials. If only http answers, the login goes over http with no second prompt. An attacker on the network who blocks https could force that. The form warns about it, and typing https:// prevents it.
  • Stricter Traccar login. login() now requires a JSON object from POST /api/session, and this also runs on every startup. That matches the Traccar API, but it has not been run against a real Traccar 4.1 server. Please add a test entry or restart with your own server before release.
  • Wrong Bouncie credentials stay saved. Retrying skips the form, so docs/bouncie.md explains how to delete them.

Testing

  • 206 tests pass and ruff is clean. providers/traccar.py coverage goes from 46% to 100%.
  • Walked through in a local Home Assistant 2026.10.4 preview against a fake Traccar server: not-Traccar and wrong-login errors, a pasted URL being normalised, the chain into the profile form, the closing message, the 75 m stop and the Bouncie form. A real diagnostics download contained none of the address, login, names or coordinates.
  • Not tested: the real Bouncie sign-in, a real Traccar server, the blueprint import button (the URL works only after merge), and Home Assistant 2026.11, because PyPI's latest stable is still 2026.10.4 here.

After merge

  • The README tells people to search the Marketplace, which only works once the hacs/default submission is accepted. It includes a fallback for adding the repository by link.
  • The GitHub repo description still says HACS and Traccar only.

🤖 Generated with Claude Code

- Setup goes straight from choosing vehicles to the first bus profile, with
  the bus preselected and the stop starting at home with a 75 m radius. Before,
  the map showed a pin it ignored, then stored a 1 km radius once dragged.
- Traccar: accept addresses as pasted (no scheme, trailing pages, stray logins)
  and give specific errors for a bad address, nothing answering, not a Traccar
  server, a wrong login and no vehicles. An address with no scheme is probed
  without credentials, https first. Client coverage 46% -> 100%.
- Bouncie: register the app inside the setup flow, with the portal link and
  redirect URI on screen. docs/bouncie.md gains My Home Assistant badges.
- Add an importable announcement blueprint and a diagnostics download built
  from an allowlist, so credentials, names and coordinates can't appear in it.
- Add manifest categories and Marketplace install wording in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T14:34:37.229466Z eae16e1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aniceberg
aniceberg merged commit b52dfba into main Nov 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant