Skip to content

This an extension for the MagicMirror. It provides a very simple Trello integration, by displaying cards in a list.

Notifications You must be signed in to change notification settings

Jopyth/MMM-Trello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Module: Trello

The Trello module displays all cards in a specific Trello list, in a style similar to the Newsfeed (showing one card at a time). Applications can be: displaying a TODO list, showing notes, or important information which needs to be shared between roommates.

Your card on trello.com Your card on the mirror

Installation

1. Execute the following commands from your MagicMirror/modules folder:

git clone https://github.com/Jopyth/MMM-Trello.git # clone this repository
cd MMM-Trello # navigate into the folder
npm install # install dependencies

2. Add the module to your config/config.js file (see below for details).

Using the module

To use this module you will need a trello API Key, an access token, and your list identifier.

Get your required API Key and Token here, or see 'Configuration Options' for more details. Also find your list id as described here below Finding a List ID.

Then, add it to the modules array in the config/config.js file:

    {
        module: 'MMM-Trello',
        position: 'bottom_center', // This can be any of the regions, best results in center regions.
        config: {
            // See 'Configuration options' for more information.
            api_key: "INSERT_YOUR_API_KEY",
            token: "INSERT_YOUR_TOKEN",
            list: "INSERT_YOUR_LIST_ID"
        }
    },

Configuration options

The following properties can be configured:

Option Description
api_key Your trello API key, get it here.

This value is REQUIRED
token Your trello token, get it via this link (replace API_KEY with your API key!): https://trello.com/1/authorize?expiration=never&scope=read&response_type=token&name=Server%20Token&key=API_KEY.

This value is REQUIRED
list The id of the list you want to display, check out the section Finding a List ID.

This value is REQUIRED
reloadInterval How often does the content need to be fetched (in ms)?

Possible values: any int or float
Default value: 5 * 60 * 1000 (every 10 minutes)
updateInterval How long should a card be displayed, before switching to the next one (in ms)?

Possible values: any int or float
Default value: 10 * 1000 (every 10 seconds)
animationSpeed Duration of the fade in and fade out effect in ms.

Possible values: any int or float
Default value: 2.5 * 1000 (2.5 seconds)
showTitle Whether to show the title of the card.

Possible values: true or false
Default value: true
showDescription Whether to show the description of the card.

Possible values: true or false
Default value: true
isCompleted If list symbolizes a set of completed tasks then
enabling this option will strike-out titles.

Possible values: true or false
Default value: false
showLineBreaks Display line breaks in the description? Needs more space if true.

Possible values: true or false
Default value: false
showDueDate Whether to show the due date of cards, if they have one.

Possible values: true or false
Default value: true
showChecklists Whether to show checklists of cards.

Possible values: true or false
Default value: true
showChecklistTitle Whether to show the title of each checklist before the actual check list.

Possible values: true or false
Default value: false
wholeList For Trello list containing only simple title only cards, it may be more appropriate to see the full list of cards rather than one at a time. Setting wholeList to true will show all cards in the list at the same time. This will be ugly for complex cards.

Possible values: true or false
Default value: false

Finding a List ID

Copied from the Trello API docs:

One of the trickier parts of using the Trello API for simple use cases is finding a List ID that belongs to a user. There are a few ways of doing this depending on your skillsets. One such way is to use the Chrome Dev Tools to watch network traffic from the official client.

To try to make this easy, we'll be dumping the JSON from a known Card. Open the official Trello web client and find a Card from a list that you want to use as your target.

It should have a short URL that looks like

https://trello.com/c/DcqBrqdx/1-target-card Take that URL and add .json to the end as follows:

https://trello.com/c/DcqBrqdx/1-target-card.json Within the raw JSON dump you get when pulling up this new URL, you will see a field called idList.

Make sure you get the id after idList (use the search function of your browser - usually accessible with CTRL + F). The first id in the .json is not the id of the list you are searching for, it is the id of the card.

FAQ:

I have a weird error, what should I do?

Please check below if this is a known error, if not, feel free to post in the Troubleshooting Section of the Forum.

Error Possible Solution
Error 404(Not Found): model not found This can happen when you accidentally take the wrong id. Go through Finding a list id here again. Make sure to look for the cryptic number after idList, and do not take the first id (that is the card id) in the .json.
Error 400(api_key is empty) Enter your api_key (see Configuration Options).
Error 400(Bad Request) invalid id Your list id is not correct. Maybe you forgot a symbol?
Error 401(Unauthorized) unauthorized board permission requested Something is wrong with your token (see Configuration Options).

The MIT License (MIT)

Copyright © 2016 Joseph Bethge

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The software is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

About

This an extension for the MagicMirror. It provides a very simple Trello integration, by displaying cards in a list.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published