{"id":16825595,"url":"https://github.com/supercomputer7/rpi-mqtt-kitchen-ringbell-button-publisher","last_synced_at":"2025-03-17T19:18:35.290Z","repository":{"id":210407941,"uuid":"723774964","full_name":"supercomputer7/rpi-mqtt-kitchen-ringbell-button-publisher","owner":"supercomputer7","description":"MQTT Raspberry-Pi Kitchen Ring-Bell Publisher ‒ A minimal MQTT client to ring when the food is ready!","archived":false,"fork":false,"pushed_at":"2023-12-02T14:51:49.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T06:25:41.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/supercomputer7.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}},"created_at":"2023-11-26T18:13:28.000Z","updated_at":"2023-11-26T18:20:07.000Z","dependencies_parsed_at":"2023-12-02T15:44:44.957Z","dependency_job_id":null,"html_url":"https://github.com/supercomputer7/rpi-mqtt-kitchen-ringbell-button-publisher","commit_stats":null,"previous_names":["supercomputer7/rpi-mqtt-kitchen-ringbell-button-publisher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supercomputer7","download_url":"https://codeload.github.com/supercomputer7/rpi-mqtt-kitchen-ringbell-button-publisher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244094273,"owners_count":20397020,"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-10-13T11:14:26.631Z","updated_at":"2025-03-17T19:18:35.264Z","avatar_url":"https://github.com/supercomputer7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT Raspberry-Pi Kitchen Ring-Bell Publisher ‒ A minimal MQTT client to ring when the food is ready!\n\n*MQTT Raspberry-Pi Kitchen Ring Publisher* is a minimal Python solution that integrates paho-mqtt for creating an MQTT client, that is triggered upon button press.\n\n## How to use on the Raspberry Pi (Debian based OSes)\n\n```sh\nsudo apt install libsystemd-dev python3-systemd\ngit clone https://github.com/supercomputer7/rpi-mqtt-kitchen-ringbell-button-publisher\ncd rpi-mqtt-kitchen-ringbell-button-publisher\nsudo python3 -m pip install -r requirements.txt\n\n# Execute the MQTT publisher script\npython3 publisher.py \\ \n    --mqtt-broker-ip MQTT_IP \\\n    --mqtt-topic MQTT_TOPIC \\\n    --mqtt-user MQTT_USER \\\n    --mqtt-password MQTT_PASS \\\n    --mqtt-published-data MQTT_DATA \\\n    --gpio-pin-input GPIO_PIN\n```\n\nYou can use this Python script as a `systemd` service with the provided\n`mqtt-kitchen-button-publisher.service` file. Please configure the script as desired by\nediting the service file. Then install the service by running the following\ncommands:\n```sh\nsudo mkdir -p /opt/mqtt_kitchen_button_publisher/\nsudo install publisher.py /opt/mqtt_kitchen_button_publisher\nsudo install mqtt-kitchen-button-publisher.service /etc/systemd/system\nsudo systemctl daemon-reload\nsudo systemctl enable mqtt-kitchen-button-publisher.service\nsudo systemctl start mqtt-kitchen-button-publisher.service\n```\n\n## Frequent Disconnections from the MQTT broker\n\nYou might consider disabling WiFi Power saving mode due to frequent disconnections\nfrom the MQTT broker.\n\n- Disable WiFi Power Saving: Suggestions are taken from answers to this [question](https://raspberrypi.stackexchange.com/questions/96606/make-iw-wlan0-set-power-save-off-permanent).\n- Ensure the keepalive timeout when connecting the MQTT broker is infinite (0)\n\nEither disable WiFi Power Saving by:\n- Creating new [systemd service and enabling/disabling it appropriately](https://raspberrypi.stackexchange.com/questions/96606/make-iw-wlan0-set-power-save-off-permanent/96644#96644)\n- Adding new line to `/etc/rc.local` to [disable WiFi power saving](https://raspberrypi.stackexchange.com/a/96608).\n\nBoth problems were resolved for me, but you might need to investigate further.\nCheck the journal log to examine the `rc` (return code) on why the program failed\nand also if possible, check the logs of your MQTT broker.\n\n## License\n\nThe project is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercomputer7%2Frpi-mqtt-kitchen-ringbell-button-publisher/lists"}