Home automation microservice stack communicating via MQTT (using mosquitto) built with Typescript, Python, Go and NodeMCU C deployable with Kubernetes on a Raspberry Pi cluster.
This project was devised to utilise open, reverse engineered or free home automation hardware and software together without the need for third-party hubs, cloud services or subscriptions wherever possible.
The project is split into the following services, each of which have their own README describing the configuration interface they support as well as how to modify and test them.
The project includes a shutdown service which allows a computer to be remotely shutdown by message queue events generated by PowerPi.
The project also includes sensor NodeMCU code in the sensors directory which can be used to generate events when motion is detected, or temperature/humidity readings at an interval.
The latest image for each service can be found on Docker Hub, if you've made local changes (or want to try out a service locally) you can build it from scratch with the following instructions.
The images can be built with Docker's buildx tool which supports cross-compilation of images, allowing us to build ARM images for deployment on a Raspberry Pi on an x86_64 architecture. Although, if you're not using Energenie and therefore don't need the Pi module you can build and run the stack on other architectures supported by the base images.
# From the root of your checkout of PowerPi
# Build an image with buildx, the image version tags can be found in the service's package.json or pyproject.toml file.
docker buildx build --platform linux/arm/v7 --push -t MY_DOCKER_REGISTRY/powerpi-config-server:1.0.0 -f services/config-server/Dockerfile .
# Or for 64-bit ARM
docker buildx build --platform linux/arm64 --push -t MY_DOCKER_REGISTRY/powerpi-config-server:1.0.0 -f services/config-server/Dockerfile .
# Or x86-64
docker buildx build --platform linux/amd64 --push -t MY_DOCKER_REGISTRY/powerpi-config-server:1.0.0 -f services/config-server/Dockerfile .
Deploying the services is simply a matter of deploying the stack using Kubernetes, which will pull the latest images from Docker Hub.
The instructions for deploying the stack using Kubernetes can be found as follows:
See also the list of contributors who participated in this project.
This project is licensed under the GPL 3.0 License - see the LICENSE file for details