Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/theriverman/volvooncall/cli

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/theriverman/volvooncall/cli

  • v0.0.0-20220925201427-3a44809a4bbd
  • Source
  • Go
  • Socket score

Version published
Created
Source

VolvoOnCall CLI

A CLI application] written in Go to interact with the Volvo Cars (Volvo On Call) services.

This project was inspired by molobrakos/volvooncall, and it aims to maintain a certain level of compatibility with it both API and configuration wise.

Installation

Go to Releases and download the latest version.

Alternatively, you can install it from source by executing the following command:

go install github.com/theriverman/VolvoOnCall/cli

Configuration File

Interaction can be simplified by adding your credentials and optionally your default car's VIN to a configuration file at $HOME/.voc.conf:

username: my-volvo-username
password: my-secret-passowrd
defaultCarVin: YV1ABCD00E1234567
# region: your-custom-region
# url: your-custom-api-url

Additionally, the used region and url can be modified too. Possible regions are the following:

  • "" (e.g. nothing which is the default value)
  • na
  • cn

Commands

This section describes the commands available in VolvoOnCall CLI. Each subsection explains a top-level command. See also the results of voc --help or just execute voc without any commands.

cars

Lists all cars associated with your account. No additional options.

lock

Locks the car identified by its VIN.

  • --vin

Example:

voc lock --vin YV12ABC3456789

unlock

Unlocks the car identified by its VIN.

  • --vin

Example:

voc unlock --vin YV12ABC3456789

heater

Start or stop the heater in the car identified by its VIN.

  • --vin
  • start
  • stop

Example:

voc heater --vin YV12ABC3456789 start
voc heater --vin YV12ABC3456789 stop

engine

Start or stop the engine in the car identified by its VIN.

  • --vin
  • start
  • stop

Example:

voc engine --vin YV12ABC3456789 start
voc engine --vin YV12ABC3456789 stop

Flash the turn signals on the car identified by its VIN.

  • --vin

Example:

voc blink --vin YV12ABC3456789

honk

Honk the horn on the car identified by its VIN.

  • --vin

Example:

voc honk --vin YV12ABC3456789

status

Get a brief overview about a select car.

There are three options to select from:

  • get specific attributes using their original JSON value
  • get the full original JSON printed to the console
  • get a curated overview of the most important parameters (default)

Examples:

# Returns the most common status parameters only
voc status -vin YV12ABC3456789

# Returns the original JSON
voc status -vin YV12ABC3456789 --json

# Returns only select attributes
voc status -vin YV12ABC3456789 --attributes windows.frontLeftWindowOpen,averageFuelConsumption,averageSpeed

For more advanced query options, see the Path Syntax at https://github.com/tidwall/gjson.

trips

Examples:

voc trips -vin YV12ABC3456789
voc trips -vin YV12ABC3456789 --json

register

Save your VolvoOnCall username and password in $HOME/.voc.conf

Example:

voc register --username "my-volvo-username" --password "my-volvo-password"

Building the Project

The recommended approach to building the project is using Make.

Typical build targets defined in Makefile are the following:

  • build: builds the project for your system's OS/Architecture. the output file is ./dist/$(BINARY_NAME)$(BINARY_SUFFIX)
  • build-darwin: builds the project for Darwin/MacOS targeting amd64 and arm64
  • build-linux: builds the project for Linux targeting 386/amd64/arm/arm64
  • build-windows: builds the project for Windows targeting 386/amd64
  • build-all: builds the project for all above declared targets
  • create-tar: creates a tar.gz archive with the contents os ./dist
  • clean: removes all built binaries and build artefacts

Contribution

Fork the repository, do your changes, then open a pull request. Thank you!

Acknowledgements

FAQs

Package last updated on 25 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc