{"id":33251344,"url":"https://github.com/PtrBld/MMM-Button","last_synced_at":"2025-11-21T17:02:04.659Z","repository":{"id":160497358,"uuid":"58854402","full_name":"PtrBld/MMM-Button","owner":"PtrBld","description":"Use a button to hide or show different modules via a broadcast message","archived":false,"fork":false,"pushed_at":"2019-02-25T08:40:47.000Z","size":15,"stargazers_count":17,"open_issues_count":0,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-29T10:33:24.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PtrBld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-15T09:47:19.000Z","updated_at":"2024-04-18T17:00:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"91e59516-329b-423a-913f-976ece1b9662","html_url":"https://github.com/PtrBld/MMM-Button","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PtrBld/MMM-Button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PtrBld%2FMMM-Button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PtrBld%2FMMM-Button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PtrBld%2FMMM-Button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PtrBld%2FMMM-Button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PtrBld","download_url":"https://codeload.github.com/PtrBld/MMM-Button/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PtrBld%2FMMM-Button/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285655011,"owners_count":27209077,"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","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-11-17T00:00:30.828Z","updated_at":"2025-11-21T17:02:04.653Z","avatar_url":"https://github.com/PtrBld.png","language":"JavaScript","funding_links":[],"categories":["Hardware"],"sub_categories":[],"readme":"# MMM-Button\nThis is an extension for the [MagicMirror](https://github.com/MichMich/MagicMirror). It can monitor a button click and change for example the visibility of some of your modules (at the moment just works with my [MMM-Podcast](https://github.com/ptrbld/MMM-Podcast) module).\nSpecial thanks goes to [Paviro](https://github.com/paviro) as this module is heavily based on his [PIR-Sensor](https://github.com/paviro/MMM-PIR-Sensor) module.\n## Installation\n1. Navigate into your MagicMirror's `modules` folder and execute `git clone https://github.com/ptrbld/MMM-Button.git`. A new folder will appear navigate into it.\n2. Execute `npm install` to install the node dependencies.\n\n## Using the module\nFirst of all connect a button to your Raspberry PI: [How to connect a button.](http://razzpisampler.oreilly.com/ch07.html)\n\nTo use this module, add it to the modules array in the `config/config.js` file:\n````javascript\nmodules: [\n\t{\n\t\tmodule: 'MMM-Button',\n\t\tconfig: {\n\t\t\t// See 'Configuration options' for more information.\n\t\t}\n\t}\n]\n````\n\n## Configuration options\n\nThe following properties can be configured:\n\n\n\u003ctable width=\"100%\"\u003e\n\t\u003c!-- why, markdown... --\u003e\n\t\u003cthead\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003cth\u003eOption\u003c/th\u003e\n\t\t\t\u003cth width=\"100%\"\u003eDescription\u003c/th\u003e\n\t\t\u003c/tr\u003e\n\t\u003cthead\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003e\u003ccode\u003ebuttonPIN\u003c/code\u003e\u003c/td\u003e\n\t\t\t\u003ctd\u003eThe pin your button is connected to.\u003cbr\u003e\n\t\t\t\t\u003cbr\u003e\u003cb\u003ePossible values:\u003c/b\u003e \u003ccode\u003eint\u003c/code\u003e\n\t\t\t\t\u003cbr\u003e\u003cb\u003eDefault value:\u003c/b\u003e \u003ccode\u003e5\u003c/code\u003e\n\t\t\t\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003e\u003ccode\u003eclickDelay\u003c/code\u003e\u003c/td\u003e\n\t\t\t\u003ctd\u003eThe time in miliseconds before another button click is recognized\u003cbr\u003e\n\t\t\t\t\u003cbr\u003e\u003cb\u003ePossible values:\u003c/b\u003e \u003ccode\u003eint\u003c/code\u003e\n\t\t\t\t\u003cbr\u003e\u003cb\u003eDefault value:\u003c/b\u003e \u003ccode\u003e500\u003c/code\u003e\n\t\t\t\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n\t\t\t\u003ctd\u003e\u003ccode\u003enotificationMessage\u003c/code\u003e\u003c/td\u003e\n\t\t\t\u003ctd\u003eThe message broadcasted to other modules\u003cbr\u003e\n\t\t\t\t\u003cbr\u003e\u003cb\u003ePossible values:\u003c/b\u003e \u003ccode\u003estring\u003c/code\u003e\n\t\t\t\t\u003cbr\u003e\u003cb\u003eDefault value:\u003c/b\u003e \u003ccode\u003eBUTTON_PRESSED\u003c/code\u003e\n\t\t\t\u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Developer Notes\nThis module broadcasts a `BUTTON_PRESSED` (as default; specified in the module config) notification with the payload beeing `true` you can use it to show/hide your module (e.g. [MMM-Podcast](https://github.com/ptrbld/MMM-Podcast)).\n\n## Dependencies\n- [onoff](https://www.npmjs.com/package/onoff) (installed via `npm install`)\n\nThe MIT License (MIT)\n=====================\n\nCopyright © 2016 PtrBld\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the “Software”), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\n**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.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPtrBld%2FMMM-Button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPtrBld%2FMMM-Button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPtrBld%2FMMM-Button/lists"}