This MagicMirror module, shows values like temperature/humidity of ioBroker devices.
- An installation of MagicMirror2
- In ioBroker the installation of adapter simpleAPI
Navigate into your MagicMirror's modules
folder:
cd ~/MagicMirror/modules
Clone this repository:
git clone https://github.com/ioBroker/MMM-ioBroker
Configure the module in your config.js
file.
Navigate into the MMM-ioBroker
folder with cd ~/MagicMirror/modules/MMM-ioBroker
and get the latest code from Github with git pull
.
If you haven't changed the modules, this should work without any problems. Type git status
to see your changes, if there are any, you can reset them with git reset --hard
. After that, git pull should be possible.
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: 'MMM-ioBroker',
position: 'bottom_bar',
config: {
host: 'localhost',
port: '8082',
https: false,
template: 'MMM-ioBroker.njk',
devices: [
{ name: 'writeHereTheName1',
deviceStates: [
{ id: 'mqtt.0.sensorX.temperature', icon: 'wi wi-thermometer', suffix: '°' },
{ id: 'mqtt.0.sensorX.humidity', icon: 'wi wi-humidity', suffix: '%' }
]
},
{ name: 'writeHereTheName2',
deviceStates: [
{ id: 'mqtt.0.sensorY.temperature', icon: 'wi wi-thermometer', suffix: '°' },
{ id: 'mqtt.0.sensorY.battery', icon: 'fa fa-battery-half', suffix: '' }
]
}
]
}
}
]
The following properties can be configured:
Option | Description |
---|---|
host |
Hostname/IP of the ioBroker Server.
Is only necessary, if ioBroker and Magic-Mirror is not on the same machine (Raspberry Pi). Possible values: localhost or a IPDefault value: localhost
|
port |
ioBroker web Port Possible values: any number Default value: 8082
|
https |
If your ioBroker use https Possible values: true or false Default value: false
|
template |
Name of the used nunjucks template file Possible values: any template file in the MMM-ioBoker directory Default value: 'MMM-ioBroker.njk' Using a user Nunjuck template file you may change the output. E.g. change the color of an Item or skip it, if usefull. see [Homepage of Nunjucks](https://mozilla.github.io/nunjucks/) |
devices |
Array of objects. Object for the different ioBroker devices.
deviceStates: array of states for the device readings you want to display. id: ID of the state (Required). Go to the ioBroker admin, find the state ID. icon: CSS class of an icon (Font-Awesome and Weather Icons are pre installed) suffix: any string/text |
initialLoadDelay |
The initial delay before loading. (Milliseconds) Default value: 1000 (1 second)
|
updateInterval |
Content update interval in Milliseconds. Possible values: 1000 (1 second) to 86400000 (24 hours)Default value: 60000 (1 minute)
|