diff --git a/pages/12.home-automation/docs.md b/pages/12.home-automation/docs.md index b85093a..f007106 100644 --- a/pages/12.home-automation/docs.md +++ b/pages/12.home-automation/docs.md @@ -41,4 +41,18 @@ Edit Task 1 # Step 4. - Test `Off` = `http://${IP_ADDRESS}/control?cmd=GPIO,12,0` -`On` = `http://${IP_ADDRESS}/control?cmd=GPIO,12,0` \ No newline at end of file +`On` = `http://${IP_ADDRESS}/control?cmd=GPIO,12,0` + +# Step 5. - Install Mosquitto on a Raspberry Pi +### First get the repository package signing key, import it into apt, and remove the key file again: +```wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key +sudo apt-key add mosquitto-repo.gpg.key +rm mosquitto-repo.gpg.key``` + +### Then make the mosquitto repository available to apt: +```cd /etc/apt/sources.list.d/ +sudo wget http://repo.mosquitto.org/debian/mosquitto-stretch.list +sudo apt-get update``` + +### Now we can install the core packages (server & clients): +```sudo apt-get install mosquitto mosquitto-clients``` \ No newline at end of file