Skip to content

IeiuniumLux/PetPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PetPy

PetPy is a simple local HTTP server that let you feed your pet remotely. It's built on MicroPython, the lean implementation of the Python 3 standard library that is optimised to run on microcontrollers and in constrained environments. PetPy is simple and hackable enough that can be adapted for other projects or used for testing and learning. It can easly act as a simple interface to receive remote requests to control devices or read analog inputs like the kind used for IOT projects.

How it works

A food container is attached to a servo and when it turns, a few pellets/kibble/treats drop into the bowl. You can adjust the hole and size of the dispenser depending on whether you are feeding a fish, cat, dog, etc. It serves only one single user connection.

Authentication

PetPy requires a login first unless the user is detected in the session; which in that case just sends the index.html page. A Cookie is used to store the user session. However, the HttpOnly flag is set so it's not accessible through JavaScript and immune to XSS.

Behind wifi router

If you want to run PetPy server behind WiFi-router and want it to be accessible from the Internet, then you have to add port-forwarding rule on your router. This is required in order to forward all of the requests that come to the router within the local network to PetPy server.

Parts

Below is the list of essential parts you'll need to build the pet feeder.

Part Qty
OpenMV Cam M7
1
OpenMV Cam WiFi Shield
1
OpenMV IR Lens
1
Clear Acrylic Cement for Bonding Parts
1
Hitec HS-82MG Metal Gear Micro Servo
1
Barrel Jack to 2-Pin JST Adapter
1
3-Inch Diameter Round Tin
a mini Pringles can should work too
1
Knurled Thumb Nuts
optional
2
4" x 4" Acrylic/Plexiglass Block
1
CAD Parts
camera mount by Chris Anderson and feeder structure by littleBits
Parts

Resources

Minifier
CSS Validator
Date/Epoch Converter
Router Port Forwarding
Google Domains
Content Security Policy
FreeCAD