{"id":18086773,"url":"https://github.com/olexs/mmm-mqttscreenonoff","last_synced_at":"2026-04-27T22:31:30.294Z","repository":{"id":229647219,"uuid":"777262631","full_name":"olexs/MMM-MQTTScreenOnOff","owner":"olexs","description":"Allows you to control your MagicMirror's screen on/off state based on an MQTT topic, for example with data from a smart home motion sensor.","archived":false,"fork":false,"pushed_at":"2025-07-30T19:57:32.000Z","size":44,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T22:22:04.693Z","etag":null,"topics":["magicmirror2","magicmirror2-module","motion-sensor","mqtt"],"latest_commit_sha":null,"homepage":"","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/olexs.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-25T14:17:49.000Z","updated_at":"2025-06-15T20:15:09.000Z","dependencies_parsed_at":"2024-04-25T10:29:30.587Z","dependency_job_id":"89a4463b-fe0a-4d50-a733-f25f9d5678c1","html_url":"https://github.com/olexs/MMM-MQTTScreenOnOff","commit_stats":null,"previous_names":["olexs/mmm-mqttscreenonoff"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/olexs/MMM-MQTTScreenOnOff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexs%2FMMM-MQTTScreenOnOff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexs%2FMMM-MQTTScreenOnOff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexs%2FMMM-MQTTScreenOnOff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexs%2FMMM-MQTTScreenOnOff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olexs","download_url":"https://codeload.github.com/olexs/MMM-MQTTScreenOnOff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexs%2FMMM-MQTTScreenOnOff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["magicmirror2","magicmirror2-module","motion-sensor","mqtt"],"created_at":"2024-10-31T16:58:27.766Z","updated_at":"2026-04-27T22:31:30.275Z","avatar_url":"https://github.com/olexs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MMM-MQTTScreenOnOff\n\n## Description\nThe `MMM-MQTTScreenOnOff` module is a MagicMirror² module that allows you to control the screen on/off state using MQTT messages.\n\n## Installation\n1. Navigate to your MagicMirror's `modules` directory and clone the repository:\n    ```bash\n    git clone https://github.com/olexs/MMM-MQTTScreenOnOff.git\n    ```\n2. Install the required dependencies by navigating into the module's directory and running the following command:\n    ```bash\n    cd MMM-MQTTScreenOnOff\n    npm install\n    ```\n\n## Configuration\nTo use the `MMM-MQTTScreenOnOff` module, you need to add the following configuration to the `config/config.js` file of your MagicMirror:\n\n```js\n{\n    module: 'MMM-MQTTScreenOnOff',\n    config: {\n        // MQTT server data\n        mqttServer: \"mqtt://localhost\",\n        mqttPort: 1883,\n        mqttUsername: \"\",\n        mqttPassword: \"\",\n        // MQTT topic to listen to\n        mqttTopic: \"zigbee2mqtt/Motion Sensor\",\n        // If the topic payload is a JSON object, specify the field that contains the occupancy boolean. If this is not set, the entire payload is treated as a boolean.\n        mqttPayloadOccupancyField: \"occupancy\",\n        // Commands to run to turn the screen on and off\n        screenOnCommand: \"DISPLAY=:0.0 xrandr --output HDMI-1 --auto\",\n        screenOffCommand: \"DISPLAY=:0.0 xrandr --output HDMI-1 --off\",\n        // Whether to turn the screen off on startup\n        defaultOffOnStartup: true,\n        // Whether to broadcast USER_PRESENCE notification to other modules when the screen is turned on and off (boolean payload)\n        broadcastUserPresence: false,\n    }\n}\n```\n\nAll values are optional, defaults are shown above.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folexs%2Fmmm-mqttscreenonoff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folexs%2Fmmm-mqttscreenonoff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folexs%2Fmmm-mqttscreenonoff/lists"}