7) Upload PHP Scripts
- Download the PHP code here and open it in your text editor.
- Update the values at the top of the file to match your settings:
$idigi_password = ‘YOUR_IDIGI_PASSWORD’; // enter your password here. Consider your options for securing this info.$device_id = ‘00000000-00000000-XXXXXXX-XXXXXXXX’; // XIG device ID (replace the X’s with the device ID from your XIG setup screen)
$hardware_address = ’00:13:a2:00:XX:XX:XX:XX’; // XBee’s Hardware address (replace the X’s so that this value matches your hardware address)
- Save the file and upload it somewhere within your webserver’s document root so that you can access it via a URL.
- Access that URL to turn the lamp on and off using the “set” parameter:
- Drag each of those URLs to your bookmarks bar for convenient access!
Note: When you’ve confirmed that you have it working, you’ll want to take appropriate steps to secure this page so that unauthorized people don’t start messing with your lights! Look into setting up your server for basic authentication if you’re using Apache as your web server.