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 ;-)
- Amcharts, many thanks to Martynas Majeris
- MagicMirror²
-
clone this repo into the modules directory and install the dependencies:
cd ~/MagicMirror/modules git clone https://github.com/basti0001/MMM-iHaveBeenThere cd MMM-iHaveBeenThere npm install
-
create a config (see below).
-
add your gps coordinates.
-
done!
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.4 for central europe.
|
zoomLongitude |
Set map region parameter. Values: 0.0 or any
Default value: -2.0 for central europe.
|
animationDuration |
Set map region parameter. Values: 0.0 or any
Default value: 46.0 for central europe.
|
home_lat, home_lon |
Latitude/longitude of the your home. Values: float
Default value: e.g. lat 48.1548256 for 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"
|
To use this module, add it to the modules array in the config/config.js
file:
{
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 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 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.
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.