Skip to content

some scripts for setting up some home automation on a raspberry pi

Notifications You must be signed in to change notification settings

dkulla01/pihome_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#pihome_setup

some scripts to get a raspberry pi set up for running some home automation stuff

Getting started:

the first step is to add git to the raspberry pi and configure ssh keys. Get that done with:

bash -c "$(curl https://raw.githubusercontent.com/dkulla01/pihome_setup/main/bin/install_and_configure_git.sh)"

This script will try to authenticate with github with those ssh keys, and it will direct you to the instructions for linking an ssh key on github.

Keeping it going:

Now that you have git installed and ssh keys linked with github, pull down this repo locally and install the secondary dependencies

git clone git@github.com:dkulla01/pihome_setup.git
cd pihome_setup
./bin/install_secondary_deps.sh

Next, you'll need to generate the SSL certificates that all of the projects will use. Do that by running

./bin/generate_certs.sh

and following the prompts.

That script generates a root CA cert and uses it to create and sign certs for traefik, mosquitto mqtt server, and various mqtt clients. This script writes the root cert and the certs generated with it into different directories with version timestamp suffixes. To get the rest of the project to use these certs, you must set the following environment variables:

# the timestamps get generated with:
# date --utc +"%F-%H_%M_%S"
# for example: 2023-12-25-01_23_45
export ROOT_CERT_VERSION=...
export CERT_VERSION=...

Adding those export statements to an .envrc file will make sure those environment variables are set.

Wrapping things up

Now you have git installed alongside some core dependencies like docker and pyenv. Take a look at the different directories within the docker directory. Some of those will have setup scripts within their bin directory, so run those before using docker compose to start up the various pihome components.

About

some scripts for setting up some home automation on a raspberry pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages