IoT Pet Home System by using chatting bot messenger
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Pet House System

License: GPL v3 CONTRIBUTORS HitCount Build Status

IoT-Pet-Home-System is a system that can communicate through pet-homes and chatting-bot.

How To Get Source Code



Pet House systems were built for people who would be absent from home and wouldn't be able to take care of their pets. so it can help reduce pet worries because it is easy to manage pets when you are away on long trips or on sudden appointments. It's very simple to use because it uses a messenger. If you are in an environment that has Internet access, you can use it anywhere.


  • Usage through Messenger.
  • Raspberry Pi with chat-bot based System.
  • Using communication with chat-bot server(based on flask).
  • You can check the status of your pet with PiCamera.
  • You can manage meal for your pet(s).



  • Raspberry Pi 3 module-B (used in Pet-home-System)
  • 2 servo-motors(for feed, door) and PiCamera
  • Server with public IP(used to chat-bot API Server) and HTTPS.
  • Smart-Phone or web for using chat-bot(used in client)


  • python 3.x version
  • Open-jdk and g++
  • opencv-python
  • Raspbian OS(for pethome)
  • Required package: requests, Flask, pymysql, numpy, imutils, konlpy


  • Must regist to Naver-talktalk Partner.

Pet House Structure

Three motors are operated by messenger, and manage feeds and door.
And you can see the pet directly through the Pi Camera.

Motor operation structure

Door(open) Door(close) Food
Open the door by pulling the thread by the rotation of the motor When the motor stops, the door is closed by the resilience of the weight. Rotate and restore the motor for a short time, and feed the prey by opening and closing the entrance

Client & Server Structure

Full server structure

  • User <-> Chatting-Bot
  1. Users who use Naver-TalkTalk send messages to chatbots using Naver-talkTalk web application.
  2. Naver-TalkTalk API Server sends messages from users as JSON type to a chatting-bot server.
  3. The Chatting-Bot Server compares and analyzes the data stored in the DB with this data. Process the data and send the appropriate response to the user. 4.The Naver-TalkTalk API server processes the message to a user, which is readable by the user, and then presents the result to the user.
  • Chatting-Bot <-> Pet-Home
  1. Pet-Home constantly asks the chatting-bot server if there are any requests from the user.
  2. The chatting-Bot server checks the DB when a request is received from Pet-Home and sends it to Pet Home if requested by the user.
  3. Pet-Home, which is requested, performs this tasks.

Client & Main server structure

  1. Users send requests to Pet Home through the Navertalk web application. Naver-TalkTalk API server then recognizes this and sends data to chatting-bot server.
  2. Chatting-Bot Server obtain data(request) and a user-key from Naver-TalkTalk. Save the user-key and data(request).
  3. After that, look at the user-key that Pet-Home registered for and see what requests it had. Then take the request and do the corresponding work.
  4. When Pet-Home has finished all the requests of its registered user, it sends a push notification to the user.

How to use

1) Add Official account of Messanger(IoT Pet House System)

  • naver-talktalk platform: IoT 펫홈 시스템

2) Enter chat in the format "등록"

  • When you enter this command, it sends the registration url.

3) Click url and fill in the User-Registration form.

  • Check your pet-home's serial-key and enter the serial-key, E-mail adress, pet-home nickname and the number of pets into below form. And then press the button;submit below to regist.

4) Enter chats that associated with food, door opening, Taking pictures.

  • If you're a registed user, you can do chatting with IoT-pet-home-system!
    Order to set feed, open pet-home's door at the IoT-pet-home-system chatbot.

  • Ask Chatbot to take picture.

5) If you don't know how to use, please enter the command below.

  • "[사용법]" : This command will inform how to use this chatbot.

6) If you forget to feed your pet, chatbot's push service support you!

  • If you don't set feed your pet, push alarm inform to you once an hour.

7) If you want to stop a talktalk-friend, you can stop anytime.

  • All information you entered at the time of registration will be deleted and the following message will be sent to you.


Installation of the Systems.

1) Server side

  • Install MySQL and compilers.
$ sudo apt-get update
$ sudo apt-get install mysql-server
$ sudo apt-get install g++ openjdk-7-jdk
  • Install python3 packages; requests, flask, pymysql , KoNLPy
$ pip3 install requests
$ pip3 install flask
$ pip3 install pymsql
$ pip3 install konlpy
  • Clone repository and Setting configurations
$ cd src
$ sudo chmod +0777
$ ./

2) Pet-Home side

  • Install GPIO modules.
$ sudo apt-get install python-dev
$ sudo apt-get install python-rpi.gpio
  • Install python3 packages; requests, numpy, imutils
$ pip3 install requests
$ pip3 install numpy
$ pip3 install imutils
  • Install openCV-python
$ pip3 install opencv-python

README by version



Main-server (ChattingBot)

IoT-Pet-Home-System is based on the GNU GENERAL PUBLIC LICENSE v3.

Copyright (C) 2017-present, kuj0210, KeonHeeLee, seok8418

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <>.