An open API service indexing awesome lists of open source software.

https://github.com/basti0001/MMM-iHaveBeenThere

A module to visulize where one has been traveled for
https://github.com/basti0001/MMM-iHaveBeenThere

Last synced: 11 months ago
JSON representation

A module to visulize where one has been traveled for

Awesome Lists containing this project

README

          

# MMM-iHaveBeenThere

**MMM-iHaveBeenThere** is a module for MagicMirror² to visualize where one has been traveled.

It can draw a worldmap or a world section with points of interest (POI). The POI's are linked with a line and an animated plane can fly from the your home origin to you poi where you have been.

This can be used to show your traveled places in the world. Pretty fancy ;-)

![screenshot](picture/example.png)

## Dependencies

- [Amcharts](https://www.amcharts.com/demos/), many thanks to Martynas Majeris
- [MagicMirror²](https://github.com/MagicMirrorOrg/MagicMirror)

## Installation

1. clone this repo into the modules directory and install the dependencies:

```bash
cd ~/MagicMirror/modules
git clone https://github.com/basti0001/MMM-iHaveBeenThere
cd MMM-iHaveBeenThere
npm install
```

2. create a config (see below).
3. add your gps coordinates.
4. done!

## Configuration options



Option
Description




title
The title of the world chart.


Values: string, see MMM-iHaveBeenThere configuration below.

Default value: An example world.



AnimationEnabled
enable/disable the plane animation.


Values: true or false

Default value: true



pauseDuration
Time in s how long the plane stays at a point if animation is enabled.


Values: 0.0 or any

Default value: 3.0



animationDuration
Time in s how long the plane flies from point to point if animation is enabled.


Values: 0.0 or any

Default value: 10.0



zoomLevel
Set map region parameter.


Values: 0.0 or any

Default value: 5.4for central europe.



zoomLongitude
Set map region parameter.


Values: 0.0 or any

Default value: -2.0for central europe.



animationDuration
Set map region parameter.


Values: 0.0 or any

Default value: 46.0for central europe.



home_lat, home_lon
Latitude/longitude of the your home.


Values: float

Default value: e.g. lat 48.1548256for munich.



home_desc
Your Homename.


Values: string

Default value: "München"For munich.



away_lat, away_lon
Latitude/longitude of destinations you have visited.


Values: array[float]



away_desc
City/Country names of destinations you have visited.


Values: array[string]



displayDesc
Display the descriptions of the destinations you have visited


Values: true or false

Default value: true


trip
Controls if every single entry is counted as a new jurney or a round trip.


Values: array[bool]



colorCountries, colorCountryBorders, colorTargetPoints, colorPlaneLine, colorLegendBorder, colorLegendFont, colorTitleFont
Colors for country fill, country border, target points, plane, legend, legend font, title.


Value: string

Default value: e.g."#BDBDBD"


## Using the module

To use this module, add it to the modules array in the `config/config.js` file:

```javascript
{
module: "MMM-iHaveBeenThere",
position: "middle_center",
config: {
title: "Dork the Explorer",
home_desc: "Edinburgh",
AnimationEnabled: true,
zoomLevel: 1.1,
zoomLongitude: 15,
home_lat: 55.9411289,
home_lon: -3.3454172,
displayDesc: true,
away_desc: [
"Thailand",
"France",
"United States"
],
away_lat: [
13.5485582,
48.8587741,
47.6129432,
],
away_lon: [
100.6111107,
2.2069809,
-122.4821436,
],
trip: [false,true,false],
}
},
```

Depending on the used [Raspberry Pi](https://de.wikipedia.org/wiki/Raspberry_Pi) hardware I recommend to disable the plane animation (though it looks nice).

The models A, B, B+ run only contain a single CPU core. I tried the B+ with 1Ghz (overclocking). The CPU load was at 100% and the animation laged.

Also I used [MMM-FRITZ-Box-Callmonitor](https://github.com/paviro/MMM-FRITZ-Box-Callmonitor) and was missing incoming calls with this setup. For this mentioned Pi's I recommend to disable the animation or set.



Option
Description




AnimationEnabled
value: true



pauseDuration
value: 10.0


animationDuration
value: 3.0

This should give the Pi a little space between the animations. Not a pretty good solution, but during the animation you might have problems.

With a Pi 3 I had a load of 40% when the animation is running. Dualcore pays off. Also the animation is smooth.

Testing the animation with a Pi 4 resulted in smooth animation. The CPU load was approximately 43%, so be aware that this may conflict with other modules that have high CPU demands.

## To Do

Upgrade from amCharts 3 to amCharts 5: The new version is supposed to be a lot more CPU-efficient, so this could possibly solve the performance problems. You are welcome to create a PR.