Skip to content

A module for the MagicMirror, to display data from ioBroker devices.

License

Notifications You must be signed in to change notification settings

ioBroker/MMM-ioBroker

 
 

Repository files navigation

Module: MMM-ioBroker

This MagicMirror module, shows values like temperature/humidity of ioBroker devices.

Magic-Mirror Module MMM-ioBroker screenshot Magic-Mirror Module MMM-ioBroker screenshot

Dependencies

Installation

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.

Update the module

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.

Using the module

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: '' }
                          ]
          }
        ]
    }
  }
]

Configuration options

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 IP
Default 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.

{ name: 'yourNameHere1',
  deviceStates: [
     { id: 'mqtt.0.device1.temperature',  icon: 'wi wi-thermometer', suffix: '°' },
     { id: 'mqtt.0.device1.mqtthumidity', icon: 'wi wi-humidity',    suffix: '%'     },
  ],
},
name: Just a text, that will be shown as title.
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)

About

A module for the MagicMirror, to display data from ioBroker devices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.3%
  • CSS 15.0%
  • HTML 8.7%