Introduction: Remote Control Raspberry PI GPIO Pins Over the Internet

I needed a way to On and Off some solar lights at home.

The way it works is really simple and the great part is you don't need to fiddle with your firewall to port forward the connection to your raspberry pi to control it like most solutions require you to do.

I created Griblinks which is website hosted on my personal domain www.techtinker.co.za whilst developing it at the same time I catered for everyone else who need such a solution. Allot of time went into it to make it user friendly with some security in mind.

Instead of setting up a web server on your Raspberry Pi with a Dyn DNS account and then forward incoming connections to your Raspberry PI griblinks makes it much easier.

After registering with Griblinks you can set the pin status on or off with a toggle button using its simple switch panel. Instead of your raspberry accepting connections it fetches pin statuses from Griblinks which you have set at a click of a button.

Step 1: Step 1: Things You Need and the Setup

The list of hardware is short.
All you need is a Raspberry PI connected to the internet with an LED connected to PIN 18 and GND

Software
As the old saying goes, there are many ways to skin a cat. The only piece of software needed is the Griblinks
gl-rpi-1.00.py script. How you go about getting itonto your raspberry pi operating system is up to you.

In my case I'm using Raspbian and i'm using putty to run commands on it or WinSCP to copy files to it.
You may off coarse boot the pi and download the software straight from raspbian, I my case I only have one monitor and 1 set Keyboard and mouse , using putty and winscp i can manage it via my local lan.



Step 2: Step2: Copy the Griblinks Python Script to the Raspberry Pi

Download, Extract, Edit & Copy the Zip File
After downloading the gl-rpi-1.00.zip archive, unzip it anywhere and copy it somewhere where its easy to find on your raspberry pi.

Once you have copied the script you need to log into GribLinks and copy your device key into the script.

Find the below code in gl-rpi-1.00.py

#Fetch the pinstatuses using your email and security key
url = "http://www.techtinker.co.za/griblinks/getswstatusrpi.php?EMAIL=youremailaddress@emaildomain.com&SECRET=AFD11R0srCUWpHt8jp7j"

Edit it with your own email (Griblinks Login name) and device key.

Note:
You are also able to change the key by regenerating it, but be careful not to change it whilst your Pi is fetching pin statuses when you are not at home where you can update the script.



Step 3: Step3: Run the Script

​After editing the script with your griblinks details navigate to the directory where you copied the script using the terminal and run it.

sudo python gl-rpi-1.00.py

Step 4: Watch the Video for More Information.