Running MudPi

MudPi was built on python 3 and everything is loaded from one main script. All you need to do after you have configured MudPi is run script from the root folder of your MudPi installation.

cd your/path/to/mudpi
MudPi Smart Garden

You will have some nice output on the status of the program and it will continue to output while the MudPi is running. However if you power off the pi and encounter an error you will need to run the script again. We can make this much easier for ourselves and automatically start the script on boot and restart if any errors occur using a task monitor called supervisor.

Keep MudPi Running With Supervisord

Using a task monitor like supervisord is excellent to keep MudPi running in the background and only is a pip install supervisor away. Using a tool like supervisor allows you to keep MudPi running in the event of errors or system restarts. This is what I do personally. Here is a example config file for supervisord once you get that installed. In my case this was located under /etc/supervisor/conf.d/ on my raspberry pi. Change the paths and log files names as you need.

command=python3 -u /var/www/mudpi/

You can then control your program through supervisor using the supervisorctl. You will need to make note of the program name you specificed in your supervisor config. In the example provided above the name is mudpi. You can then use the following commands to start, stop and restart your program through supervisor.

supervisorctl start mudpi
supervisorctl restart mudpi
supervisorctl stop mudpi
Getting Started with a Raspberry Pi from Scratch
Preparing the SD Card 4:02
Booting Up & Configuring Raspbian 4:48
SSH and SSH Keys (Video Coming Soon)
Install Redis on Raspberry Pi from Compiled Source (Video Coming Soon)
Updating Python on Raspbian & Installing Useful Packages (Video Coming Soon)