hacf-fr / renault-api

https://readthedocs.org/projects/renault-api/
MIT License
105 stars 38 forks source link

Add samples from other vehicles #48

Open epenet opened 3 years ago

epenet commented 3 years ago

It would be great to get samples from more vehicles and from extra functionalities.

Vehicles:

Data:

Action:

Errors:

To add a fixture:

  1. grab a trace from your favourite tool, for example using the renault-api CLI:
    $ pip install renault-api[cli]
    $ renault-api --log status
  2. add the json file to the correct test/fixtures/kamereon folder (vehicles or vehicle_data)
  3. ensure that the registration number starts with REG-, that the vin starts with VF1AAAA and that the radio code is equal to 1234.
  4. beautify the json (2 spaces indentation) either manually, through pre-commit or through an online tool (eg https://codebeautify.org/jsonviewer)
  5. create a Pull Request

Note: registration number, vin and radio code are currently the only keys which need to be obfuscated. If you feel that extra data should be automatically obfuscated, then please tweak tests/model/test_kamereon.py and add a separate PR.

oncleben31 commented 3 years ago

Be careful I've seen data linked to vehicle registered id and security code for the radio.

epenet commented 3 years ago

@oncleben31 if you have spotted anything extra, can you add checks on https://github.com/hacf-fr/renault-api/blob/develop/tests/model/test_kamereon.py#L52 ?

TheSleepySlee commented 3 years ago

@epenet why do you say VIN has to start with VF1AAAAA555777 ? VF1 ok, but then depends on vehicule.

epenet commented 3 years ago

@TheSleepySlee this is simply to ensure private data is not added to the GIT repository by mistake.

TheSleepySlee commented 3 years ago

ok makes sense, I thought you were stating that VIN had 5 letters then 6 numbers after VF1, which is not always the case. I will try to add my data. There is no documentation. Should assume same working as with Pyze?

epenet commented 3 years ago

There is not yet a CLI (only an API) and I am working on the documentation. If in doubt, you can get the trace from PyZE and add it here...

epenet commented 3 years ago

@TheSleepySlee you can now use the renault-api CLI to generate traces.

$ pip install renault-api[cli]
$ renault-api --log status