threesquared / MMM-Monzo-Pot

A MagicMirror² module to get the balance of your Pots from the Monzo API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MMM-Monzo-Pot

This a module for MagicMirror².

This module gets the balance of your Pots from the Monzo API and displays them in a table.

Screenshot 2019-07-31 at 21 12 11

Installation

cd modules
git clone https://github.com/threesquared/MMM-Monzo-Pot.git
cd MMM-Monzo-Pot
npm install

Authentication

You will need to be able to access your MagicMirror in your browser so make sure your settings allow this!

First you need to create a new OAuth Client on the Monzo developer portal. Copy the Client ID and Secret into your config. Also be sure to set it as a "confidential" app. Make sure the redirect url is set to your mirrors url plus \monzo-callback. For example:

http://192.168.0.170:8080/monzo-callback

Then you have to visit the authentication URL at the address of your mirror and follow the instructions to get your token:

http://192.168.0.170:8080/monzo-auth

Config

The entry in config.js can include the following options:

Option Description
clientId Required This is the Client ID assigned to your Client on the Monzo Developer portal

Type: string
clientSecret Required This is the Client Secret assigned to your Client on the Monzo Developer portal

Type: string
redirectURI Required This is the /monzo-callback url on your MagicMirror

Type: string
updateInterval How often the pot information is updated in ms.

Type: integer
Default value: 1 hour

Here is an example of an entry in config.js

{
    module: 'MMM-Monzo-Pot',
    header: 'Pots',
    position: 'bottom_left',
    config: {
        clientId: "$CLIENTID",
        clientSecret: "$CLIENTSECRET",
        redirectURI: "http://192.168.0.170:8080/monzo-callback",
    }
},

About

A MagicMirror² module to get the balance of your Pots from the Monzo API


Languages

Language:JavaScript 92.5%Language:HTML 7.5%