This MagicMirror2 module is used in the CaravanPi project to display niveau data of a ADXL345 3-axis-accelleration sensor. CaravanPi is a project based on a Raspberry Pi for a smart caravan.
In the CaravanPi project Magic Mirror is used as a display module. The screen is usually not mounted behind a mirror, but can also be used as a TV in the caravan. For the Caravan Pi project there are further modules for Magic Mirror:
MMM-CaravanPiPosition - Module for displaying level information MMM-CaravanPiGasWeight - Module for indicating the filling of a gas bottle via a scale MMM-CaravanPiTemperature - Module for displaying temperature values e.g. in the refrigerator MMM-CaravanPiClimate - Module for displaying climate values
In your terminal, go to your MagicMirror's Module folder:
cd ~/MagicMirror/modules
Clone this repository:
git clone https://github.com/spitzlbergerj/MMM-CaravanPiPosition
install the node dependencies:
cd MMM-CaravanPiPosition/ && npm install
install a nesessary npm modul:
npm install async
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: 'MMM-CaravanPiPosition',
header: 'Lage Caravan',
position: 'top_left', // This can be any of the regions.
config: {
valueDir: "/home/pi/CaravanPi/values",
updateInterval: 100000, // milliseconds
diffUnit: " cm",
diffPrecision: 1,
showDate: true,
sensors: [
{
name: "Tabbert",
file: "position",
},
],
localeStr: 'de-DE',
}
},
]
The following properties can be configured:
Option | Description | ||||||
---|---|---|---|---|---|---|---|
valueDir |
Optional - The directory in which the values read by the sensors are stored.
If not set, the default is: /home/pi/CaravanPi/values |
||||||
updateInterval |
Optional - The update interval in milliseconds. If not set, the default is: 300000 (5 minutes) |
||||||
diffUnit |
Optional - Unit used to indicate the difference between the current position and the horizontal. Default is cm |
||||||
diffPrecision |
Optional - Decimal places for differences. Default is 1 |
||||||
showDate |
Optional - Decides whether the date/time at which the values were determined is displayed. Possible values: true or false Default is true |
||||||
localeStr |
Optional - String for country-specific formatting of numbers. Possible values: see Tags for Identifying Languages Default is 'de-DE' |
||||||
sensors |
Required - Add all your sensors that should appear in the MagicMirror. Each sensor must include the following properties:
|