So you bought this raspberry Pi and now you wonder what you could do with it ? Hey, why not use it as a home automation server ? Today we install IOTstack on a Raspberry Pi 4 which is a collection of famous home automation software products such as Home Assistant, Openhab, Node-Red or Home bridge.
But on top of this it has a menu driven installer where you can chose from many other tools such as TasmoAdmin, Motion Eye, Mosquito MQTT, Grafana or even Plax and Next cloud. Why just need one if you could have it all ? Stay tuned. Rather than building everything from scratch we can use the existing iotstack project. The project has been hosted by Graham Garner from South Africa. It was inspired by you tuber Andreas Spies – the guy with the Swiss accent.
You can find his channel in my featured channels list and also I have put a link to his first video about IOTstack up here. So Kudos to Graham and Andreas for bringing this forward, many thanks guys. I assume that you have a running debian Linux on your Raspberry Pi 4 and that you are potentially booting from an SSD drive.
If you don’t know how to do this then please watch my video on this – there is a card up here on this little info Icon and the link to the video is also in the description of this video. Guys, please use the chapter markers and the time line if you want to skip parts of the video. You can see the sections here on the timeline ? Those are the chapters. I have also put them into the description. Awesome, now let’s install IOTstack. Graham Garner’s original project has stalled, so the most active fork of this project is actually Andreas Spies himself.
So let’s follow his Installation instructions and start by installing git and then pull the project from his github repository. I am logged into the pi using ssh. So first let’s make sure that we have git and curl installed. We will use git in order to clone the project from Andreas’ github repository and curl in order to download stuff from the internet.
In order to clone the repository we need to type git clone and then the URL of the repository followed by a folder name where we want to put it. Once we have pulled it into the IOTStack subdirectory we can then cd into that folder and launch the menu.sh. We select the first option – Install Docker – and that will actually launch the docker installation script which also installs all dependencies.
The installer tells me to reboot, but before we do that I want to quickly launch raspi-config – you have seen all those locale errors ? I just want to quickly install the locales for German and English and set the default locale of my system to English. Now we can reboot by typing sudo reboot. Perfect, we have pulled the IOTStack project to our Pi and we have installed Docker on the Pi. Now let’s select the right menu items and chose which software to install.
Let’s again ssh into the pi and call the iotstack menu. Once we select the second menu item which is called Build Stack, we can select all the software components which we want to install in docker containers. Now feel free to install whatever you want but I need to give a little warning here – even the raspberry pi 4 has its limit, so you might want to limit yourself to the software which you are really planning to use, even though I admit that the temptation is high to select everything.
Once we quit the menu, we can then start the stack. The menu script has created a docker compose yaml file and in order to start it we just need to type docker-compose up -d. Now Dockers starts to pull all the required images, build the containers and ultimately start them. This process may take a couple of minutes.
Once the process finishes, we can check if everything is up by browsing to port 9000 on our raspberry pi and open portainer. First we need to give a password for the ew admin user and then connect to our local docker instance from where we can see that all the selected docker containers are currently up and running. Under published ports you can see the ports that you would need to connect to in order to use the various products.
Awesome, we have a bunch of software on our Pi just by making a couple of clicks. There is just one little thing that is missing to make me happy and that is a graphical user interface to Linux itself. Many of us do not want to use the shell or command line in order to do things on the Pi but would really prefer to have a graphical user interface – a GUI. Webmin is exactly that – so let’s go ahead and quickly put Webmin on that Pi. Webmin provides a debian installer package, a .deb file which can be downloaded from source forge. I have put all links into the description of the video. Using wget or curl I can download it to the server. Takes just a couple of seconds really, depending on the available bandwidth.
Comments
Post a Comment