The product we made is called ButterButler, a revolutionary home assistant for large luxurious villas.
More details can be found in our Home Page
When we designed the project we understand that things may fail. Which is why we every device we ship will come with a power bank, to overcome short period of power outage (accidentally unplug it).
In our current implementation, each PI Zero is only in charge of a small areal network, communicate with sensor in its area by using SPI or low-powered protocols such as ZWave/ZigBee or BLE(Bluetooth Low Energy). As the result, if the PI Zero breaks, it only affect that area not the whole network.
All the Pi Zeros are connected to hub, where all information are stored. In the future, we are planning allow other Pi Zeros to become a hub if the current hub get discounted.
The current location model are shown below
As we are creating network of connected devices in people's home. It is important to put security and privacy first. To accomplish this:
- We used docker to isolate and containerized every components in all of our devices
- We used encryption for every connections
- MQTT: All client need have certificate and key pair signed by the same CA to to join the network
- DockerMaintenance: This is done though VPN, no port forwarding is required
- UserInterface: HTTPS is used together with login feature to protect user's data (HTTPS not implemented yet)
- All users data are stored locally, making it impossible for disastrous data leak.
Image below provides a more detailed view of all the channels
The encrypted channels is only safe when keys are properly looked after, which is why we used step below to generate certificates and keys on the flight.
- An self-signed CA certificate is generated
- All clients certificate are signed by the CA's certificate
- The CA certificate and its keys are deleted, making it imposable to add new clients.
Implementation is shown in script hub/script/setup_mqtt_tls.sh
The project directory is split to two part, each developed independently.
hub
├── config (Configuration for each docker, mounted as volume)
├── docker (Contains docker-compose file for build the docker)
└── script (Scripts used to generate certificate and upload config volumes)
zero
├── da-config (Configuration for the daemon)
├── docker (File to build docker)
└── modules (Source code folder for daemon.py)
├── baby_stitch (Demo example)
└── ... (Other modules)
The modules directories contains many sub-folder, each folder contains a collection of code (module) that will be useful in that setup. This offers great flexibility, allows custom solutions by picking relevant packages.
- cd to
hub/docker
, run docker compose withbalena
. - run
hub/config/config.sh up
to upload all configurations underconfig
folder to Raspberry Pi. - run
hub/config/setup_mqtt_tls.sh zero
to generate all necessary keys and certificate. Keys forzero
will be downloaded tohub/.backhub
folder
- Copy Keys for zero to
zero/da-config
- cd to
zero
, run docker compose withbalena