Skip to content

spitzlbergerj/MMM-CaravanPiTemperature

Repository files navigation

MMM-CaravanPiTemperature - a MagicMirror2 Module

This MagicMirror2 module is used in the CaravanPi project to display data of a BME280 climate 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

Screendumps

modus: Boxlines

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/spitzlbergerj/MMM-CaravanPiTemperature

install the node dependencies:

cd MMM-CaravanPiTemperature/ && npm install

install a nesessary npm modul:

npm install async

Using the module

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

modules: [
{
	module: 'MMM-CaravanPiTemperature',
	header: 'Temperaturen Kühlschrank',
	position: 'top_left', // This can be any of the regions.
	config: {
        	valueDir: "/home/pi/CaravanPi/values",
        	updateInterval: 100000, // milliseconds
        	tempUnit: " °C",
        	tempPrecision: 2,
        	showDate: true,
        	sensors: [
            	{
                	name: "Gefrierfach",
                	file: "28-01144febdbaa",
            	},
            	{
                	name: "Getränkefach",
                	file: "28-01144febdbab",
            	},
        	],
        	localeStr: 'de-DE',
        	style: "lines",
    	}
},

]

Configuration options

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)
tempUnit Optional - Unit in which the temperature are indicated. Default is °C
tempPrecision Optional - Decimal places for temperature values. Default is 2
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'
style Optional - Decides in which style the values are displayed. Possible values: lines, boxes or boxlinesDefault is 'lines'
sensors Required - Add all your sensors that should appear in the MagicMirror. Each sensor must include the following properties:
Option Description
name Name that is to be displayed for this sensor.
file File name from which the values are to be read

About

Display values from temperature sensor DS18B20 through CaravanPi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published