Coder Social home page Coder Social logo

rivian-python-api's People

Contributors

doggkruse avatar edman007 avatar p5k6 avatar stacksharebot avatar the-mace avatar wschenk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rivian-python-api's Issues

Add Tire pressures

So I reviewed the most recent android app, and this is the android app query for the tire pressure:

subscription tirePressureState($vehicleID: String!) { vehicleState(id: $vehicleID) { tirePressureStatusFrontLeft { timeStamp value } tirePressureStatusFrontRight { timeStamp value } tirePressureStatusRearLeft { timeStamp value } tirePressureStatusRearRight { timeStamp value } tirePressureFrontLeft { timeStamp value } tirePressureFrontRight { timeStamp value } tirePressureRearLeft { timeStamp value } tirePressureRearRight { timeStamp value } } }

Unfortunately, trying to put those new fields into the vehicle state query doesn't seem to work. I'm guessing maybe they only work when you do a subscription instead of a query? Unfortunately, supporting a subscription seems to be a little complex.

Not sure if someone can figure out how to add those tire pressure fields.

Fails to auto-detect the vehicle ID

I'm trying to test the API, and as recommended I made a seperate account for API use, this account has no keys, has never used the app, has never made an order, etc.

When using a command that needs a vehicle ID, like --state, currently the code runs the command for vehicle_orders to find a vehicle. This doesn't work in this case, as I have no order, instead the user info provides the correct info.

TypeError when retrieving vehicle orders

When I attempt to retrieve my vehicle orders, I receive a traceback before all information is displayed.

bin/rivian_cli --vehicle_orders

Vehicle Orders:
Order ID:
Order Date: 2021-04-27T03:06:04.696Z
Config State: CONFIGURED
Order State: CANCELLED
Status: None
Item: ACERAWM001
Customer flow complete: No
Traceback (most recent call last):
File "/root/rivian-python-api/src/rivian_python_api/rivian_cli.py", line 1205, in
main()
File "/root/rivian-python-api/src/rivian_python_api/rivian_cli.py", line 685, in main
delivery_status = delivery(order['id'], args.verbose)
File "/root/rivian-python-api/src/rivian_python_api/rivian_cli.py", line 345, in delivery
vehicle['vin'] = response_json['data']['delivery']['vehicleVIN']
TypeError: 'NoneType' object is not subscriptable

I do have two vehicles in my order history. One of which was canceled and a second one I am soft locked on. Not sure if that is what is causing an issue.

Functions don't seem to work due to a canceled vehicle order on my account.

When I attempt to run any of the functions (e.g. --vehicles, --state, --last_seen, --ota, --poll, --charging_schedule, --live_charging_session, --live_charging_history) I receive a traceback.

bin/rivian_cli --last_seen

Traceback (most recent call last):
File "/root/rivian-python-api/src/rivian_python_api/rivian_cli.py", line 1214, in
main()
File "/root/rivian-python-api/src/rivian_python_api/rivian_cli.py", line 742, in main
details = order_details(order['id'], verbose)
File "/root/rivian-python-api/src/rivian_python_api/rivian_cli.py", line 129, in order_details
'vehicleId': response_json['data']['order']['vehicle']['vehicleId'],
TypeError: 'NoneType' object is not subscriptable

The trace looks identical for each of these functions. I think this may be because I have a canceled order on my account and it isn't being handled properly. I'm happy to provide additional output if needed. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.