X10 Control via the

indexadjustmentInternet and Web Development

Nov 13, 2013 (3 years and 6 months ago)

70 views

X10 Control via the
World Wide Web

By Kenneth C. Peterson

GRAND VALLEY STATE
UNIVERSITY

What is this project?


Web interface for X10 home control


Allow control of lights and appliances from
any Internet connected web browser


Display the status of the various devices
being controlled by the system

What is X10?


Remote control of lights and appliances


Requires no additional wiring


Communicates through house wiring


Addressable control modules


Up to 256 modules per household


House code A
-

P and device code 1
-

16


On / Off / Dim functions



Project Goals


Turn lights and appliances on and off & dim
lights remotely


Configurable through the web interface


Work with minimum browser (even Lynx)


Separate hosts for web server and X10
controller


Portable
-

Windows and Linux
environments



Similar Products


Commander X


www.commander
-
x.com


Homeseer


www.keware.com/homeseer.htm

System Components


CM11A X10 Controller


Home Control Server (HCS)


User Interface Servlets

CM11A Interface


Connects to serial port on computer


Transmits commands from computer to X10
devices


Stores macros and timers in memory


Operates macros and timers even when
computer is off


Part of X10 Activehome product

Home Control Server (HCS)


Accessed by User Interface servlets through
RMI


Manages devices, macros, and timers


Maintains status information for the devices
being controlled


Each CM11A interface has a dedicated
HCS

User Interface Servlets


Login Servlet


Manages user authentication


Controller Servlet


Send ON/OFF/DIM commands to devices


Configure Servlet


Enable user to add or delete devices, macros,
and timers

System Operation


Login

System Operation


Login


Choose HCS


System Operation


Login


Choose HCS


Control X10 Devices & Macros

System Operation


Login


Choose HCS


Control X10 Devices & Macros


Configure System


Configuration Menu


System Operation


Login


Choose HCS


Control X10 Devices & Macros


Configure System


Configuration Menu


Add / Delete Items

Main Design Issues


Portability


Both Windows and Linux


Scalability


Expandable to control several locations


Flexibility


Work with minimal user interface client


Communication Technology


Simple to Implement

X10 Technology


Pros


Low initial investment


Easy to implement


Controller had already been purchased


Cons


Reliability is questionable


One
-
way protocol, no confirmation


Limited functionality

Java


Pros


Object Oriented


Portable


Easy to program Servlets


Cons


Relatively slow


Lack of specific hardware support

Servlets


Pros


Provide user interface flexibility


Allow any web
-
enabled browser to be used as a
client


Servlets are easy to program


Cons


Interactive web
-
based user interfaces are
relatively difficult to design


Tomcat Servlet Engine


Pros


Inexpensive (free)


Easy to configure


Also in Java and therefore portable


Cons


Not robust enough for commercial use


Relatively slow when used stand
-
alone (without
Apache or similar web server)

RMI


Pros


Ability to pass objects greatly simplifies system
design


Internet protocols are transparent to software
development


Cons


Not inherently secure

What Was Accomplished


System turns lights on and off using web
control


Web server and HCS run separately,
connected by RMI


Some editing functionality was incorporated
into the project


Username and password authentication

Things Not Accomplished


Ability to execute macros via the web


could not trigger macros via serial port


Ability to add and delete macros and timers


Insufficient time to code


Secure Socket Layer security


Use of the WAP protocol

Lessons Learned


Unexpected snags occur no matter how well
you prepare or know the material.


Should have paid more attention to time
management, both planning and recording.

Additional Experience Gained


Setting up a web application with Tomcat


Designing a user interface for the web


Gained experience incorporating a 3rd party
product into a project.


Dealing with bugs in the product


Insufficient documentation


Reverse engineering

Evaluation


Found working on the project an enjoyable
experience


The project holds enough potential to make
continued development worthwhile

References


X10 Website, Activehome
-

www.X10.com


Java X10 API
-

www.jpeterson.com/rnd


Java Servlets
-

www.javasoft.com/products/servlet/index.html


Tomcat
-

jakarta.apache.org/tomcat/index.html


Java Comm API
-

www.javasoft.com/products/javacomm/index.html


RMI
-

java.sun.com/docs/books/tutorial/rmi/


JHome
-

jhome.sourceforge.net/