History - Hackaton 2021

With friends we have decided, that we will make a small own hackaton. We started with a brain storming to find an idea, and after that we voted. The winner idea was the home delivery box hdb product

Home delivery box - hdb

The home delivery box is a smart device that protects the package from the phisical and environtal effects. If the courier can not deliver your package, the owner can generate a pin code after the phone call, and the the courier can put the package into the box.

Design

Sequence diagram

Basically the functionality is very simple. The courier can request a one time usable pin code from the owner to put the package into the box.

CourierBoxBox ownerweb appphone call for a pin to put the package into the boxgenerate a new one time usable pin for the courierreturn generated pin codereturn pin codeput the pin codeopen, courier can put the package into the boxopen with the master pincan access the packageCourierBoxBox ownerweb app

The device

As first step we wanted to design the hardware of the box. Regarding our committion the device needs to have:

  • a keypad - to type the generated code
  • a small LCD - to show the instructions and the keypression
  • a buzzer - for the sound of the distinguish the correct and incorrect code
  • a green led - if the code was correct
  • a red led - if the code was incorrect Of course the interfaces needs to be controlled by a "computer", and it needs to connect to the internet too. We choosed raspberry pi for that.

Circuit diagram

Basically the circuit is very similar, but we use 4x4 keypad, and the pin assignment is different.

Box circuit

Web app for the user friendly management

We decided, that the device needs to be controlled from a web application. If the user buy a device, then he needs to register the device in the web application, and after that he can manage the devices. For the rapid development in this case we choosed MEAN stack. On the admin page the owner can check the usage of the pin codes too.

Use cases

  1. generate new pin code
  2. list of pin codes
  3. revoke an active pin

Development

The device

The device has 2 main functionality:

  • to handle the hardware interfaces -> GPIO programming
  • needs to receive the new pin requests and answare it

Because the device is not accessable via internet, the device have to open a websocket connection with the web server, and after that the web app can send the commands to the device:

Boxweb appopen websocket connectioncan send command for example to generate a new pinBoxweb app

For the programming of the box functionality we choosed python.