After you’ve written and tested your Lab of Things application you are ready to move to “Deployment.” By Deployment we mean creating a large number of home hubs with a configuration you want that run reliably (e.g. robust to computer reboots).  For deployment, we assume the hub computer does not have Visual Studio installed on it.

This page will describe steps to follow when you are ready to deploy a study using the running example of "Simple Study 1 (SS1),  a test study we deployed at Microsoft Research.  In SS1 we gave 8 households a hub computer (Acer Aspire One netbook), Aeon Labs Z-Stick, a zwave door-window sensor and multi-sensor.  For two weeks we collected data using the Sensor application which logs data from sensors. 

Deployment has 6 high-level steps:

  1. Get an Organization ID (OrgID):  You will use this to login into the management portal and monitor the hubs in your study.
  2. Package the Code: Package the output folder and some configuration information from the computer where you have been developing (with Visual Studio). Eventually this could be creating a nifty .msi, but for now we will create a zip file that can be manually copied.
  3. Configure the Hub: Configure each Hub computer.  If participants will use their own computer as a hub you will need to send them these steps.
  4. Install the Hub & Sensors:  At the deployment location, either you or your participants will use the Dashboard UI to put the hub on the wireless, configure the Home ID, setup the sensors etc.  In SS1, we created instructions and participant's setup their own hubs and sensors (so we didn't have to visit the house).
  5. Monitor your Deployed Hubs: The Lab of Things Remote Management Portal helps you monitor the hubs in your study and can be configured to send email alerts to you if a hub in your study goes offline.
  6. Analyze the Data collected:  A key part of the study is logging data, for example from the sensors or how participants interact with an application you built. If you use Bolt to log the data you can use the data export tool to export data for lightweight checks and deeper analysis.

Get an Organization ID

Lab of Things has a management portal which lists all hubs that are part of your organization and their status. For example, showing the last time a heartbeat was received from each hub so you can see if hubs are still running.  You can also set up alerts to be notified if a hub is not reporting heartbeats.  Documentation for the remote management portal describes how you sign-up for an OrgID at https://www.lab-of-things.net/.   

Package the Code
To create the a zip file of the code that will be copied to each hub, we assume you have Configured a Development Environment and if necessary developed an application relevant to your study (see Create an App) or written scouts or drivers. For simple logging studies like SS1, we used the standard "Sensor" application and z-wave devices already supported by the platform so we only needed to set the appropriate fields in the config files.

The config directory in output\Configs\Config has several xml files that describe how the platform is configured. Some of these you will have changed during development. The Lab of Things configurations documentation describes all the configuration files.  Key files and settings for your deployment are:

Settings.xml

  •  <Param Name="OrgId" Value="" />
  •  <Param Name="StudyId" Value="Default" />
  •  <Param Name="DataStoreAccountName" Value="" />
  • <Param Name="DataStoreAccountKey" Value="" />

These you will want to configure using your OrgId, the name of your study (hubs in different studies are listed separately in the management portal) and then your Azure DataStore account name and value so that data created by the platform and applications goes to your account. 

Scouts.xml

  • Make sure Scouts.xml has the scouts needs for the technology in your study.  If you are using the computer you developed on then likely scouts already has been modified if needed.

Once these configurations are setup, first delete everything under \output\data to remove any logging you have saved while testing.  Then create a zip of the output folder.  This zip will get copied to hubs. (After the first install you will be able to use the online update tool to update hubs remotely). 

Configure the Hub

Any computer you use as a hub needs to have the following pre-requisites.

  • Windows 7, 8, 8.1, ideally with a wireless card.  If you use a desktop computer then you will need to connect it via wire to the wireless router in the home.
  • Microsoft .NET Framework 4.5 (Check in Add/Remove programs to see if already installed)
  • Microsoft Sync Framework 2.1 Redistributable package Get X86 ONLY - Regardless of your computer type.  Name of file is SyncSDK-v2.1-x86-ENU.msi 
  • If you are using Zwave, install Silicon labs USB to UART driver.

On our hubs we also modify the following settings to keep the computer running all the time and make it robust to reboots:

  1. Create a local user account with administrator privileges.  We put the same account on all our hubs.
  2. Setup the computer to not sleep or hibernate when plugged in or the lid is shut. 
    1. Go to the power options dialog.  Click "change when the computer sleeps" on the left side.  Change the options for put the computer to sleep when plugged in to "Never". 
    2. Next click advanced settings and adjust the options for "Power buttons and Lid".  Change the Lid close action when on plugged in to "do nothing".
    3. In the same advanced setting dialog, under sleep, change the "Hibernate after" to "Never" when plugged in.
  3. Setup auto-login.  If for any reason the computer reboots we want to login.  Note, if you do this it is important for that the hub will be in a secure place because it will be automatically logged in.  At the Metro UI start screen type netplwiz and hit enter.  Unclick the option "Users must enter a user name and password to use this computer" and then follow instructions.   Reboot the machine to make sure it auto-logs in.
  4. Depending on the duration of the study, you may want to turn off automatic updates.  If you are using zwave sensors, we have found it very important to turn off updates because when the computer reboots sometimes the zwave dongle is not recognized.  This is easily fixed if it happens by unplugging the zwave dongle, waiting a few seconds and replugging it in.  

Next, get your code running on the hub.

  1. Copy the .zip file you created in the "Package the Code" step to your hub computer.
  2. Unzip it onto the computer.  For SS1, I placed the code into C:\SS1 
  3. Open a command prompt as administrator.  To do this from modern desktop type command prompt, right click and choose run as administrator.
  4. In the command prompt, navigate to the location of code and go to the output directory.  For SS1, this was C:\SS1\output
  5. Type "startwatchdog.bat" to run the bat file.  This will install watchdog and start the Platform.  Watchdog is a small service that constantly checks to see if the Platform is running and starts Platform if it not running.
  6. Wait a couple of minute and then open UI Dashboard link in browser.  There is a shortcut in the output directory, and the link is http://localhost:51430/index.html .  You should see the setup page. (picture coming soon)

 Final steps that help with ease of use:

  1. Copy the Dashboard UI shortcut from the output folder to the desktop of the computer, so it is one click to open the UI in the browser.
  2. Make the Dashboard UI link the IE homepage.  (Settings-> Internet Options -> Home page)
  3. Put IE into the startup folder so it opens by default.  Drag the icon into C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Install the Hub & Sensors in Homes
The next step is getting the hub and sensors appropriate for your study installed in people's houses.  This can be done either by visiting people in their home and doing the install yourself or by giving/sending people the hardware and instructions and having them install (Participant Install).  In Simple Study 1, we used Participant Install.  Participants came to my office for 15 minutes and I showed them how to pair Zwave sensors using the UI.  They then took home an instruction sheet, a bag containing the hub, Zwave dongle, and sensors.  Using the Remote Management Portal, I could see when they successfully installed the hub and follow-up with the two people whose hubs didn't show up in Remote Management Portal as expected to debug install problems. For example, in one case the hub didn't get placed on home wireless properly which was easily fixed by the participant.

The Hub and sensors setup information you give to participants will depend on your study.  Here are two resources to help you prepare your instructions.

  1. We gave this instruction sheet to participants in SS1.
  2. The HomeOS Dashboard UI instructions from the Getting Started Guide.

We have considerable experience conducting field studies so if you have questions please post them on the discussion page and we will respond.

 

Last edited Feb 28, 2015 at 2:50 AM by ajbernheimbrush, version 21

Comments

No comments yet.