{"id":21906275,"url":"https://github.com/alfex4936/kakaopi","last_synced_at":"2026-04-09T20:37:21.906Z","repository":{"id":151852311,"uuid":"500000204","full_name":"Alfex4936/KakaoPI","owner":"Alfex4936","description":"Using KakaoChatBot to control raspberry pi devices","archived":false,"fork":false,"pushed_at":"2023-02-05T07:36:46.000Z","size":7130,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T07:23:03.034Z","etag":null,"topics":["iot","kakao","kakaotalk","raspberry","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"C","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/Alfex4936.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}},"created_at":"2022-06-05T04:32:14.000Z","updated_at":"2024-01-11T15:37:51.000Z","dependencies_parsed_at":"2023-05-12T11:45:23.073Z","dependency_job_id":null,"html_url":"https://github.com/Alfex4936/KakaoPI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Alfex4936/KakaoPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfex4936%2FKakaoPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfex4936%2FKakaoPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfex4936%2FKakaoPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfex4936%2FKakaoPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alfex4936","download_url":"https://codeload.github.com/Alfex4936/KakaoPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alfex4936%2FKakaoPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265313068,"owners_count":23745185,"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":["iot","kakao","kakaotalk","raspberry","raspberrypi"],"created_at":"2024-11-28T16:43:31.956Z","updated_at":"2026-04-09T20:37:16.873Z","avatar_url":"https://github.com/Alfex4936.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 카카오파이\n\nUsing AWS S3 for photo storage, C language for socket communication, Python with OpenCV for face detection, and Rust for a chatbot server.\n\nThe project, `KakaoPi`, consists of three Raspberry Pi devices, each with its unique role.\n\nThe second Raspberry Pi acts as a TCP server and houses the Rust-based chatbot server, allowing for control of other devices through the KakaoTalk app.\n\nThe first Raspberry Pi acts as a TCP client and is equipped with a camera, buttons, LED lights, and sensors.\n\nThe third Raspberry Pi is also a TCP client, responsible for controlling an LCD screen.\n\nWith this setup, the Raspberry Pi Communication project is able to accomplish a wide range of tasks. \n\nFor example, a message sent through the KakaoTalk app to the second Raspberry Pi's chatbot server could instruct the first Raspberry Pi to take a picture.\n\nThe picture is then uploaded to AWS S3, allowing for viewing from anywhere with internet access.\n\nThis project is a true example of mixing multiple programming languages (C + Py + Rust), wireless communication between pies and kakaotalk chatbot api to control pies by KakaoTalk.\n\n[![kakaopi_video](https://img.youtube.com/vi/yu4VTjWsiuo/maxresdefault.jpg)](https://youtu.be/yu4VTjWsiuo)\n\n![KakaoTalk_20220607_170805681](https://user-images.githubusercontent.com/2356749/172969187-4b86b295-89aa-4f79-9abb-0c8c2d58c65d.jpg)\n\n![KakaoTalk_20220605_121608952_samsung-galaxys20-cosmicgrey-portrait](https://user-images.githubusercontent.com/2356749/172969281-7719462b-a98a-4c52-b57e-9bb377333433.png)\n\n![image](https://user-images.githubusercontent.com/2356749/172969513-bfd4dd5d-cab5-4a06-9f2b-b2bec99f5616.png)\n\n![image](https://user-images.githubusercontent.com/2356749/173337519-78fce863-2e0a-45ad-a6ce-c7cd43a43ba1.png)\n\n카카오파이 소스입니다.\n\n파이1 TCP 클라이언트, 파이2 챗봇에서의 TCP 클라이언트, 파이3 TCP 클라이언트\n\n총 3개의 클라이언트와 파이2 TCP 서버로 이루어져 있습니다.\n\n코드는 파이2는 C언어만, 파이1은 C언어(클라이언트) + 파이썬(파이카메라+OpenCV) + 파이3는 C언어만(클라이언트) 사용하였습니다.\n\n```\n파이1 - 카메라, LED, 조도센서, 초음파센서\n\n파이2 - 센서 X\n\n파이3 - LCD\n```\n\n## 전체 셋업\n\n환경 변수 값들이 필요합니다.\n\n`SERVER`: 서버 고정 IP\n\n`ACCESS_KEY_ID`: AWS IAM 키\n\n`ACCESS_SECRET_KEY`: AWS IAM 시크릿 키\n\n`AWS_S3_BUCKET`: AWS S3 버킷 이름\n\n## 파이1\n\n![KakaoTalk_20220530_021223309](https://user-images.githubusercontent.com/2356749/172969346-bfd8e409-09cd-4c34-b07e-6a2970298054.jpg)\n\n파이1은 C언어에서 Python을 컨트롤하기 위한\n\n`Python C-API`를 사용했습니다.\n\n카메라를 찍으라고 명령했을 때 (`사진 찍기 -\u003e 마스크 감지 -\u003e S3 업로드`)\n\n위 과정만 파이썬으로 제작되었습니다.\n\n### 실행\n\n```sh\n$ gcc -Wall client.c gpio.c pwm.c spi.c `pkg-config python3-embed --libs --cflags` -lpthread -o client\n$ ./client\n```\n\n## 파이3\n\n![KakaoTalk_20220607_171345773](https://user-images.githubusercontent.com/2356749/172969193-da4074c0-570b-407a-adc5-5616de9795f9.jpg)\n\n파이3는 단순 LCD만 사용합니다.\n\n조도 센서, 초음파 센서 등의 값들과 마지막 명령어를\n\nLCD에 표시하기 위함입니다.\n\nWiringPI C언어 라이브러리를 사용하였습니다.\n\n### 실행\n\n```sh\n$ gcc -Wall client_lcd.c soft_lcd.c soft_i2c.c -lwiringPi -o client_lcd\n$ ./client_lcd\n```\n\n## 파이2\n\n외부 접속 가능하게 고정 ip가 필요합니다. (+ 포트포워딩)\n\n개발용이기에 도메인 이름까지 사용안하고 ip 형식으로 주소가 이루어집니다.\n\nhttps://123.456.789\n\n카카오챗봇 Rust는 최초로 만들었습니다.\n\n검색해도 제가 쓴 글밖에 안나옵니다. (아주대 챗봇)\n\nkakao-rs 라이브러리도 만들어서 챗봇 서버 사용을 쉽게 하였습니다.\n\n카카오챗봇 서버 (+ 웹 홈페이지) + TCP 서버 동시에 돌아감\n\n![image](https://user-images.githubusercontent.com/2356749/173375915-422ac12a-89a6-456d-89c2-a153dd3927ad.png)\n\n### 실행\n\n아래로 서버를 빌드하고 실행\n\n```sh\n$ gcc -Wall server.c -o server\n$ ./server\n```\n\n아래로 카카오파이 챗봇 서버 실행\n\n```sh\n$ cargo run --release\n```\n\n---\n\nMade by 최석원 (Seok Won, Choi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfex4936%2Fkakaopi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfex4936%2Fkakaopi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfex4936%2Fkakaopi/lists"}