{"id":13830253,"url":"https://github.com/jc21/MMM-IFTTT","last_synced_at":"2025-07-09T11:32:28.063Z","repository":{"id":74012925,"uuid":"68566364","full_name":"jc21/MMM-IFTTT","owner":"jc21","description":"MagicMirror Module for IFTTT Maker Web Based Notifications","archived":true,"fork":false,"pushed_at":"2020-02-24T01:05:49.000Z","size":48,"stargazers_count":19,"open_issues_count":3,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-04T10:02:45.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://magicmirror.builders/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jc21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-19T03:35:04.000Z","updated_at":"2024-08-04T02:26:15.000Z","dependencies_parsed_at":"2024-01-15T17:39:01.336Z","dependency_job_id":"30c65ec6-e9ca-4ad6-a488-5f8aab6d1b75","html_url":"https://github.com/jc21/MMM-IFTTT","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jc21%2FMMM-IFTTT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jc21%2FMMM-IFTTT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jc21%2FMMM-IFTTT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jc21%2FMMM-IFTTT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jc21","download_url":"https://codeload.github.com/jc21/MMM-IFTTT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225539362,"owners_count":17485313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T10:00:57.859Z","updated_at":"2024-11-20T11:30:32.974Z","avatar_url":"https://github.com/jc21.png","language":"JavaScript","funding_links":[],"categories":["Home Automation \u0026 Notifications"],"sub_categories":[],"readme":"# MMM-IFTTT\n[MagicMirror](https://magicmirror.builders/) Module for [IFTTT Maker](https://ifttt.com/maker) Web Based Notifications\n\n![Screenshot](screenshot.png)\n\nThis module is intended to display immediate notifications of events from If-This-Then-That channels.\nNotifications will show for a default of 60 seconds before disappearing. There is no on-screen history\nof events.\n\n\n## Module installation\n\nClone the module and npm install:\n\n```bash\ncd ~/MagicMirror/modules\ngit clone https://github.com/jc21/MMM-IFTTT.git\ncd MMM-IFTTT\nnpm install\n```\n\nAdd the module config to `~/MagicMirror/config/config.js`\n\n```javascript\nmodules: [\n    {\n        module: 'MMM-IFTTT',\n        position: 'lower_third',\n        config: {\n\n        }\n    }\n]\n```\n\n\n## Module Configuration Options\n\n\u003ctable width=\"100%\"\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eOption\u003c/th\u003e\n            \u003cth\u003eType\u003c/th\u003e\n            \u003cth\u003eDefault\u003c/th\u003e\n            \u003cth width=\"100%\"\u003eDescription\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003cthead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003ccode\u003edisplaySeconds\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eInteger\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e60\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eNumber of seconds to show a notification for\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003ccode\u003efadeSpeed\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eInteger\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003e3000\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eMilliseconds fade transition speed\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003ccode\u003esize\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eString\u003c/td\u003e\n            \u003ctd\u003e\u003ccode\u003elarge\u003c/code\u003e\u003c/td\u003e\n            \u003ctd\u003eText size, options are: small, medium, large, xlarge\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n\n## Setting up a IFTTT Maker Notification\n\n### Making your mirror internet accessible\n\nFor this module to work, you will need to get dirty with your router, specifically with Port Forwarding.\n\nI'm not going to go into detail here, there are plenty of [Google results](https://www.google.com.au/?gws_rd=ssl#q=router+port+forwarding)\n on the topic.\n\nYou will need to forward any port you nominate, to the local IP of your Magic Mirror on port 8080.\n\nYou will also need to set up a dynamic DNS hostname for your home network, I'm a [Duckdns](https://www.duckdns.org/)\n fan personally. Atlernatively you could look into a http forward solution like [ngrok](https://ngrok.com/). \n\n\n### IFTTT Maker Recipes\n\nLog in to [IFTTT](https://ifttt.com/) and create a new recipe. You can essentially choose any channel\n you want for the Trigger but for the Action channel you must select Maker.\n\nThere is only one Action, \"Make a web request\".\n\nAction fields explained:\n\n\u003ctable width=\"100%\"\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eField\u003c/th\u003e\n            \u003cth\u003eDescription\u003c/th\u003e\n            \u003cth\u003eExample\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003cthead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eURL\u003c/td\u003e\n            \u003ctd\u003eNotification endpoint\u003c/td\u003e\n            \u003ctd\u003ehttp://yourhouse.duckdns.org:8080/IFTTT\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eMethod\u003c/td\u003e\n            \u003ctd\u003eHTTP Method, MUST be POST\u003c/td\u003e\n            \u003ctd\u003ePOST\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eContent Type\u003c/td\u003e\n            \u003ctd\u003eHow the data is sent\u003c/td\u003e\n            \u003ctd\u003eapplication/json\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eBody\u003c/td\u003e\n            \u003ctd\u003eThe notification content, explained below\u003c/td\u003e\n            \u003ctd\u003e\u003cpre\u003e\u003ccode\u003e{\n    \"message\": \"\u003c\u003c\u003c{{From}}\u003e\u003e\u003e tagged you in a Photo\",\n    \"displaySeconds\": 45,\n    \"size\": \"large\"\n}\u003c/code\u003e\u003c/pre\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\nThe notification body JSON MUST contain the `message` item. If it doesn't, the endpoint will return a 400 error.\n All of the configuration options can also be passed with the JSON, which will override the config for\n that recipe only.\n\nThe `\u003c\u003c\u003c{{From}}\u003e\u003e\u003e` in the example above is a IFTTT wildcard field that you select in the Body section\n of the action. You can create any message you like that incorporates any wildcard. Stay away from fields that may\n contain HTML or links, they won't display well. These fields should be surrounded in `\u003c\u003c\u003c` and `\u003e\u003e\u003e` strings in\n order for the field to be escaped properly.\n\n## Using additional modules\n\nThis module will send out notifications to other supported modules, if those options are included in the notification JSON.\nThe supported modules are:\n\n#### [MMM-Pir-Sensor](https://github.com/paviro/MMM-PIR-Sensor)\n\nIFTTT Module will automatically tell the Pir Sensor module to wakeup the monitor when a notification is received. No addition setup is required.\n\n\n#### [MMM-PiLights](https://github.com/jc21/MMM-PiLights)\n\nThis additional module can display light sequences using a LED strip. An example of a notification that includes PiLights sequence:\n\n```json\n{\n    \"message\": \"\u003c\u003c\u003c{{From}}\u003e\u003e\u003e tagged you in a Photo\",\n    \"displaySeconds\": 45,\n    \"size\": \"large\",\n    \"pilights\": \"blue-pulse\"\n}\n```\n\nOr with iterations:\n\n```json\n{\n    \"message\": \"\u003c\u003c\u003c{{From}}\u003e\u003e\u003e tagged you in a Photo\",\n    \"displaySeconds\": 45,\n    \"size\": \"large\",\n    \"pilights\": {\n        \"sequence\": \"blue-pulse\",\n        \"iterations\": 2\n    }\n}\n```\n\n\n#### [MMM-Sounds](https://github.com/jc21/MMM-Sounds)\n\nThis additional module can play audio sounds if your mirror supports it. An example of a notification that would play a Sound:\n\n```json\n{\n    \"message\": \"\u003c\u003c\u003c{{From}}\u003e\u003e\u003e tagged you in a Photo\",\n    \"displaySeconds\": 45,\n    \"size\": \"large\",\n    \"sound\": \"wobble.wav\"\n}\n```\n\nOr with a delay:\n\n```json\n{\n    \"message\": \"\u003c\u003c\u003c{{From}}\u003e\u003e\u003e tagged you in a Photo\",\n    \"displaySeconds\": 45,\n    \"size\": \"large\",\n    \"sound\": {\n        \"sound\": \"wobble.wav\",\n        \"delay\": 1000\n    }\n}\n```\n\nYou may want to use the delay approach to manually align the sound you're using with the light sequence, or to time the wakeup of the screen as well.\n\n\n## Testing the Mirror Endpoint\n\n```bash\ncurl -X POST -H \"Content-Type: application/json\" \\\n    -d '{\"message\": \"Your pizza is ready!\"}' \\\n    \"http://yourhouse.duckdns.org:8080/IFTTT\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjc21%2FMMM-IFTTT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjc21%2FMMM-IFTTT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjc21%2FMMM-IFTTT/lists"}