Home Automation

 

ActiveHome Pro SDK Sample Project
PHP ActiveHome Controller
Description

Send commands to your X10 system from anywhere in the world! This project uses PHP on the Apache Web Server to communicate with the ActiveHome Command Line interface and send X10 commands. You can easily expand on the concepts in this project to build your own X10 network services and controls: Use any PC in your house as a lighting controller, or control your lights when you're away from home

Notes

This project was run on Windows XP with Apache, Perl, and PHP installed. If you don't have these already, you can set them up in a matter of minutes (especially if you have a fast Internet connection). Here's what we did:

  1. Download Apache from the Apache web site. Select the 1.3.31 installer for Windows (Win32 self-extracting binary).
  2. Download PHP from the PHP web site. Choose the PHP 4 full install (not Windows IIS version); it's the PHP 4.3.9 zip package.
  3. Extract the PHP package to C:\PHP. If you want to change the directory, you'll need to modify the PHP file in the example to point to the right location.
  4. Run the Apache installer, and install with the default settings for the complete install. Make sure you read the installer documentation.
  5. Open the Apache httpd.conf file. You can access this from the Start Menu: Programs | Apache HTTP Server | Configure Apache Server | Edit the Apache httpd.conf Configuration File.
  6. Add the following lines to the end of the httpd.conf file and save:
    #PHP
    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php
    
    # For PHP 4
    Action application/x-httpd-php "/php/php.exe"
    
    SetEnv PHPRC C:/php
    					
  7. Restart Apache. From the Start Menu: Programs | Apache HTTP Server | Control Apache Server | Restart.
  8. Copy ahcmd.exe (from the SDK installation, or in Program Files\Common Files\X10\Common\), ahp.php and the art directory into Program Files\Apache Group\Apache\htdocs\. You can also edit ahp.php to point to ahcmd.exe in a different location.

Once these steps are done, you'll be able to access ahp.php through your webserver, and control lights from whereever people can access your server.

If you are using Windows XP Service Pack 2, or have the Windows Firewall or other Firewall enabled, you'll need to change your firewall settings to allow TCP/HTTP connections on port 80 in order for other computers to access this page. To change the settings in Windows Firewall, follow these steps:
  1. Open Control Panel.
  2. Open the entry for Windows Firewall.
  3. Click the Exceptions tab.
  4. Click "Add Port."
  5. Enter "HTTP" for the name and "80" for the port. Make sure that TCP is selected.
  6. Click OK and you're done!
Requirements

Requires CM15A, X10 device service, the ActiveHome Scripting Interface, Apache 1.3.31, and PHP4 (other version of Apache and PHP may work with slightly different configuration) — see above.

Source Package

phpcontrol.zip

Source Contents List

Additional  Information for ActiveHome Pro
Home | Accessories | Video | Comparison | Compatibility | FAQ | Feedback | Forums
Macro Designer | Interface | Timer Designer | Manual | News | SDK | Site Map
Order online or call anytime, 800-675-3044!
 

Suggestion Box

Please help us improve our site! If this page contains incorrect information, missing details, or other problems, please use the form below to let us know. If you need help with an order, please call 800-675-3044 for Customer Service.
Please check any of the following boxes that apply:
This page doesn't fully explain how the product works. This page takes too long to load.
This page has incorrect product information. This page has a software bug in it.
This page contains typographical errors.

Comments or Examples:
Examples: Missing or incorrect information such as prices, component parts, typos, inaccuracies, etc.

If you would like a response, enter your email address: (Optional)

If you would like us to call you, please enter your phone number and a representative will call you as soon as possible: (Optional)

 

*Prices are posted in $US dollars ONLY! Offers for FREE FEDEX Ground shipping valid ONLY in the United States of America. Note: Some orders may be shipped via USPS Priority Mail. Orders to Canada have a $10 Shipping & Handling Charge and will have a 5% goods & services tax (GST #10575 8056 RT0001) added to the order. Prices may change without notice. X10 accepts only credit card payment (VISA, MasterCard, Discover and American Express), for both online and telephone orders. If you would like Express Shipping please call 1-800-675-3044. X10 reserves the right to discontinue or change the posted promotional offers at any time. Technical support is available only to customers in the US and Canada.
X10 © 2006 pages are copyrighted and may not be reproduced in any form without the expressed written consent of X10.