Wire the whole thing up via the schematic and add the code to your Pi.
And make sure to install PHP & Apache2 on the Pi. Either Wi-Fi or Ethernet
will work. It's great being able to turn ON the Light as I pull into the Driveway
or from a remote location since I have Port Forwarding turned ON.