This project is read-only.

Configure a Development Environment

In this section, you will learn how to set up a development computer to work with Lab of Things, and get started with some basic operations and commands.

Contents

Prerequisites

Get the Source Code

Build and Run the Platform

Run the Hub

Open_the_Dashboard

Reset your Configuration

Open an Elevated Command Prompt

Console Commands

Prerequisites

In order to build the HomeOS solution, you need to install the following software:

When launching for the first time, be sure to select the Web Developer Tools option. For more information, see Visual Studio Settings).  Note: If you are using the 2013 version, you will be prompted to upgrade two C++ projects (WebCamLib and SmartRecorder). Check both projects to be upgraded to 2013 mode. 

Note:  if you just want to run the HomeOS libraries on a Windows machine (for example, for a study deployment), the only thing you may need from the above list is the driver for the Z-Wave dongles (if you are using Z-Wave devices)

Get the Source Code

  1. Go to https://labofthings.codeplex.com/
  2. Click the Source Code tab.
  3. Within the Source Code section you can get the source code by Git clone, or by downloading the zipped source files.

Build and Debug the Platform

Follow these steps to build and debug the platform. The command-line argument tells the platform which configuration file to use. For testing, and to follow through the tutorials, DummyConfig is used. In actual operation you will need to update this setting to whichever configuration is appropriate.

    1. Launch Visual Studio as an administrator (right-click the program icon or shortcut, and then click Run as administrator).
    2. In Visual Studio, select File, Open, Project/Solution and open LabOfThings/Hub/Core.sln (within the source code folder on your local computer).
    3. In Solution Explorer expand the Platform folder, then right-click the Platform project and select Set as StartUp Project.
    4. In Solution Explorer, right-click the Platform project and select Properties.
    5. Click the Debug tab.
    6. Under Start Options, Command line arguments, enter the following:

      -c ..\..\Configs\DummyConfig -l stdout -p false

    7. From the Build menu, select Build Solution (or press F6).
    8. Now would be a good time to set a breakpoint or two.
    9. From the Debug menu, select Debug (or press F5).

Note—Always build the main solution (Core.sln) first, as this creates the Output folder which contains the binaries required to build other app or driver solutions.

Run the Hub

Follow these steps to run the hub under normal operation.

  1. Open an elevated command prompt.
  2. Navigate to \Hub\output\.
  3. Run startplatform.bat. The console will display messages for the various services, as well as errors (if there are any). When the platform is ready, you will see the message Waiting for commands.
  4. To get help for commands, type help.
  5. To stop the platform, type exit at the prompt.

Open the Dashboard

The dashboard is a web page where users can select and configure devices, and make other hub configuration settings. Once the hub is running, you can access the dashboard using a web browser.

  • In the browser of your choice, navigate to: http://localhost:51430/guiweb/.

Reset your Configuration

If you'd like to reset to the default configuration (due to strange behavior, bugs, etc.) you can run reset.bat.

  1. Open an elevated command prompt.
  2. Navigate to \Hub\output\.
  3. Run reset.bat [name of config that was used].
  4. Build the HomeOS solution (resetting will delete the output folder).

Open an Elevated Command Prompt

  1. Open Start by swiping in from the right edge of the screen (or if you're using a mouse, pointing to the upper-right corner of the screen and moving the mouse pointer down), and then tapping or clicking Start.
  2. Type cmd, then right-click or press and hold on Command Prompt.
  3. At the bottom of the screen, click Run as administrator.

Or

  • If you're using a keyboard with Windows 8, you can open an elevated command prompt from the Power User Menu. Just press Windows + X and then click on Command Prompt (Admin). Click Yes in the User Account Control message that appears.

Console Commands

When the platform is running, you can run the following commands by typing them at the console prompt within the console or PowerShell window that you used to launch the platform.

Command

Description

show alladdins

To show all AddIns that are available, loaded, and ready to start as modules. AddInToken names are same as binary names.

startmodule {friendlyName} {binaryName}

Command to start a module from binary called binaryName with a friendly name assigned as friendlyName

show modules

Command to dispplay currently running modules and their secrets.

show modulesstates

Command to dispplay currently what state running modules are in.

show resourceusage

Command to display CPU and memory consumption of running modules.

show ports

Command to display ports exported by currently running modules.

show wifinets

Command to display currenlty available wifi networks.

stopmodule {secret}

Command to stop module with given secret.

Exit

Command to quit all modules and HomeOS platform.

Run homeos.hub.platform.exe -? to get a list of switches.

Switch

Description

-?

Display the help message.

-l

Set log file name ('-' for stdout).

-c

Set the configuration directory to use.

-r

Running Mode.

-p false

Turn off policy enforcement.

 

Last edited Oct 20, 2015 at 12:38 AM by dannyh206, version 23

Comments

No comments yet.