{"id":18003822,"url":"https://github.com/spnda/volvo_vida_db","last_synced_at":"2025-08-17T11:32:06.300Z","repository":{"id":204556702,"uuid":"711649803","full_name":"spnda/volvo_vida_db","owner":"spnda","description":"Scripts and SQL statements for retrieving and working with data from the Volvo VIDA database","archived":false,"fork":false,"pushed_at":"2023-12-28T03:32:54.000Z","size":57,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T01:43:42.096Z","etag":null,"topics":["can-bus","car-hacking","python","sql","volvo","volvo-vida-protocol"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spnda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-29T22:25:32.000Z","updated_at":"2024-10-26T14:38:36.000Z","dependencies_parsed_at":"2024-10-30T00:32:47.185Z","dependency_job_id":null,"html_url":"https://github.com/spnda/volvo_vida_db","commit_stats":null,"previous_names":["spnda/volvo_vida_db"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fvolvo_vida_db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fvolvo_vida_db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fvolvo_vida_db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spnda%2Fvolvo_vida_db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spnda","download_url":"https://codeload.github.com/spnda/volvo_vida_db/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230121683,"owners_count":18176477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["can-bus","car-hacking","python","sql","volvo","volvo-vida-protocol"],"created_at":"2024-10-30T00:12:14.886Z","updated_at":"2024-12-17T13:07:19.947Z","avatar_url":"https://github.com/spnda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# volvo_vida_db\n\nThis repository contains scripts to extract and work with data from the internal Volvo VIDA 2014D database.\n\nSome SQL statements are based on procedures found in the VIDA SQL Server database and from scripts in [Tigo2000's repository](https://github.com/Tigo2000/Volvo-VIDA/).\n\nThe Python scripts use duckdb and pandas to work with the data.\n\n### Extracting data from the database\n\nDepending on wether PowerShell 7 and the SQLServer module are installed, you can either use `generate_csv.ps1` or `generate_csv.bat`.\nThe PowerShell scripts can take longer than the Batch script does to generate, but is capable of outputting completely correct files.\nThe PowerShell script uses the `UseQuotes` option on `Export-Csv` which was introduced in PowerShell 7. On Windows 7 Professional the last working version of PowerShell 7 is 7.2.9.\nThe SQL credentials are already written into the scripts and won't need to be changed.\n\n### Getting vehicle profiles\n\nUsing `scripts/vin_decoder.py` you can get a list of VIDA vehicle profiles, as well as basic information about\nthe car such as model, year, engine, ...\nThe vehicle profiles are linked to various information in the database, such as a list of ECUs present in the vehicle.\nA single vehicle is made up of multiple profiles for every combination of model, model year, engine, transmission, ...\nThe profile that represents a generic V50 for example will only link to data that is present in *every* V50.\nOther profiles will then be more specific about things such as the engine, which will then link to the ECUs which are only present for that engine.\nThese profiles will become very important for the rest of the scripts.\n\n### Getting CAN parameters\n\nUsing `scripts/write_ecu_data.py` you can get a CSV file for each ECU for the given vehicle VIN.\nThis will write a configs.csv file which contains information about how to interact with each ECU and through which physical bus.\nIt will also write a CSV for each ECU containing information how to ask for specific data and how to interpret the bits.\n\n### Processing data conversion functions\n\nThe conversion methods found in the outputted CSV file can be applied with the `scripts/evaluate_conversion.py` script.\nIt parses the expression into a simple executable AST that supports the feature set required for the expressions from the VIDA database.\n\n### Extracting scripts\n\nThe VIDA database contains XML-based scripts that can read and write data from and to the car.\nThese use the CAN protocol and are used to perform certain actions, but can also be used to figure out how the protocol works.\nReading these scripts can allow us to figure out how the CAN-based protocol works and how we can make use of it. \n\nThe `sql/extract_scripts.ps1` can be used to extract all script metadata into CSV files and the actual scripts into decompressed XML files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspnda%2Fvolvo_vida_db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspnda%2Fvolvo_vida_db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspnda%2Fvolvo_vida_db/lists"}