Skip to content

This an extension module for the MagicMirror². It adds the ability to manage different kind of memos.

License

Notifications You must be signed in to change notification settings

schnibel/MMM-Memo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MMM-Memo

This an extension for the MagicMirror².
This Module is used to add one to many memo notes on your Magic Mirror.
Content is manageable through HTTP get requests.

What does it look like

alt tag

Dependencies

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/schnibel/MMM-Memo.git

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
    {
        module: 'MMM-Memo',
        position: 'top_left',
        classes: 'default everyone',        // if using MMM-ProfileSwitcher module
        config: {
            // See 'Configuration options' for more information.
            ...
        }
    }
]

If you declare several modules in the config/config.js file, you will get several memo notes on your MagicMirror2 profile.

Configuration options

The following properties can be configured:

Option Description
memoTitle [MANDATORY]
Title of the memo note.
This title is also used to retreive memos from the persistence file.

This is NOT case sensitive
memoMaxItems [OPTIONAL]
Integer used to define the maximum number of memo to display per note.
If the number of memos is greater than the one specified here, a message (e.g. + 2 more memos) will be displayed at the bottom of the note.

Default value: 5
memoMaxMsgSize [OPTIONAL]
Integer used to define the maximum number of characters to be displayed per memo.

Default value: false (It will show all characters)
memoDisplayDuration [OPTIONAL]
Used to show since when memos have been created.

Possible values: true or false
Default value: false
memoDisplayIfEmpty [OPTIONAL]
Used to display (or not) an empty note if there is no memo inside.

Possible values: true or false
Default value: false
memoDisplayId [OPTIONAL]
Used to display (or not) a number before each memo. This number is necessary to remove a memo.

Note that this unicode character is limited to 20

Possible values: true or false
Default value: true
memoDisplayHeader [OPTIONAL]
Used to display (or not) the memoTitle at the top of the note.

Possible values: true or false
Default value: true
memoDisplayNotification [OPTIONAL]
Used to display (or not) the notification using the default alert module.
See How to use section for more information on this property.

Possible values: true or false
Default value: false
memoColorBackground [OPTIONAL]
Used to define the color of the note.

Possible values: See Colors for more information.
Default value: Yellow
memoColorHeader [OPTIONAL]
Used to define the color of the header (if displayed).

Possible values: See Colors for more information.
Default value: Black
memoColorFont [OPTIONAL]
Used to define the color of the memo font.

Possible values: See Colors for more information.
Default value: Black
memoColorWarning [OPTIONAL]
Used to define the color of a WARNING note.

Possible values: See Colors for more information.
Default value: Red
memoRotation [OPTIONAL]
Used to rotate the note.

Possible values: -10 or -8 or -6 or -4 or -2 or 0 or 2 or 4 or 6 or 8 or 10
Default value: 0
memoWidth [OPTIONAL]
Value to specify the width of the note.

Default value: 100px
memoHeight [OPTIONAL]
Value to specify the height of the note.

Default value: 100px
memoPadding [OPTIONAL]
Value to specify the padding of the note.

Default value: 20px
format [OPTIONAL]
Displays relative date format, for absolute date format provide a string like 'DD:MM HH:mm' All Options

How to Use

I'm using this module with my Jarvis installation from DomotiqueFacile.
When I speak to Jarvis, I say for example : "add FRUITS to the SHOPPING memo list", and Jarvis automatically sends a HTTP get request to the MMM-Memo module.

The available HTTP get requests are the following at the moment:

To add 'Fruits' to the 'Shopping' memo note:

http://MIRROR_IP:MIRROR_PORT/AddMemo?memoTitle=SHOPPING&item=Fruits&level=INFO

NOTE : The level property is optional in the request. If not specified, the INFO level will be set.

To add 'Daddy: +33123456789' to the 'Phone Numbers' memo note with a WARNING level:

http://MIRROR_IP:MIRROR_PORT/AddMemo?memoTitle=phone%20numbers&item=Daddy%3A%20%2B33123456789&level=WARNING

NOTE : The level property is optional in the request. If not specified, the INFO level will be set.
NOTE : Here is an example of a curl command with urlencode syntax

curl -G -v "http://MIRROR_IP:MIRROR_PORT/AddMemo?memoTitle=SHOPPING" --data-urlencode "item=Bonjour, êtes-vous allées dans votre boutique préférée ?"

To remove the second displayed memo of the 'Phone Numbers' memo note:

http://MIRROR_IP:MIRROR_PORT/RemoveMemo?memoTitle=phone%20numbers&item=2

To remove ALL memos of the 'Phone Numbers' memo note:

http://MIRROR_IP:MIRROR_PORT/RemoveMemo?memoTitle=phone%20numbers&item=ALL

To temporary display the second memo of the 'Shopping' memo note:

http://MIRROR_IP:MIRROR_PORT/DisplayMemo?memoTitle=SHOPPING&item=2

Memo note is displayed using the default alert module, so it is necessary to configure this alert module in your config/config.js file if you want to see notifications.

NOTE : I saw a problem when more than one unique MMM-Memo module is defined in the config/config.js file.
Indeed, the same notification is displayed several times (e.g. 3 times if you defined 3 MMM-Memo modules). I did not deeply investigate to understand the root cause.
A workaround is to use the memoDisplayNotification property by setting it to true for ONLY ONE MMM-MEMO MODULE
Do not forget to have ONE memoDisplayNotification set to true if you want to see notifications.

To temporary display ALL memos of the 'Shopping' memo note:

http://MIRROR_IP:MIRROR_PORT/DisplayMemo?memoTitle=SHOPPING&item=ALL

Memo note is displayed using the default alert module, so it is necessary to configure this alert module in your config/config.js file if you want to see notifications.

NOTE : I saw a problem when more than one unique MMM-Memo module is defined in the config/config.js file.
Indeed, the same notification is displayed several times (e.g. 3 times if you defined 3 MMM-Memo modules). I did not deeply investigate to understand the root cause.
A workaround is to use the memoDisplayNotification property by setting it to true for ONLY ONE MMM-MEMO MODULE
Do not forget to have ONE memoDisplayNotification set to true if you want to see notifications.

Colors

Here are the available colors.

Whites / Pastels

alt tag

Grays

alt tag

Blues

alt tag

Greens

alt tag

Yellows

alt tag

Browns

alt tag

Oranges

alt tag

Pinks / Violets

alt tag

Special Thanks

About

This an extension module for the MagicMirror². It adds the ability to manage different kind of memos.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published