Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON option not working? #467

Closed
wivaku opened this issue Jan 10, 2022 · 4 comments
Closed

JSON option not working? #467

wivaku opened this issue Jan 10, 2022 · 4 comments

Comments

@wivaku
Copy link

wivaku commented Jan 10, 2022

I tried: renault-api --json status

----------------  -------------------
Total mileage     xxx.xx km
GPS Latitude      xxx
GPS Longitude     xxx
GPS last updated  2022-01-10 13:36:19
HVAC status       off
----------------  -------------------

Was expecting JSON output
(and -for my Dacia Spring EV car-: was hoping for more output, especially charge status)

@usky73
Copy link

usky73 commented Jan 16, 2022

same for me

@epenet
Copy link
Collaborator

epenet commented Jan 27, 2022

The JSON output doesn't apply to the "status" command.
The status command talks to multiple endpoints, and formats the result automatically.

If you wish to return JSON, you should query the endpoints individually:

renault-api --json http get "/commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v2/cars/{vin}/battery-status"
renault-api --json http get "/commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/charge-mode"
renault-api --json http get "/commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v2/cars/{vin}/cockpit"
renault-api --json http get "/commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/location"
renault-api --json http get "/commerce/v1/accounts/{account_id}/kamereon/kca/car-adapter/v1/cars/{vin}/hvac-status"

@epenet
Copy link
Collaborator

epenet commented Jan 27, 2022

We also have this PR open regarding the support for Dacia Spring: #459

@epenet
Copy link
Collaborator

epenet commented Jan 27, 2022

Note: this is a duplicate of #188

@epenet epenet closed this as completed Jan 27, 2022
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

No branches or pull requests

3 participants