Giter Site home page Giter Site logo

frekel / mmm-homey-betterlogic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pbaan93/mmm-homey-betterlogic

0.0 0.0 0.0 47 KB

MagicMirrorModule for fetching REST data and displaying them on the mirror

License: MIT License

JavaScript 99.57% CSS 0.43%

mmm-homey-betterlogic's Introduction

Module: MMM-Homey-BetterLogic

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.

Installation

  1. Navigate into your MagicMirror's 'modules' folder and execute 'git clone https://github.com/PBaan93/MMM-Homey-BetterLogic.git'
  2. cd 'cd MMM-Homey-BetterLogic'
  3. Execute 'npm install' to install the node dependencies.

Known Issues

  • had a problem with remote URLs an AJAX: changed to node_helper.js to collect data

Using the module

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

Configuration options

The following properties can be configured:

Option Description
sections sections is an array of hashes for the REST endpoints to connect to
Option Description
format sprintf() format
mapping Map the value againt a defined mapping
url The url to call. It has to return a single integer / floating point value
mappings mappings is an hash of hashes for the mapping of values to other values
Option Description
NAME_OF_MAPPING Name of mapping will be referenced by sections -> mapping
values hash of key / values to map from / to
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

mmm-homey-betterlogic's People

Contributors

tuxdiver avatar pbaan93 avatar mueller-ma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.