This is just my approach to prevent myself from eating to much sweets before christmas.
It's a crate, which opens only three times a day. This is realized by an ESP8266 (arduino with wifi) and a raspberry pi as webserver.
The webserver is checking against a database, wether I'm allowed to or not.
If you want more information, please check my blog: