Giter Club home page Giter Club logo

mmm-myvolvo's Introduction

MMM-MyVolvo license

MMM-MyVolvo is a MagicMirror module. The module retrieves informations from your Volvo through the Volvo Cars API.

Notice

This module is based on the initial module from eouia (archived).

  • This module uses unofficial and not-well-supported methods to retrieve sensitive information of the car.
  • There is no legal right or duty for data and module's working. All responsibility for using is on yours.
  • For safety, there are no remote-controllable features on this module. (like heater on, engine start, door unlock)
  • Since the community of Volvo owners with a MagicMirror are small, I wasn't able to test that in detail. There could be the possibility of bugs.
  • I'm a developer beginner and just started to learn programming. I might not able to help you with issues. There is always a great community available who is able to help.

Dependencies

  • The module visualize the information that it receives from the python script, developed by molobrakos.

Requirements

  • Volvo Car owner with an active Volvo ID and the Volvo Cars App.
  • Works for all connected cars up to model year 2021, excluding the XC40 Recharge.
  • For the moment I only validated cars registered in Germany, Netherlands and Sweden. A license plate from these countries is required. (Possibly more countries but couldn't test it.)
  • Python 3.8 or higher.

Installation

The installation is divided in two parts: Installation volvooncall and MMM-MyVolvo

Part 1: Installing volvooncall python programm.

Check and install Python3.6. To find out which version of Python you have, open a terminal window and typ the following commands:

# Check the system Python version
$ python --version
# Check the Python 3 version
$ python3 --version

# If you have Python on your machine, then the command should respond with a version number.
# For example, if you already had Python 3.6.10 on your computer, then the python3 --version command would display that version number:
Python 3.6.10

#If you haven't Python3.6 or higher, you need to install the requried version. Follow the recommended steps from realpython.com/installing-python

Install volvooncall

cd ~
git clone https://github.com/molobrakos/volvooncall.git
cd volvooncall
# Install the programm
python3 setup.py install

Authorization

# Create a new file .voc.conf
touch .voc.conf

# Edit file with nano
nano .voc.conf

# Add your credentials
username: <username> #Your VOC ID (email address)
password: <password> #Your Volvo Passwort

# Save & Exit:
# CTRL+X than respond by entering either “Y” or “N”. Since we are trying to save our changes, press “Y” and hit enter.

Testing

# Pull information from the VOC API
voc list

# You should get following example response: Licence Plate, Type/Year, VIN
HH-GS 1869 (V90/2019) YV1PWXXXXXXX95578

Part 2: Installation MMM-MyVolvo module.

# Access the Module folder from you MagicMirror
cd ~/MagicMirror/modules
# Clone Repository and install
git clone https://github.com/mazim-co/MMM-MyVolvo
cd MMM-MyVolvo
npm install

Sample Config

{
  module: "MMM-MyVolvo",
  header: "MyVolvo V90 T4",
  position: "top_right",
	config: {
		display: {
			info: false,
			graphic: "v90.png",
			status: true,
			notice: true,
			trip: true,
			}				
		},
},

Configuration

Following properties can be configured:

Option Description
header The header text to display

Type: string
Default value: "My Volvo"
scanInterval The interval fetching informations from that API.

Type: string
Default value: 10 * 60 * 1000 // 10 Minutes
units The metrics shown km/h, mp/h.

Type: string
Possible values: metrics, us, imperial, kr
Default value: metrics
info Display the details of your car: car license plate, model and construction year.

Type: boolean
Possible values: true or false
Default value: false
graphic Display a graphic of your Volvo. (see below Volvo Graphic Gallery).

Type: string
Default value: "v90.png"
status Display the general information from your car: Fuel amount, Avg. Speed, Fuel Level ect.


Type: boolean
Possible values: true or false
Default value: true
notice Display details from vehicle status: Doors looked, Engine on/off, Tyre ok, Windows open/closed.


Type: boolean
Possible values: true or false
Default value: true
trip Display the last trip. Departure and Destination as well as the trip details.


Type: boolean
Possible values: true or false
Default value: true

Volvo Graphic Gallery

Option 1: You can select your Volvo from the graphics folder.

  • As in the sample config above, write the name of the .png file next to graphic: "file.png"

NOTE: Please access the folder to get the right name of the file from your graphic. For example in the overview it shows XC90 Recharge but the file is xc90-hybrid.png

Option 2: Upload your own graphic and save it in the graphic folder. You can reference that as described in Option 1.

Option 3: Hide the graphic by just leaving graphic: "" blank.

mmm-myvolvo's People

Contributors

mazim-co avatar

Stargazers

Elizabeth Davis avatar

Watchers

 avatar Jerry avatar

mmm-myvolvo's Issues

How do I install?

How do I instalI this module?

I understand this python program have to be installed first, but there I get stucked. I get this message when I do the test:

******@raspberrypi:~ $ voc list
Unknown source file: list
******@raspberrypi:~ $

I’m 100% sure I wrote the right username and password. What could be wrong? I’m fairly new to Raspberry Pi and Magic Mirror, but I do can install other modules. I have done the update to python 10.4.

Ok, so I did this
cd ~/MagicMirror/modules
git clone https://github.com/molobrakos/volvooncall.git
cd volvooncall
python setup.py install (HERE, I could to this, got a message about I could do this. So I did change this one to Sudo python setup.py install, then everyting went fine… or maybe not? I don’t know.

Then I did this
touch .voc.conf
nano .voc.conf
Wrote my username and password in the file:
username: <------@outlook.*om>
password: <------->

After that I’d press the CTRL+X , save, and enter.
Then I wrote voc test and I got the line Unknown source file: list

Ok, shit happens I did try to install the MMM-MyVolvo anyway.

cd ~/MagicMirror/modules
git clone https://github.com/mazim-co/MMM-MyVolvo
cd MMM-MyVolvo
npm install

I did the config then restart MM and module wont show up. After this I did test pip install volvooncall also but that was alot of guessing so probably did’nt get that right either. What am I doing wrong?
image
image

Unexpected non-whitespace character after JSON at position 3

Hi!

I get an error running this in MM.
I'm not very good at JS so I need to file it here to get some help. <- Might be me doing something wrong too.

I get no trip information in my MM.
This is my config part, which I believe to be correct:

{
module: "MMM-MyVolvo",
header: "MyVolvo XC60 D4 AWD",
position: "bottom_left",
config: {
display: {
info: true,
graphic: "xc60.png",
status: true,
trip: true,
notice: true
}
}
},

Still this is showing in my MM log:
0|MagicMir | [04.10.2023 12:02.11.202] [ERROR] Whoops! There was an uncaught exception...
0|MagicMir | [04.10.2023 12:02.11.202] [ERROR] SyntaxError: Unexpected non-whitespace character after JSON at position 3
0|MagicMir | at JSON.parse ()
0|MagicMir | at ChildProcess. (/home/XXX/MagicMirror/modules/MMM-MyVolvo/node_helper.js:140:39)
0|MagicMir | at ChildProcess.emit (node:events:514:28)
0|MagicMir | at maybeClose (node:internal/child_process:1105:16)
0|MagicMir | at ChildProcess._handle.onexit (node:internal/child_process:305:5)
0|MagicMir | [04.10.2023 12:02.11.202] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
0|MagicMir | [04.10.2023 12:02.11.203] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues

How can I get rid of this error?

Regards,

/Jonas...

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.