{"id":19795180,"url":"https://github.com/jsfraz/i-hate-doors","last_synced_at":"2025-05-01T03:30:21.406Z","repository":{"id":149459168,"uuid":"605800185","full_name":"jsfraz/i-hate-doors","owner":"jsfraz","description":"Mutes or unmutes the microphone during a call when someone enters or leaves the room. Saves you from having a heart attack and searching for the mute key.","archived":true,"fork":false,"pushed_at":"2023-09-10T18:34:36.000Z","size":466,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T16:06:32.006Z","etag":null,"topics":["discord","hcsr04","java","mqtt","mute","python3","raspberry-pi","teamspeak","voice-call"],"latest_commit_sha":null,"homepage":"","language":"Java","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/jsfraz.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-23T23:30:47.000Z","updated_at":"2024-08-31T22:15:05.000Z","dependencies_parsed_at":"2024-08-29T13:59:34.286Z","dependency_job_id":null,"html_url":"https://github.com/jsfraz/i-hate-doors","commit_stats":null,"previous_names":["jsfraz/i-hate-doors"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfraz%2Fi-hate-doors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfraz%2Fi-hate-doors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfraz%2Fi-hate-doors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsfraz%2Fi-hate-doors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsfraz","download_url":"https://codeload.github.com/jsfraz/i-hate-doors/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251817800,"owners_count":21648807,"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":["discord","hcsr04","java","mqtt","mute","python3","raspberry-pi","teamspeak","voice-call"],"created_at":"2024-11-12T07:15:39.745Z","updated_at":"2025-05-01T03:30:21.006Z","avatar_url":"https://github.com/jsfraz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# I really hate doors (and people)\n\nYou know that feeling when you're on a Discord call, you don't want to be disturbed, but someone constantly feels the need to come and disturb you? This simple project can put you out of your misery.\n\n## How it works?\n\nTo detect room entry, you place a Raspberry Pi Zero with an ultrasonic sensor above the door. Whenever the door closes/opens, the Raspberry sends a message to the MQTT broker (itself). The desktop client then responds to this message by virtually pressing the mute/unmute key.\n\n### Client\n\n![Client](images/client.png)\n\n### Server\n\n![Server](images/sketch.png)\n\n#### Buttons\n\n- top button\n  - used to initialize pairing with client (lasts 30 seconds)\n  - client waits for server to send pairing packet\n- middle button\n  - on/off\n- bottom button\n  - shuts down Raspberry Pi\n\n#### Beep codes\n\n|                 |                                  |\n|-----------------|----------------------------------|\n| **one short**   | connected to MQTT broker         |\n| **two short**   | server stopped                   |\n| **three short** | disconnected from MQTT broker    |\n| **one long**    | pairing started                  |\n| **two long**    | shutting down                    |\n| **three long**  | failed to connect to MQTT broker |\n\n## Installation\n\n### Installing and configuring MQTT server\n\n```bash\nsudo apt update\nsudo apt upgrade\nsudo systemctl enable mosquitto\n```\n\nIn `/etc/mosquitto/mosquitto.conf` make the following changes:\n\n```conf\nlistener 1883 0.0.0.0\nallow_anonymous true\n```\n\nThen restart MQTT server:\n\n```bash\nsudo systemctl restart mosquitto\n```\n\n#### Installing server\n\n```bash\ncd your_download_folder   # optional\ngit clone https://github.com/jsfraz/i-hate-doors.git\ncp -r i-hate-doors/i_hate_doors_server your_desired_folder   # optional\ncd your_desired_folder/i_hate_doors_server\npip3 install -r requirements.txt    # installing python libraries\n```\n\n#### Running script as service\n\nCreate new file `/etc/systemd/system/ihatedoors.service` and paste the following (don't forget to modify the path):\n\n```service\n[Unit]\nDescription=I hate doors\nAfter=multi-user.target\n\n[Service]\nType=simple\nExecStart=python3 your_desired_folder/i_hate_doors_server/main.py\nRestart=on-abort\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen reload the daemon, enable and start the service:\n\n```bash\nsudo systemctl daemon-reload\nsudo systemctl enable ihatedoors.service\nsudo systemctl start ihatedoors.service\n```\n\n## TODO\n\n- release client executable\n- power from lithium battery\n- create PCB and 3D print case\n- MQTT security\n\n## Disclaimer\n\nThis is intended for home use, communication with the MQTT server is not encrypted in any way.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsfraz%2Fi-hate-doors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsfraz%2Fi-hate-doors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsfraz%2Fi-hate-doors/lists"}