README : jHomeNet server Released : February 11, 2007 Version : 0.2 Written by : Dave Irwin (david.irwin at jhu.edu) _________________________________________________________________________________ OVERVIEW jHomeNet server is an application developed to help manage and control a collection of hardware sensors and devices. The hardware includes Dallas Semiconductor 1-Wire and X-10 sensors and devices. The software can be used as a home-automation system. This release is considered an alpha release of the software and as such is still under a considerable amount of development. Expect major changes in the API between this and future releases of the jHomenet server. Not all features are implemented in this release. This release also does not contain all the necessary documentation. This release was published in order to provide a preview to users of features in development. The distribution includes the following folder and files: o conf contains configuration files o docs contains documentation including the API o images contains any necessary images o lib contains all the necessary library files o logs contains any log files produced by the jHomenet server o persistence contains any file based persistence files o plugins contains any jHomenet server plugins o resources contains any other resource files o src source tree In addition, the current distribution also includes an Apache Ant build file (build.xml) for building the application from the source and a Windows batch files for running the application. _________________________________________________________________________________ GENERAL INFORMATION Refer to the jHomenet Sourceforge project website (http://jhomenet.sourceforge.net/) for general information about the jHomenet suite of applications. To post a comment or a request for help, visit the following website: https://sourceforge.net/forum/?group_id=140953 To report a bug, use the bug submit form found on the Sourceforge website at the following address: https://sourceforge.net/tracker/?func=add&group_id=140953&atid=747884. _________________________________________________________________________________ RUNTIME ENVIRONMENT Several sections of the software has been developed using Sun's JDK 1.5 software development kit features. As such, it's required that Sun's latest 1.5 compatible JRE be installed to run the applications, and Sun's lastest 1.5 compatible SDK be installed to for development. Development of the current version of the jHomenet server has used JDK 1.6. In order to make use of the included build files, a copy of Apache Ant should be installed and properly configured. A copy of Ant can be freely downloaded from the following site: http://ant.apache.org/. Eclipse 3.1 was used for development along with Ant version 1.6.1. _________________________________________________________________________________ SOURCE COMPILING The project comes with an Apache Ant build.xml file for use in compiling the source. To build the Java sources, at the command line type: jhomenet-server-[versionid]> ant This builds the sources and places the compiled class files in the build\classes folder. The process also copies the necessary configuration, library, and image files to the correct folder within the build\classes root directory. The current distribution does not include pre-compiled binary class files. If changes are made in the jhomenet-commons or jhomenet-ui libraries, they will need to be built and the binary library Jar files placed in the jhomenet-server lib folder before building the jhomenet-server. The table below summarizes the jhomenet package dependencies: Package jHomenet Dependency ------- ------------------- jhomenet-commons None jhomenet-ui jhomenet-commons jhomenet-server jhomenet-commons, jhomenet-ui Build the jhomenet-commons package first. Then build the jhomenet-ui package. Then build the jhomenet-server package. If no changes are made to the jhomenet-commons or jhomenet-ui packages then they do not need to be rebuilt. Refer to package specific readme files for specific build directions. A Windows batch file (.bat) is included that can be used to build all three jHomeNet packages automatically call fullbuild.bat. Before running the batch file, open the batch file and edit the locations of the jHomeNet commons library folder, the jHomeNet UI library folder, and the jHomeNet server folder. The batch file will spawn a new window for each package build. At the completion of a package build, type 'exit' in the window to continue the full build. The built Jar files will automatically be copied to the jHomeNet server 'lib' folder before the jHomeNet server build.xml file is called. _________________________________________________________________________________ RUNNING THE SERVER ----------------------------------------------------- NOT YET FULL FUNCTIONING IN VERSION 0.2 OF THE SERVER ----------------------------------------------------- Prior to starting the server, a compliant SQL server is required to be running with the necessary database and tables created. The included Ant file contains a target that, along with the Hibernate object definition files, creates the necessary tables. First, create the jHomenet database called "jhomenet". At the command line, type: jhomenet-server-[versionid]> ant init-db to initialize the database with the necessary tables. Note: as of the most recent release, running this target will delete all the contents of the database including any previously registered hardware and sensor responsive plans and responses. ------------------------------------------------ The necessary 1-Wire and X-10 drivers also need to be installed properly prior to running the server. At this point, the system should be properly configured and ready for execution. You can start the server by running one of the included Windows batch files (server.bat or server_jar.bat). At this time, a Linux script is not included. In particular: jhomenet-server-[versionid]> server The server.bat file run from the compiled class files. _________________________________________________________________________________ TESTING THE SERVER The application runs using a default configuration file called jhomenet.cfg.xml located in the \conf directory. This configuration file specifies other configuration files that are to be used to load resources. In particular, jhomenet.cfg.xml file also specifies the hardware configuration file that defines the available hardware types and hardware drivers used. By default, the jhomenet.cfg.xml file defines a hardware_test.cfg.xml file for the hardware configuration. This test hardware configuration file contains dummy hardware definitions. This enables a user to get the server up and running without actually having any 1-Wire or X10 hardware installed and without actually installing any of the 1-Wire and X10 drivers.