Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
FoR SMartServer 3.3 and prior releases, the LOCATIONS widget is called the Map Widget.
Info

For SmartServer 3.4 - 3.6 releases, see Defining Contexts (Release 3.4 - 3.6)

For SmartServer 3.3 and prior releases, see Defining Contexts (Release 3.3 and Prior)

You can create contexts to organize devices within the SmartServer IoT to mirror their locations within the physical site to facilitate effective system planning and navigation. A context is a digital representation of a real world region, area, or space. You will use the CMS Planning widget (introduced in SmartServer 2.8) to view, create, organize, edit, and delete contextsOther CMS widgets use the context information to organize your devices by the contexts you define. For example, you can organize sequence of operations, dashboards, and connections by contexts. See the SmartServer IoT Node-RED Tutorial for a getting started tutorial on creating a sequence of operation and applying it to a context within the system.

For each context you create, you select a context type which can be a region, campus, building, floor, room, or area. A campus may be a region, such as Northern California, a site such as the Olympic Village, or a campus such as the University of California. An area may, for example, be an area in a campus, such as a parking lot or street, or an area on a floor such as a VAV zone. An area can also be created within a region. You can associate other system entities such as datapoints, devices and users with these contexts to provide a physical location reference to these entities.  For example, you can use contexts to identify select specific devices or user interfaces such as the following:

  1. All temperature sensors in an area
  2. All the Node-RED sequences that connect temperature sensors in an area to the VAV controller in the area
  3. All the analytics dashboards showing device status for a campus

...

If you set or change your SmartServer's location by assigning a context, or by manually setting the location, then the SmartServer's timezone may also be changed accordingly. Changing the SmartServer's timezone does not affect the SmartServer's location. 

This topic consists of the following sections:

...

  1. All contexts types (except area context) are hierarchical and a device belonging to a context also belongs to its parent contexts.
  2. Area contexts are the exception and are location-based. With SmartServer 4.2 and higher, devices within an area belong to that area, as well as any other context it is assigned to.
  3. Area contexts can exist in a region, campus, or floor context where an area can physically be defined/drawn.
  4. The location of a campus, region, area within a region or a campus, and a building is defined on the map by clicking the Pick Geoposition button () and using the polygon tool.
  5. Floor, rooms, and areas are represented as a shape on an imported floor plan. If the area is the child of a region, then you have to define the area on the map by clicking the Pick Geoposition button () and using the polygon tool.

The Planning widget is used to create contexts and also to assign devices to specific contexts. It is encouraged that all workflow begin with defining context before devices are provisioned if the project requires mapping devices to a physical site.

...

With SmartServer 3.

...

4 and higher, you can clear locations for a device

...

by unassigning the the device

...

from a context. See Viewing and Managing Devices Assigned to a Context below. With SmartServer 3.3 or prior, you can clear locations for a device

...

, which causes the

...

device

...

to be unassigned from any contexts and removes it from the map. See Clearing Device Location in Configure Your SmartServer (Release 3.3 and Prior).

Contexts are not supported in Independent Management Mode (IMM) using the IzoT Net Export (iNex) tool. Running the iNex tool deletes devices and then re-adds them in the SmartServer CMS, which causes the context assignments to be removed.

Creating a Context

...

The CMS creates a top-level World context by default that includes the Earth's surface. A user with suitable permissions can create campus, building, or area contexts directly in the World context, and can also create segment controllers and edge devices directly in the World context. This may be used, for example, for outdoor lighting systems where segment controllers and lighting controllers may be defined directly in the World context without a campus, building, or area. Alternatively, this may be used to create an area context for a region, which in turn contains segment controllers and lighting controllers for an outdoor lighting system.

Region Context

To create a region context, perform the following steps:

  1. Click the Create Context button () on the Planning widget.



    The Create Context view appears.




  2. Enter the context parameters as appropriate, including:

    • Name – name for the region.
    • Type  Region. This type is the parent context that houses all other types of contexts and can contain campus, building, and area contexts as children. It is the highest level entity in the context hierarchy. This type supports four geolocation latitude/longitude coordinates.
    • Description – optional description.
    • Import Image – allows you to optionally import an image.
    • Custom Fields (Tag / Value) – optional tag/value pairs.



  3. Click the Pick Geoposition button () to set the geolocation.

    The Pick Geoposition view opens.



  4. Use the rectangle tool ( Image Added ) or the polygon tool ( Image RemovedImage Added ) to define the area on the map.

    InfotitleZoom in / out on map

     

    Image Modified Use the button to zoom in and the button to zoom out on the map. You can modify the geoposition by first clicking the Edit button (Image Modified), and then clicking and dragging the handles or marker. Save or cancel edits by selecting the appropriate option Image Modified.




  5. Click OK

    The Create Context view reappears.



  6. Optionally, import an image of the area.



  7. Click Save.

    The Planning widget appears with the region you created.

...

  1. Hover over the region context and select the Create Child Context button ().



    The Create Child Context view appears.




  2. Enter the context parameters as appropriate, including:

    • Name – name for the campus.
    • Type  Campus. This type is the parent context that houses other types of contexts and can contain only building and area contexts as children. It defines a physical facility and is comprised of multiple buildings. This type supports four geolocation latitude/longitude coordinates.
    • Description – optional description. 
    • Import Image – allows you to optionally import an image.
    • Custom Fields (Tag / Value) – optional tag/value pairs.



  3. Click the Pick Geoposition button () to set the geolocation.

    The Pick Geoposition view opens.

    InfoThe

     The region you created will appear on the map where the area was defined.




  4. Use the rectangle tool (  ) to define the area on the map.

    InfotitleZoom in / out on map



    Image Modified Use the button to zoom in and the button to zoom out on the map. You can modify the geoposition by first clicking the Edit button (Image Modified), and then clicking and dragging the handles or marker. Save or cancel edits by selecting the appropriate option Image Modified.




  5. Click OK

    The Create Child Context view reappears.



  6. Optionally, import an image of the area.



  7. Click Save.

    The Planning widget appears with the campus you created.

...

  1. Hover over the campus context and select the Create Child Context button ().



    The Create Child Context view appears.



  2. Enter the context parameters as appropriate, including:

    • Name – name for the building.
    • Type  Building. This type is the next level of hierarchy after campus that contains only Floor and Area context types. It defines a physical building and is comprised of one or more floors. This type supports single geolocation latitude/longitude coordinates and street address.
    • Description – optional description.



  3. Click the Pick Geoposition button ().

    The Pick Geoposition view appears.



  4. Use the pentagon polygon tool (  ) to define the area on the map.

    info


    titleZoom in / out on map


    Image Modified Use the button to zoom in and the button to zoom out on the map. You can modify the geoposition by first clicking the Edit button (Image Modified), and then clicking and dragging the handles or marker. Save or cancel edits by selecting the appropriate option Image Modified.




  5. Click OK

    The Create Child Context view appears.



  6. Click Save.

    The Planning widget appears with the building you created.



  7. To optionally import an image of the building, hover over the building context and select the Edit button ().



    The Edit Child Context view appears.



  8. Optionally, import the building image by clicking the Import Image area and selecting the image from your computer.



  9. Optionally, set the Base Point: x / y reference for measuring distances and positioning contexts and devices in relation to the drawing. The base point is specified as the pixel x,y coordinates of the starting point of the drawing coordinate system. The default base point is 0, 0 representing the upper-left point, which is the first point in the image. For the building context, this field is not used for calculations.

  10. Optionally, set the True North Angle, which is specified as true north angle - project north angle. That is, if the project north angle is oriented straight up, and with that orientation true north is 90 degrees, then the angle to true north is 90 (90 - 0). The default true north angle is 0 degrees. This value may be fractional. For the building context, this field is not used for calculations.

  11. Optionally, set the Drawing Scale, which is the number of pixels per linear meter (number of pixels / linear meters). This value may be fractional. The default is 3 pixels per meter. For the building context, this field is not used for calculations.
  12. Optionally, set the Geographic Location: Latitude / Longitude, or click the Set Location () button. These fields define the real-world location of the base point in latitude and longitude coordinates. For the building context, this field is not used for calculations.

  13. Click OK. 

    The Create Child Context view appears.



  14. Optionally, set the Custom Fields (Tag / Value) pairs.

  15. Click Update.

    The Planning widget appears with the building you created.

...

  1. Hover over the building context and then select the Create Child Context button ().



    The Create Child Context view appears.



  2. Enter the context parameters as appropriate, including:

    • Name – name for the floor.
    • Type  Floor. This type is the subsequent context type that contains room and area context types and contains the floor plan image. It defines a physical floor in a building and is comprised of one or more rooms. A floor context type nested below the building are geolocated relative to the building context type they are nested below. A floor and room context type nested below the building are geolocated relative to the building context type they are nested below. The room and area context types defined below the floor context type are relative to their position assigned on the floor plan image.
    • Description – optional description.



  3. Click the Import Image Floor area and upload the selected floor plan image from your computer.



  4. Set the Base Point: x / y reference for measuring distances and positioning contexts and devices in relation to the drawing. The base point is specified as the pixel x,y coordinates of the starting point of the drawing coordinate system. The default base point is 0, 0 representing the upper-left point, which is the first point in the image. 

  5. Set the True North Angle, which is specified as true north angle - project north angle. That is, if the project north angle is oriented straight up, and with that orientation true north is 90 degrees, then the angle to true north is 90 (90 - 0). The default true north angle is 0 degrees. This value may be fractional. 

    Example:

    1. Consider the following location on the map (the arrow points to true north): 
      https://www.google.com/maps/@37.2921622,-121.9884976,475m/data=!3m1!1e3




    2. The floor plan appears as follows (the arrow points to true north):



    3. Measure the angle (green arrow) between true north (red arrow) and current "north" (black line).

      Info
      titleMeasuring the True North Angle
      Always

       Always calculate the true north angle in a counter-clockwise direction.




      For this example, the true north value is 132.25 degrees.

  6. Set the Drawing Scale, which is the number of pixels per linear meter (number of pixels / linear meters). This value may be fractional. The default is 3 pixels per meter. 

    Example:

    1. Measure the size of the building (360.20m for this example).



    2. Determine the pixel size of the image (662 for this example).

      Info

       For a Windows PC, the pixel size is displayed with the image file.

      For a Mac, right-click the image file and select Get Info.



    3. Calculate the drawing scale.

      For this example: 662 / 360.20 = 1.84 pixels per meter.
  7. Set the Geographic Location: Latitude / Longitude, or click the Set Location () button. These fields define the real-world location of the base point in latitude and longitude coordinates. 



    1. If you click the Set Location button, then the following view appears:



    2. Zoom in on the map to set the building location. The latitude and longitude fields are set based on the building coordinates.

      InfotitleZoom in / out on map



      Image Modified Use the button to zoom in and the button to zoom out on the map. You can modify the geoposition by first clicking the Edit button (Image Modified), and then clicking and dragging the handles or marker. Save or cancel edits by selecting the appropriate option Image Modified.




  8. Optionally, set the Custom Fields (Tag / Value) pairs.

  9. Click Save.

    The Planning widget appears with the floor you created.

...

  1. Hover over the floor context and select the Create Child Context button ().



    The Create Child Context view appears.




  2. Enter the context parameters as appropriate, including:

    • Name – name for the room.
    • Type  Room. This type defines a physical room entity in a building and is comprised of multiple areas. Or select Area  This type is a free context defined by a polygon on a campus or a floor. Areas can intersect each other and other contexts. All devices that fall within an area belong to that area. It defines the smallest unit of a context that represents a small area in the physical world. Area contexts can be nested below any other context type and are always relative to the parent context. 
    • Select color – use the color palette to select the color for the area definition.



  3. Use the pentagon polygon tool (  ) to define the area.



  4. Click Save.

    The new room / area child context appears on the Planning widget.
    Image Removed

...

  1.  If a physical area for the context is not defined, an indicator (Image Modified) will appear. Use the Edit feature for this context to define the physical area.

    Image Added

Importing a Context

To import a context, see Importing and Exporting SmartServer Configuration Files

Importing a context is not available for SmartServer 4.0. 

Exporting a Context

To export a context, click the Export button () on the Planning widget. You can also export contexts using the Import/Export button (Image Added). See Importing and Exporting SmartServer Configuration Files

A CSV file is created and saved onto your computer. This file contains the following information:

  • Id – identifier used to build the context hierarchy (e.g., floor in Parent Id contains the value of the building id, building refers to campus, and campus refers to world).
  • Name – name of the context.
  • Description – (optional) description of the context.
  • Image – (optional) image file.
  • Image Type – if an image file is supplied, then this column defines the file type.
  • True North Angle – (optional) specifies true north angle - project north angle. That is, if the project north angle is oriented straight up, and with that orientation true north is 90 degrees, then the angle to true north is 90 (90 - 0). The default true north angle is 0 degrees. This value may be fractional. For the building context, this field is not used for calculations.
  • Image Latitude / Image Longitude – (optional) defined the real-world location of the base point in latitude and longitude coordinates. For the building context, this field is not used for calculations.
  • Base Point X / Base Point Y – (optional) reference for measuring distances and positioning contexts and devices in relation to the drawing. The base point is specified as the pixel x,y coordinates of the starting point of the drawing coordinate system. The default base point is 0, 0 representing the upper-left point, which is the first point in the image. For the building context, this field is not used for calculations.
  • Drawing Scale – (optional) specifies the number of pixels per linear meter (number of pixels / linear meters). The default is 3 pixels per meter. This value may be fractional. For the building context, this field is not used for calculations.
  • Location – (optional) defines the points of the context polygon. For a room and area on a floor, it is represented by x, y points on a drawing. For all other context types, it is represented by latitude and longitude. 
  • Type – defines the type of context (e.g., world, region, campus, building, floor, room, or area).
  • Enabled – defines context availability. Devices cannot be assigned to disabled contexts. Currently, all the contexts enabled by default and are not configurable.
  • Custom Fields – (optional) tag/value pairs. There are two reserved tags: 
    • color – for the color of rooms and areas on floors
    • floor number – for floors
  • Parent Id – identifier used to build the context hierarchy (e.g., floor in Parent Id contains the value of the building id, building refers to campus, and campus refers to world).

...

  1. Hover over the context name and select the Edit button ().



    The Edit view appears.



  2. Edit the context parameters as needed.  

    InfoType cannot

    A context type cannot be changed once it has been defined

    for a context

    .

  3. Click Update to save your changes.

Cloning a Context

The Clone (Image Removed) feature is not available for SmartServer 4.0.

To clone a context, perform the following steps:

  1. Hover over the context that you want to clone (room context called Entry in this example).

    Image Added

  2. Select the Clone button (Image Added).

    A copy of the context appears in an edit view.


    Image Added

  3. Make any necessary context edits and click Clone

    A copy of the context appears in the Planning widget.

Image Added

Removing a Context

To remove a context, hover over the context name and select the Remove button ().

...

Contexts can also be shown in a map view.

...

in a map view.

Viewing Context Dashboard

...

In order for the dashboard to appear, the flow must be enabled in the Sequencing widget. See SmartServer IoT Node-RED Tutorial for more information about getting started with the Sequencing widget and Node-RED flows and dashboards.
To view a context dashboard, hover over over the context name and select the View Context Dashboard button (). If the context is assigned to a flow that utilizes Node-RED dashboards, then the Node-RED dashboard view will appear as shown in the example below. If not, then a Dashboard tab not found confirmation message message will appear.

...

.

Viewing and Managing Devices Assigned to a Context

...

The context appears in the Locations widget.

See /wiki/spaces/TEMP/pages/116654081 Working with Maps for more information about how to use the Locations widget.

...