Repository navigation
feat: add the MG Brazil (mg_br) configuration preset - #65
Merged
Merged
Conversation
Adds SaicApiConfiguration.mg_br() for the "MG i-SMART LATAM" app: base URI https://gateway-mg-br.soimt.com/api.app/v1/, region br. Tenant ID and device app id keep the shared defaults, like the other MG presets. Login and the vehicle list were checked against a real MG4 Urban in Brazil (secondary account). The preset is added to the README table and to test_mg_presets. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
SaicApiConfiguration.mg_br()for the "MG i-SMART LATAM" app used in Brazil: base URIhttps://gateway-mg-br.soimt.com/api.app/v1/and regionbr. The tenant ID and the device app id keep the shared defaults, like the other MG presets. The preset is added to the README table and totest_mg_presets.Transparency: I am a Brazilian MG4 Urban owner, not an expert on the SAIC API. Claude helped me with the investigation and the patch, and it can make mistakes.
How I checked it
login()andvehicle_list()against the Brazil endpoint with a secondary MG account and one MG4 EV URBAN (model year 2027), library0.14.0: both succeed.REGIONheader:brandeuwere both accepted by the Brazil host. The device app id:com.saicmotor.europecar(the default) andcom.saicmotor.iov.sa(the id of the LATAM app on the App Store) were both accepted. Only tenant459771was tried.saic-python-mqtt-gateway0.14.0-rc2: login, alarm switch registration, and the vehicle status, charging status and battery heating polls worked.pytest testspasses (76 passed), andruff checkandruff format --checkare clean.Limits
One car, one model, one account. I did not test remote commands. The same endpoint, region code and tenant ID are listed for Brazil by a few other projects (ioBroker.mg-saic, mg-saic-ha, homebridge-mg-saic, GdAAuto), which I have not verified.
Related: I will add the endpoint to the gateway README table in a separate PR.
🤖 Generated with Claude Code