Integrating a Distance Sensor into a SiteKiosk Online Project

SiteKiosk Online How-To’s

Integrating a Distance Sensor into a SiteKiosk Online Project

5. décembre 2024

This article describes how to integrate a distance sensor into a SiteKiosk Online project. A distance sensor can be used in two different ways in a SiteKiosk Online project:

  • Distance measurement: Depending on the defined distance between the user and the sensor, specific project content (images, videos, documents, etc.) can be displayed or hidden on the terminal.
  • Activity measurement: A new session can be automatically started when the user falls below a certain distance to the sensor. When this distance is exceeded, the session ends and the screensaver is activated.

Necessary project components:

  • SiteKiosk Online Version 1.5 or newer
  • HSRUB-MaxSonar-EZ by MaxBotix (product link here)
  • Display (Windows 10 or higher / Android Version .6 and higher)

Info: The distance sensor HSRUB-MaxSonar-EZ used here measures in millimetres. Depending on the sensor type, the standard unit of measurement may vary. Check in advance which unit of length your distance sensor measures in.

Set Up: Set everything up so that at least SiteKiosk Online Version 1.5 is installed and running on your terminal/display and the HSRUB-MaxSonar-EZ sensor is connected. Log in to your SiteKiosk Online account in your browser on your PC.

1. Distance Sensor Configuration

  1. Use a project that contains at least one element (e.g., a video).
  2. In the project settings, go to the « Devices & Device Actions » section.
  3. Click on the upper green action area « Add Device ».
  4. Select the device type « HSRUB-MaxSonar-EZ » from the dropdown menu, click « Next ».
  5. If desired, you can name the sensor individually, click « Save ».
  6. The device has been successfully added.
Devices
Fig.1 – Devices

2. Determine Sensor Action

Next, the device action must be defined to trigger a specific action in the project. The distance sensor can trigger two different actions:

  • Distance measurement: Depending on the user’s distance, the sensor can display different content on the terminal.
  • Activity state: As soon as a person is detected by the sensor, the activity state is activated, the screensaver is ended, and a new session is started. The opposite inactivity state is reached when a user exceeds a certain distance to the sensor for a predefined time (the screensaver starts and the current session ends).

The setup of both functions is explained in the following chapters.

3. Distance Measurement as an Action

In projects where distance measurement is to be used as a trigger for an action (displaying an element), the following settings must be made:

  1. In the project settings, in the « Devices and Device Actions » category, click on the lower green button « Add device action ».
  2. In the « Type of Action » row, select the option « Save distance in variable » and then click « Save ».
  3. The necessary variable was automatically created through this process.
  4. Click « Save » again to close the Settings
Set an Action Type
Fig.2 – Set an Action Types

3.1 Determine display conditions:

Next, display conditions must be defined, which result from the user’s distance to the sensor:

  1. Open the properties of a project element, e.g., an image that should react to the sensor’s measurement.
  2. Go to the Display conditions section and activate the radio button « Display under these conditions ».
  3. In the « Others » settings area, click on the box « Specific variable value ».
  4. Click on the « choose variable » drop-down menu and select « HSRUB-MaxSonar-EZ.Distance.range ».
  5. Select the « <" symbol in the middle drop-down menu to determine that an action is performed as soon as the set value is undercut.
  6. Enter the desired distance value in the right box that must be undercut for the sensor to trigger the set action and display the project element on the terminal. If 850 is entered here, for example, the action is triggered as soon as a person is closer than 850 mm to the sensor.
  7. Finally, click « Save ».
  8. Repeat this process with all elements that should react to the sensor and adjust the variable value according to the desired distance value.
Display Conditions
Fig.3 – Display Conditions

4. Activity State as an Action

The distance sensor can switch the terminal from the inactive state (e.g., screensaver) to the active state. By approaching the sensor, the screensaver can be ended and a new session started. Follow these configuration steps for this action:

4.1 Create screensaver page:

  1. Create a screensaver page by clicking the green « + » button on the right side of the screen in the upper « Pages » column.
  2. In this example, the template « Screensaver simple (Horizontal) » was selected. Make sure that in the selection row « This page serves as: » the option « Screensaver page » is selected. Elements can also be used as screensavers; for this, the display condition must be manually adjusted on the desired element (Screensaver (User inactive)).
  3. Click « Create ».

Info: By default, the screensaver starts after 300 seconds of inactivity. This value can be changed in the project settings under « Idle & Logout ».

Create Screensaver
Fig.4 – Create Screensaver

4.2 Trigger activity state:

  1. In the project settings, go to the « Devices & Device Actions » section and click on the lower green button « Add device action ».
  2. In the « Action type » area, select the option « Set activity state ».
  3. In the « Set activity state to » area, select the « Active » option.
  4. In the « When the value is » drop down menu, select the « Lesser Equal » option.
  5. In the « Than » row, enter a distance value that determines at what distance between the user and the sensor the activity state should be triggered. The value 850 used here determines that the action is triggered as soon as a person is closer than 850 mm to the sensor.
  6. Then click « Save ».
  7. Click « Save » again to close the entire project settings.

Info: If no user is in the sensor area for a certain time, the running project automatically switches to the inactive state (screensaver) and ends the current session.

Set Activity State
Fig.5 – Set Activity State

5. Publishing the Project

  1. Now publish the project on your terminal.
  2. Approach the distance sensor and test whether the desired effect of distance measurement and/or start of the activity state occurs.

Info: The distance-dependent display of content and the triggering of the activity state can also be used simultaneously in the same project.

Notes:

The present example describes the integration of the HSRUB-MaxSonar-EZ proximity sensor into a kiosk project. The distance sensor used is one of many different devices and sensors that can be integrated into SiteKiosk Online projects.

A list of other sensors, devices, and hardware can be found here: Supported Devices.

If you want to use sensors or devices that are not listed or if you have further questions and suggestions on the topic, please feel free to contact us!

Get in contact via mail sales-europe@sitekiosk.com or via telephone: +49 (251) 846 924-0.