This project combines two things:
1. A Windows batch file that prepares an SD card for a Raspberry Pi with wifi SSID and password configured, and the TRIGGERcmd agent authenticated and configured with commands to flip two relays.
2. The TRIGGERcmd feature that uses your Paypal button ID to charge people to run commands. Your customers will scan a QR code with their phones, then pay via PayPal.
You could use this system to charge people to open a door or a gate, or turn on a machine for a period of time.
Steps to setup your Raspberry Pi to flip relays via the Internet:
1. Format your SD card with SD Formatter2. Run setup.bat, and answer the questions:
Before you continue, format your micro SD card with "SD Memory Card Formatter" found here:
https://www.sdcard.org/downloads/formatter
Press any key to continue . . .
Enter the drive letter of your SD card: e
Enter the wifi (SSID) or press enter to use a wired Ethernet connection: mywifi
Enter the wifi password: mywifipassword
Enter a password for the pi user, or press enter for the default (raspberry):
Enter your TRIGGERcmd token: mytriggercmdtoken
3. Put the SD card in your Raspberry Pi and boot it. Wait about 10 minutes until your Raspberry Pi shows up in your https://www.triggercmd.com account.4. Connect your Raspberry Pi to the relay board using these photos: https://www.triggercmd.com/forum/topic/608/raspberry-pi-relay-wiring-photos5. Test the relays by clicking the Trigger buttons for "Door 1" and "Door 2".
Steps to setup a Paywall to charge people to flip the relays:
1. Click the Paywall button for "Door 1"2. Fill in the "Message to payers:" field3. Open a new browser tab and log into your Paypal.com account.4. Go to Account Settings
5. Click Website payments
6. Click the Update link to the right of Instant payment notifications7. Click Edit settings, set the Notification URL to https://www.triggercmd.com/paypalipn, and enable IPN Messages.
8. Go back to Account settings, Website payments, and click Update next to PayPal buttons.9. Click View your saved buttons.
10. Click Create new button11. Select Buy Now, fill in an Item name and a price, and click Create Button
12. Copy your button Code
13. Paste it into Notepad, and copy the button ID.
14. Switch back to your Paywall config tab, and paste the button ID, and click Regenerate Paywall URL.
15. Scan the QR code with your phone to test. You should get a page like this:
16. Click Pay Now and pay yourself. NOTE: You can't use your own PayPal account or even your own email address when you pay by Credit Card.
After you pay, your command should run on your Raspberry Pi which should flip the relay.
Now connect the relay to something worth paying for, post a sign with that QR code, and start making money!
Comments