The MMM-Homey-BetterLogic
module is a MagicMirror addon.
This module collects data from the Better Logic app from a Homey and displays it on your mirror in a table.
This project is a fork form MMM-REST so credits to him.
- Navigate into your MagicMirror's 'modules' folder and execute 'git clone https://github.com/PBaan93/MMM-Homey-BetterLogic.git'
- cd 'cd MMM-Homey-BetterLogic'
- Execute 'npm install' to install the node dependencies.
- had a problem with remote URLs an AJAX: changed to node_helper.js to collect data
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: 'MMM-Homey-BetterLogic',
position: 'bottom_right', // This can be any of the regions.
// Best results in one of the side regions like: top_left
header: 'Woonklimaat',
config: {
debug: false,
homeyIp: '192.168.1.2',
homeyBearerToken : '1234567890abcdef1234567890abcdef',
sections: [
{
format: '%.1f<span class="wi wi-celsius"></span>',
betherLogicVariable: 'NestTemperatuur'
},
{
format: '%.1f<span class="wi wi-humidity"></span>',
betherLogicVariable: 'NestLuchtvochtigheid'
}
],
output: [
['Woonkamer','@1', '@2']
]
}
}
]
The following properties can be configured:
Option | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
sections |
sections is an array of hashes for the REST endpoints to connect to
|
||||||||
mappings |
mappings is an hash of hashes for the mapping of values to other values
|
||||||||
output |
control the output table for the display.
Has to be a 2-dimensional array representing the rows and the columns of the output A cell containing a '@' followed by a number represents the section id (starting by 1) of the REST Urls |
||||||||
updateInterval |
How often this refreshes Example: 60000
Default value: 60000
|
||||||||
initialLoadDelay |
How long to wait for the first load Example: 60000
Default value: 0
|
||||||||
animationSpeed |
Fadeover effect for dom updates Example: 1000
Default value: 2000
|
||||||||
debug |
Log messages to Log.info / console Example: true
Default value: false
|