Monitoring Your Enclosure With TerrariumPi

Ulta | December 31st, 2019

Being in the IT world in my day job it’s always been a dream of mine to integrate technology with my passion for reptile keeping. I looked and looked forever trying to find a commercially available solution, to no avail. What I did find was an awesome bit of software written by TheYosh. His software is TerrariumPi. It’s meant to be ran on a RaspberryPi and can be used to monitor, regulate, and even manually control just about whatever you want. Want to have a handy readout of temps and humidity on your phone? Done. Want a system that automatically kicks on your mistking if humidity gets low? Done. Want it to cook you pancakes while managing the heat of a heat mat while simultaneously walking your dog? I mean, maybe. Point is, if you can think it, TheYosh has given us the tools to do it. 

Many people look at the project and see an endless nightmare of coding, wiring, and soldering. In reality, it’s not that difficult at all. In this series of tutorials I’ll walk you through a simple setup for monitoring. We’ll setup the Raspberry Pi, install the TerrariumPi software, hookup a temp/humidity sensor, add it to the software, then setup alarms. Just learning this should give you a good solid framework to expand your system into whatever you may need. If need be, we might do a followup series on the more advanced things, like relays and dimmers. 

Materials

Setting Up the Raspberry Pi

Step 0.5:

The first real thing that needs to be done is put together your Raspberry Pi and case. If you purchase the case I linked above the instructions provided are quite detailed. 

Step 1:

Plug your MicroSD card into you computer. The first thing we’ll need to do is download Raspian Stretch Lite. This is a “headless” operating system, as in there’s no physical desktop. This is fine for our purposes because we’ll never really be interacting with the Pi itself. Raspian Stretch light can be downloaded here. You’ll also need to download Balena Etcher so we can write the operating system to the MicroSD Card. You can find that here. 

Step 2:

Install Balena Etcher and click Select Image. You’ll pick the Raspian Stretch Lite zip file you downloaded. Next you’ll click select target and make sure you select the microSD card you inserted into your computer. If you accidentally select the incorrect drive you run the risk of deleting important data. After that hit flash and you’re on your way!

Step 3:

Insert the SD card into the Raspberry Pi and plug in the power. Connect a keyboard and display. You’ll see a bunch of text and then a login. The default login is pi for the username and raspberry for the password. When typing the password you won’t see any text. Just hit enter after you’ve typed it. Once we get logged in you’ll run the command sudo raspi-config. This is so we can connect the pi to the wifi. To do this go to Network Options, then wifi. It’ll ask you to type the name of the SSID, this is simply asking you to type the name your wifi network has. So if it’s HomeInternet or FBI Surveillance Van #2  just type that exactly as it shows. It’ll then ask your for the wifi password, if you don’t have a password to access the wifi then just leave it blank. It’ll prompt you to reboot, after you reboot it’s time to update and actually install TerrariumPi!

Step 4:

After your Raspberry Pi has rebooted login again and go back to Raspi-Config. Go down to Update this time and let that run. This will get us all up to date so we don’t run into issues installing TerrariumPi. 

Step 5:

Ok, now it’s time to actually install TerrariumPi. A quick overview of what’s gonna happen is:
We’ll install git. This allows us to interact with github
We’ll download a copy of the TerrariumPi
We’ll run the installer
Easy right? The first command to install git is:
sudo apt -y install git

 After that runs we’ll need to clone the repository. In english, we’re gonna make a copy of that github. The command for this is:

git clone –recursive –depth 1 https://github.com/theyosh/TerrariumPI.git

Next step is to navigate to the folder that we just created with that last command. To do this just type:
cd TerrariumPI

 

 All we have to do now is start the installer for TerrariumPi, you can do that with this command:
sudo ./install.sh

Follow the onscreen prompts until the installation is complete. After it’s complete just run:
sudo reboot

This reboots the Pi so we can load up the right models. After the system reboots you’ve installed TerrariumPi to access your newly installed software go to a computer browser on your computer or phone and go to http://raspberrypi:8090.

You can also use http://[IP Address of the Pi]:8090. You should be greeted with the dashboard for TerrariumPi! Feel free to browse around, if you’re prompted with a login prompt the default credentials are admin and no password. 

 

Final Notes

This is it for the first part in this series of setting up TerrariumPi. In the next segment we’ll go over hooking up an SHT20 Temperature and Humidity Sensor and adding it to the dashboard. If you have any questions about this process feel free to join our discord and we can help you with any issues you may be having. Otherwise you can always check out the TerrariumPi Github here. The wiki is extremely detailed and the issues sections is checked frequently if you need help from theYosh himself!