Skip to content

meowsoni/Homagotchi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Homagotchi

Homagotchi is a presence monitoring clock that tells who is 'home' using ICMP pings.

homagotchi_screen_preview

Written for Waveshare 2.13' ePaper HAT v4 and Raspberry Pi, this Python program pings a user's smartphone (or any other device) to ascertain that they are home by showing a little ASCII face (◕‿‿◕).

If a ping is succesful their face does a lively animation: ( ◕‿◕) (◕‿◕ ).

If they don't leave home for 24h they get a cool face: (⌐■_■).

Features

Homagotchi debounces transient network issues by polling for properties like is_home and last_ping which change only when a user has not responded to a ping in over 10 minutes.

It takes care of the health of your e-Paper screen by running a thread that refreshes the screen fully every 4 minutes. The same thread evaluates if none of the users have responded to a ping in over 30 minutes, and if so it cleans all pixels and puts the screen to sleep. The screen wakes up only when one of the users respond to a ping.

The program writes logs to a file and is currently programmed to delete all previous logs upon boot.

Although it has not been tested, the script should be compatible with all Waveshare EPDs. Just change WIDTH and HEIGHT properties and redraw the interface using Pillow. Same goes for adding more users; if you have a bigger screen (or happy to sacrifice clock) you can add more faces by adding a line for each user in the script.

Bear in mind
Homagotchi does not ping users simultaneously but consecutively to avoid SPI concurrency issues when calling for e-Paper display to refresh. When you switch on the device, it assumes all users are home, so it may take up to 10 minutes to start showing accurate data.

Free to use, without guarantees.

About

Homagotchi is a presence monitoring clock that relies on ICMP pings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages