Overview

Skill Level: Any Skill Level

By integrating IBM Watson IoT devices with floLIVE connectivity services, users are able to receive cellular connectivity events directly to their Device Management application alongside to the device's telemetry (i.e. sensor data).

Ingredients

Overview:

FloLIVE integrates the IBM Watson IoT Platform using the MQTT protocol over a secure SSL connection.

The diagram below depicts the high-level integration between floLIVE Connectivity Management Platform and the IBM Watson IoT platform:

Overview-diagram

 

A new Virtual Getaway shall be defined in the IBM Watson IoT Platform.

One or more IoT devices shall be configured under the Virtual Gateway.

The Gateway shall act on behalf of the configured devices.

The FloLIVE platform is configured to send connectivity events as well as Call Data Records (CDRs) to the configured Virtual Gateway.

IBM users are able to monitor connectivity events and create different types of applications that consume both connectivity events and CDRs.

Step-by-step

  1. IBM Watson IoT Platform - Create new device type Gateway

    Go to https://console.bluemix.net/

    Login with your IBM account

    ibmLogin

    Enter the Dashboard screen, and select “Create Resource”

    cloudDashboad

    Select “Internet of Things” (use the “search the catalog” for quick filtering)

    cloudDashboad2

    The default settings are OK for now – press “Create”.

    createNewService

    Important: you must have “developer” permissions for the selected space (“dev” in the example above).

     

    After successful creation, you will see the option to launch the Watson IoT Platform:

    LaunchService

    A new “Organization” (“Org”) entity will be created.

    This is a 6-character string, linked to a public DNS sub-domain (highlighted in the URL).

    Your “Org” name is also available in the top right hand side of the logged in user (see ID:84smzj in the example below).

     

    Press the “Launch” button to enter your newly-created organization.

     

    Select “Browse Types”, then click “Add Device Type”

    NewDeviceType

    Choose a “Gateway” type, Name and Description, then click “Next”.

    selectDeviceType

    In the next screen, Device Information is irrelevant, since the gateway is not a physical device.

    DeviceTypeInfo

    Click Next, then choose Register Device to create a gateway device, using our new type:

    newDeviceTypeCreated

    Select “FloGateway” (or the name you gave the Gateway) as the device type, and choose an ID.

    CreateNewDeviceGW

    Since this is not a physical device, it is safe to ignore the device information step.

     

  2. Set Gateway Privileged

    In the next screen choose “Privileged Gateway”, then click Next.

    DevicePermissions

    Use an auto-generated token (or choose your own):

    SetGWPermissions

    The summary screen shows the gateway to be created.

    GWPermissions2

    Click “Done”.

    The gateway is now created.

     

    Important: Save the authentication token since it will not be displayed again!

    In the below screenshot the token is “m6S@zzWjnAxZ7)cs&q”.

    ViewGWPermissions

     

  3. Create Device

    We have no devices yet so press Back to return. You will see the gateway in the “Devices” screen:

    viewDeviceList

    Create a device type in a similar way to creating a gateway type:

    createNewDevice

    Optional: enter any relevant details about this device type.

    setDeviceInfo2

    Select “Register Devices” to add a device (this can also be done from the main devices screen)

    addNewDeviceDevice-1

    Enter a device ID

    SetDeviceName

    Enter an authentication token manually or leave empty to generate one.

    setDeviceKey

    Summary screen:

    ViewDeviceInfo2

    Press back to return to the devices screen.

    Grant the gateway permissions to act on behalf of the device:

    SetGWPermissions2

    Select one or more devices.

    AssignDevicetoGW

    At this point you will need to configure your IBM Watson Gateway and devices in your floLIVE account.

     

     

     

  4. FloLIVE Settings

    Make sure you have a floLIVE account.

    In case you don’t have one use the “Sign Up” option available at: www.portal.flolive.net  

    Fill in your details and wait for your account to be created.

     

     

    Provision the IBM gateway and devices in your floLIVE account:

    Login to your floLIVE account.

     

    Setup your IBM Gateway settings:

    Go to My Account page.

    Click the Info (“i”)  button on the My Statistics page.

    floSetIBMGW

    Enter your Organization name (“Org”), Gateway Device ID, Gateway Device Type and Gateway password (Authentication Token).

    Press the Update button.

     

    Setup IBM Device settings:

    Go to Inventory -> SIMs page.

    Select the SIM that is associated with your device and click on the Settings action button  on the right side of the table.

    FloSIMList

    The Device settings shall open the following dialog:

    floIBMDeviceSettings

    Enter the Device ID and Type and press the Update button.

     

    At this point all floLIVE events that are associated with this device will be sent also to your IBM Watson IoT account.

  5. Monitoring Connectivity Events

    Monitor Device Connectivity Events: 

    To monitor incoming events through the gateway, select the desired device and choose the “Recent Events” tab (alternatively the “State” tab shows the last received data).

    ViewDeviceEvent

    After some events are received, go back and edit the interface for the device type.

    Create a simple interface and use the last event to create a list of properties that are mapped to the JSON keys in the event.

    ViewDeviceEventDetailed

    Select all properties (the checkbox on the table header) and Watson will map the JSON keys into the device’s property table.

    ViewDeviceEventMapping

    Now, the device’s “State” tab will show the current value of the mapped properties.

    ViewDeviceEventDetailed2

    An example for an event of device connectivity to the mobile network (Action: Send Authentication Info):

    EventAuthentication

    An example for an event of device connectivity to the mobile network (Action: Close PDP):

    closePDP

Join The Discussion