Skip to content

Using Data from a Mobile Device in MindSphere - via MindConnect IoT Extension

MindSphere allows to import data from mobile devices. This is achieved in two steps:

  1. Use the Cloud Sensor app to connect the mobile device to MindSphere via the MindConnect IoT Extension
  2. Use Asset Management and Device Management in MindSphere to receive and display data from the mobile device.

General Information

Duration: 30 mins
Tested with MindSphere version: Release 24th September 2018.
This guide uses a Samsung Galaxy S6 smartphone, but can also be applied for other smartphones or tablets.

Prerequisites

Hint

To identify the Android version, click here.

Connect a Smartphone to MindSphere via MindConnect IoT Extension

Register the Smartphone in MindConnect IoT Extension

  1. Open the Cloud Sensor App on your smartphone.
  2. Select "Web-based registration".
  3. Select mciotextension.{yourRegion}.mindsphere.io as your instance.
  4. Click on "Register Device" to start the registration. A device ID is displayed, which is required in step 7.
  5. Open the MindConnect IoT Extension from the MindSphere Launchpad on your computer.

    Note

    If you have any problems with login, contact your tenant admin.

  6. Go to Device Management → Devices → Registration and click on "Register device".

  7. Enter the device ID displayed on your smartphone and follow the prompts.
    enter device id
  8. When the new device is shown in the Device Registration menu, click "Accept".
    accept device
  9. Accept the popups on your smartphone.
  10. Edit the device name in the app on your smartphone (optional).
  11. Click on "View Sensors" to inspect data recorded by your smartphone in the graphs of the Cloud Sensor App (optional).

Change the Measurement Interval in MindConnect IoT Extension (optional)

After registration, the Cloud Sensor App sends measurements to MindConnect IoT Extension. Updates are triggered every when the data changes significantly or every 20 minutes, otherwise. The interval between measurements can be changed in MindConnect IoT Extension as follows:

  1. Go to "Device Management" → "All devices" and select your device from the list.
  2. Select the "Info" tab.
  3. Inside the "DEVICE STATUS" panel click on the Edit button for "REQUIRED INTERVAL".  MCIoTExtension device Data
  4. Enter the desired interval and save the changes.

Measurements from sensors of your smartphone are displayed in its "Measurements" tab within MindConnect IoT Extension.

Receive and Visualize Smartphone Data in MindSphere

This section illustrates how to forward the data from the MindConnect IoT Extension to use it MindSphere: An asset is created using Asset Management to represent the smartphone in MindSphere. The incoming data is mapped to the asset using Device Management in the MindConnect IoT Extension.

Create an Asset

Create an Aspect

  1. Open the Asset Manager from the MindSphere Launchpad.
  2. Go to "Aspects" and click on the "+" symbol to create a new aspect.
  3. Enter the required data, e.g.:
    • ID: "mydemo"
    • Name: "GalaxyS6Properties"
    • Description: "Connect Galaxy S6 to MindConnectIoTExtension"
  4. Add variables for the sensor data provided by the smartphone, e.g.:

    Variable name Data Type Unit
    Acceleration_X INT g
    Acceleration_Y INT g
    Acceleration_Z INT g
    Gyroscope_X INT °/s
    Gyroscope_Y INT °/s
    Gyroscope_Z INT °/s
    MagnenticField_X INT uT
    MagnenticField_Y INT uT
    MagnenticField_Z INT uT
    SignalStrength INT dBm
    Luxometer INT lux
    Barometer INT mBar
  5. Click on "Save".

Create an Asset Type

  1. Go to "Types" and click on the "+" symbol to create a new asset type.
  2. Enter the required data, e.g.:
    • ID: "mydemo.GalaxyS6MCIoTExtension"
    • Name: "GalaxyS6MCIoTExtension"
    • Description: "Asset type for GalaxyS6"
  3. Add the previously created aspect and click on "Save".

Create an Asset

  1. Go to "Assets" and click on the "+" symbol to create a new asset.
  2. Select the previously created asset type.
  3. Enter the required data, e.g.:
    • Name: "GalaxyS6Asset"
    • Description: "Asset from asset type for GalaxyS6"
  4. Click on "Save"

Now the new asset is ready for asset mapping between data collection in MindConnect IoT Extension and MindSphere.

Asset Mapping in MindConnect IoT Extension

Asset mapping is required for linking assets in MindSphere to the data received from the device registered in MindConnect IoT Extension. This functionality is provided in the Device Management of the MindConnect IoT Extension.

  1. Open the MindConnect IoT Extension from your Launchpad.
  2. Go to "Device Management" and select "Asset Mapping".
  3. Select your smartphone from the listed devices.
  4. Select the prepared asset from the listed assets. asset mapping
  5. Add a mapping for aspect to be shown in MindSphere:

    • Click on "Add Mapping".
    • Select "Source" and "Target" in the new dialog and click on "Add". asset mapping

      Info

      Source: Measurements arriving at MindConnect IoT Extension
      Target: MindSphere asset

  6. Click on "Commit Changes" and "Apply".

All mappings should be displayed with status "ACTIVE". asset mapping

Verify "Sensor data" in Fleet Manager

  1. Open the Fleet Manager from your Launchpad.
  2. Select the asset for your smartphone.
  3. Click on "Aspects".

The data from your smartphone are visualized in Fleet Manager.

Note

Variables declared as INT are presented as chart, STRING variables are presented in the tabular form.

Configure Rules for Asset in Fleet Manager (optional)

  1. Go to "Rules" and click on "Create".
  2. Select a variable for which you want to define a rule.
  3. Define a condition, on which the event shall be triggered. If required, enable "Hysteresis" and "Debouncing time". The "Debouncing time" sets the minimum duration, for which the defined condition must hold true.
  4. Select the Severity and add a Description for the event.
  5. Enable additional actions, if desired. To receive notifications, enable the "Email" checkbox and enter a valid e-mail address. You can define how often to get notification using the "Not more than one event in..." option. set additional rules
  6. Enter a name for the rule.
  7. Click on "Save".
Test Event Notification
  1. Create a rule for the luxometer of your smartphone
    • Set the condition to check if the luxometer value larger than 2000.
    • Enable e-mail notifications for this rule and set it to trigger only up to one event per minute.
  2. Place the front or main camera of your smartphone into bright light for more than 1 minute.
  3. Open the Fleet Manager and check the asset values. A warning message is displayed, when the luxometer value exceeds 2000. fleet-manager-warning-message
  4. Open your e-mail client and check your new e-mails. An automatic e-mail should have arrived: e-mail notification

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.