{"id":18418848,"url":"https://github.com/ki-labs/hodor","last_synced_at":"2025-04-07T13:31:24.446Z","repository":{"id":50214596,"uuid":"119559678","full_name":"KI-labs/Hodor","owner":"KI-labs","description":"Hodor is a an automation application that is used to open the door controlled by an intercom system from Slack using a custom slash command.","archived":false,"fork":false,"pushed_at":"2022-12-08T00:49:00.000Z","size":349,"stargazers_count":27,"open_issues_count":9,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-22T19:03:23.479Z","etag":null,"topics":["aws-lambda","hacking","hardware","hodor","intercom","iot","raspberry-pi","slack"],"latest_commit_sha":null,"homepage":"https://medium.com/ki-labs-engineering/hodor-controlling-the-office-door-from-slack-a79e77635e39","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/KI-labs.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}},"created_at":"2018-01-30T16:03:49.000Z","updated_at":"2024-03-26T19:49:45.000Z","dependencies_parsed_at":"2023-01-25T01:45:29.327Z","dependency_job_id":null,"html_url":"https://github.com/KI-labs/Hodor","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/KI-labs%2FHodor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KI-labs%2FHodor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KI-labs%2FHodor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KI-labs%2FHodor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KI-labs","download_url":"https://codeload.github.com/KI-labs/Hodor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247661691,"owners_count":20975101,"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":["aws-lambda","hacking","hardware","hodor","intercom","iot","raspberry-pi","slack"],"created_at":"2024-11-06T04:14:47.727Z","updated_at":"2025-04-07T13:31:24.029Z","avatar_url":"https://github.com/KI-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hodor\nHodor is a an automation application that is used to open the door controlled by an intercom system from Slack using a custom slash command. \n\n## How it Works\nOnce a command `/door open` is sent from slack, it is processed by the slack bot service and validated before triggering the door_service to activate the switch on the intercom system through the relay.\n![Hodor in action](https://github.com/KI-labs/Hodor/blob/master/images/Slack_typing.gif \"Hodor in action\")\n\n## Wiring the Hardware\nWe imitate a button press on the intercom by short-circuiting the physical button on the intercom. This is done by using a simple relay which is controlled by the Raspberry Pi as shown in the figure.\n![Hodor wiring](https://github.com/KI-labs/Hodor/blob/master/images/HardwareWiring.jpg \"Hodor: Wiring the hardware\")\n\n## Components\n![Hodor architecture](https://github.com/KI-labs/Hodor/blob/master/images/HodorArchitecture.jpg \"Hodor: Architecture\")\n* __door_service__(nodejs_rpi): Raspberry Pi running a Node.js server that is connected to the intercom switch using a relay.\n* __slack_bot__: Slack integration with a custom slash command `/door` which is handled by a serverless Python web service running on AWS Lambda\n\n## How to Run?\n### Door Service\n```\n$ npm install \n$ node app.js\n```\n#### Deployment\nIf the server is run on port 80 of Raspberry Pi, it can be available on the internet using [Dataplicity](https://www.dataplicity.com/).\n\nCron jobs can be added to automatically restart the service on restart of the device.\n```\n@reboot /path/to/node /path/to/the/app.js \u0026\n```\n\n### Slack Bot\n``` \n$ export VERIFICATION_TOKEN=\u003cVerification Token for App from Slack\u003e\n$ export CHANNEL_ID=\u003cIdentifier for the Slack Channel in which command should be accessible\u003e\n$ export DOOR_SERVICE=\u003cURL end point for the Node.js server running on Raspberry Pi\u003e\n$ pip install -r requirements.txt\n$ python slack_bot.py\n```\n#### Deployment to AWS Lambda\n```\n$ zappa init\n$ zappa deploy\n```\nNote: Your AWS credentials need to be configured for [Zappa](https://www.zappa.io/) to work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fki-labs%2Fhodor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fki-labs%2Fhodor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fki-labs%2Fhodor/lists"}