/HomeCTRL

A Raspberry Pi project to control 433MHz wireless relays.

Primary LanguagePHP

HomeCTRL

A Raspberry Pi project to control 433MHz wireless relays.

This system is based on a tutorial from Tweaker WeeJeWel. You can find his tutorial here (Dutch).

How to use HomeCTRL

  1. Follow the steps in the tutorial above

  2. Install PHP, Apache and MySQL (you can use this tutorial)

  3. Create a MySQL database (you can use this tutorial)

  4. Make sure Apache/PHP has the sufficient rights to access the GPIO pins by editing the sudo'ers:

    • Open the terminal or login in via SSH

    • type "sudo visudo"

    • if you want to play it secure:

      • add on the end of the file the following lines and replace /path/to/lights/folder with the path where you have compiled the scripts:
      www-data raspberrypi=NOPASSWD: /path/to/lights/folder/./
      www-data raspberrypi=NOPASSWD: /opt/vc/bin/./
      www-data raspberrypi=NOPASSWD: /sbin/iwconfig
    • if you don't want to play it secure:

      • add on the end of the file this line:
      www-data ALL=(ALL) NOPASSWD: ALL
    • save it with pressing CTRL + X and then pressing Y

  5. Upload the HomeCTRL files to the www folder (/var/www/ unless set otherwise)

  6. Make sure your files have the right permissions by chmod:

    sudo chmod -R 755 /var/www

  7. Edit the config file in /includes/config.php and fill in your settings

  8. Go to your favorite browser and type in the ip address of your Pi. It should all work now!