UPDATE: This log is outdated. See the new Preparing the Raspberry Pi for new details.
A Raspberry Pi 3 is the brain of this project. The Pi needs a simple os, python, apache, and wsgi-python. I do not describe here all the necessary steps, but if you need to know more write a comment and I will offer more details.
- I installed the system headless (without screen, keyboard, and mouse). I downloaded the official Raspbian Jessie. I installed the image to the SD card with the dd command.
- Using a linux system I mounted the micro SD card, so I could see the linux partitions. Then I looked for the necessary files in the SD card to set the wifi ssid and password, and to force a static ip. This comment can help a lot. (It is important to notice the new /etc/dhcpcd.conf file.)
- So I wired up the Pi, and I could easily ssh to it. Remote control is completed.
- I installed Apache2 with all the defaults. (One could choose other webserver, but I got used to the apache.)
- Python is already installed in Raspbian Jessie, but the wsgi module is needed to make python and apache work together. After the easy install of wsgi module, the apache conf should have been changed. This is the configuration which works for me:
<VirtualHost *:80>
WSGIScriptAlias /knockknock /var/www/cgi/knockknock.wsgi
<Directory /var/www/cgi/>
Loglevel info
Order allow, deny
Allow from all
</Directory>
</VirtualHost>
- To use the notification with external system like IFTTT.com, the RPi needs a static IP, port forwarding in the router, static external IP / dynamic dns.
UPDATE:
- The Code v0.2 (coming soon) uses the pyzmq module. To install that you need python-dev also.
sudo apt-get install python-dev sudo apt-get install libzmq3-dev pip install pyzmq
If you need further information please comment here. About the python codes I will write an other log later on.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.