====== Basic computer setup ====== * **Get access to the XLab SVN**. Contact Ales Stimec to get a password for Xlab's SVN server. Ales' email address is ales.stimec@xlab.si. At the same time you should also ask for browser and VPN certificates that are used to access the web-based "Engineering GUI" (only the “engineering computer” needs these). * **Download and install an SVN client**, either the basic command line client from http://subversion.tigris.org/ or the more user friendly windows client from http://tortoisesvn.tigris.org/. * **Check out the Giraff+ source code**, for convenience we will check out the entire repository in this tutorial. The adress to the repository is https://giraff.xlab.si/svn/giraff. * **Install Java and Maven**, this can be done with an automatic setup script found in the SVN. Run https://giraff.xlab.si/svn/giraff/home_configuration/automatic_setup/setup.bat to download and install Java and Maven, the script also sets up the environment variables properly. This script does not do anything “special”, it just sets up Java and Maven in a folder called c:\giraff, you can also do this manually using your own folder settings. * **Download and install PCConnect** from Tunstall, you can find the software at the following location: http://188.121.62.132/PCConnectSetup_216V0R1.51.exe. ====== Configuring the sensors on the Connect+ ====== * **Connecting to the VI+ device**, plug in the VI+ device to the power outlet and connect the Tapit adapter to the computer and the VI+. After this has been done, run PCConnect, the software should search for and find the VI+ and you should be presented with the following screen which we will refer to as the “main screen”: {{:giraffplus:2013-10-01_14_43_00-tunstall_pc_connect__model__lifeline_vi_.png?200|}} * If you have both the gray and white VI+, make sure that you don't mix up the transformers since one of them provides AC and the other one DC. * **Configure the sensors on the device**, prepare the sensors which you want to use, then press and hold the green button on the VI+, release the green button when you hear a beep and repeat the procedure once more. After you have done this the VI+ device is in registration mode. This means that you can register sensors on the device by triggering them, for the door contact sensors this is done by putting the magnet part to the universal sensors sensing area. The PIR sensor can be configured similarly by moving in front of it. When all sensors have been set up press the green button once. * The grey VI+ device uses the speaker to tell you when a sensor has been registered, the old white one does not seem to do so. * Note that the PIR sensor does not trigger at each sensed movement, there is some latency after resending an event, thus you might want to put the PIR sensor in such a way that it is not disturbed my movement before this step. * You might want to do this procedure in smaller steps by configuring sensors (with the same type) one at a time, this is because you can not distinguish two different PIR sensors (for instance) in the PCConnect software. * **Verify that the sensors have been registered and define their locations**, first press "Read" in the main window of PCConnect to update the local view of the current configuration, the press "Radio Triggers & Events". You should be presented with the following screen: {{:giraffplus:2013-10-01_14_41_05-radio_triggers_and_events.png?200|}} In this screen each of the sensors that you registered should be shown. You need to configure the location of each of them with the “Location” listbox, choose “Save Trigger in between each sensors”. After you have finished this step press close in the window to go back to the main screen, then press “Write” and choose “Write Only Modified Parameters”. * It might be a good idea to verify that there are no previously configured sensors on the device before doing this configuration step. If there are devices registered simply delete them in the “Radio Triggers & Events” window and “Write” the settings to the VI+. * Make a note of the sensors and their location codes, i.e. 61 and 40 in the figure above, you will need this information later. ====== Configuring the sensors in the GiraffPlus database ====== * While connected to the VPN, and with the browser certificate installed, go to: [[https://10.31.33.18/]], you should be presented with a graphical user interface. * Press “Home” in the “Create” section of the page, name your home to something meaningful and press “Next”. In the following screens you can select authorized organizations and primary users etc., you can hold the CTRL key on the keyboard to select several choices at once. * At the current state this choices are not important since the functionality is not fully implemented. When you get to the “Add” screen add the rooms in which you have placed sensors. When you add a new room you also need to add one or more locations to it and this has to be done before naming your room and pressing “Done”. In the locations screen you will enter a two digit code, this code needs to correspond to the location code in PCConnect. * The location code and the sensor type is used to distinguish between the sensors, thus you can not have two sensors of the same type at the same location. * The room name is not critical to the setup procedure. * Continue until you arrive at the sensors screen, here you choose the type of sensor and the room and location which it is placed in. * When you arrive at the end of the configuration procedure, save the home, you will be presented with a screen that says “”Home configuration saved. Choose a password and enter it into the password box and press done, save the certificate that the browser tries to download, this certificate is used by the middleware to identify the home with the database server. * For convenience you can choose the password “GiraffPlus123”, since that's the password that the middleware is preconfigured to use. ====== Configure and run the middleware ====== * Save the certificate that you downloaded from the engineering GUI in home_configuration\rundir\confadmin in the working copy of the SVN that you checked out. * Move to the home_configuration folder and type: “mvn install -Dmaven.test.skip=true” * Move to home_configuration\giraffplus.tester and type: “mvn pax:run” * Move to home_configuration\giraffplus.tester\runner and type “run” * The middleware should start up and you should see it announce its sensors as JSON data on the “service bus”. This information is visible in the console window. * Trigger a sensor and make sure that it announces the event on the “context bus”. * If the connection fails try checking the COM port that is assigned to the Tapit adapter in the windows device manager. The middleware defaults to COM3, if the com port is different you need to change the com port entry in the “/home_configuration/rundir/confadmin/servicesgiraff.drivers.tunstall.pid.properties” file to reflect this. * If things still does not work, try downgrading the firmware.