Skip to content

feat: add SAIC_REGION=br for MG iSMART LATAM (Brazil) - #597

Merged
joszz merged 1 commit into
joszz:mainfrom
arthur-lzrs:feat/saic-region-br
Nov 12, 2026
Merged

joszz merged 1 commit into
joszz:mainfrom
arthur-lzrs:feat/saic-region-br

Conversation

@arthur-lzrs

@arthur-lzrs arthur-lzrs commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Summary

Maps SAIC_REGION=br to https://gateway-mg-br.soimt.com/api.app/v1/ in docker/resolve-saic-rest-uri.sh and lists br next to eu, au and tr in README.md, docker/all-in-one/README.md, documentation/CONFIGURATION.md, .env.example and unraid/garagestack.xml. An explicit SAIC_REST_URI still wins, as before.

Transparency: I am a Brazilian MG4 Urban owner, not an expert on the SAIC API. Claude helped me with the investigation and this change, and it can make mistakes. Details of what I tested and its limits are in the linked issue.

How I checked it

  • Ran the script with SAIC_REGION set to eu, au, tr and br and to an unknown value, and with an explicit SAIC_REST_URI: each region resolves to its endpoint, an unknown region leaves it empty, and the explicit value wins.
  • Ran the all-in-one image 0.15.1 with SAIC_REST_URI set to the Brazil endpoint and SAIC_REGION=br, on an MG4 EV URBAN in Brazil with a secondary account: the gateway logged in and the telemetry reached the dashboard. (I set SAIC_REST_URI by hand in that run; I did not rebuild the image with this patch.)
  • unraid/garagestack.xml still parses as XML.

Type of Change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Dependency update
  • Other

Related Issues

Closes #594

Checklist

  • Tests added or updated (shell script and docs only; I checked the script by hand as described above)
  • Linting passes (pnpm lint / dotnet build) (no frontend or .NET code changed; shellcheck was not available to me)
  • No secrets or personal data committed
  • Responsive on mobile (not applicable)
  • i18n keys added for any new UI strings (not applicable)
  • If unraid/garagestack.xml changed: it will need syncing to joszz/unraid-community-apps after merge, through a pull request there (see "Keeping the Community Apps copy in sync" in documentation/RELEASING.md). I can open that PR if you want.

🤖 Generated with Claude Code

@joszz
joszz force-pushed the feat/saic-region-br branch 2 times, most recently from 55fdccf to 7772975 Compare November 12, 2026 20:01

@joszz joszz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, and for the careful write-up in #594.

I checked the change against the current main:

  • docker/resolve-saic-rest-uri.sh resolves eu, au, tr and br to their endpoints, leaves an unknown region empty, falls back to eu when SAIC_REGION is unset, and an explicit SAIC_REST_URI still wins.
  • Every place that lists the regions is updated: both READMEs, CONFIGURATION.md, .env.example and both entries in unraid/garagestack.xml. Nothing else in the repository depends on the list.
  • It merges cleanly with main.

One small point, not a blocker: the comment at the top of resolve-saic-rest-uri.sh names the "API Endpoints" table in the saic-python-mqtt-gateway README as the source of truth, and that table does not list Brazil until SAIC-iSmart-API/saic-python-mqtt-gateway#527 is merged. A short note in the comment (for example that br comes from that PR and the other projects you linked in #594) would keep a later reader from removing it as unknown.

After merge, the Unraid template change needs the sync to joszz/unraid-community-apps, and your offer to open that PR is welcome.

🤖 Generated with Claude Code

@joszz
joszz enabled auto-merge November 12, 2026 20:04
@joszz
joszz disabled auto-merge November 12, 2026 20:04
@joszz
joszz force-pushed the feat/saic-region-br branch from 7772975 to b6c4b5f Compare November 12, 2026 20:10
@joszz
joszz enabled auto-merge November 12, 2026 20:13
Maps SAIC_REGION=br to https://gateway-mg-br.soimt.com/api.app/v1/ in
resolve-saic-rest-uri.sh and lists it next to eu, au and tr in the README, the
all-in-one README, CONFIGURATION.md, .env.example and the Unraid template.

Checked with the all-in-one image (0.15.1) on an MG4 Urban in Brazil: the
gateway logs in, registers the alarm switches and polls the vehicle and charging
status, and the telemetry reaches the dashboard.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@joszz
joszz force-pushed the feat/saic-region-br branch from b6c4b5f to 440b730 Compare November 12, 2026 20:15
@joszz
joszz merged commit 36bb595 into joszz:main Nov 12, 2026
22 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.

[Feature]: Support MG iSMART LATAM (Brazil): SAIC_REGION=br

2 participants