IBM Watson IoT Platform - Create new device type Gateway
Go to https://console.bluemix.net/
Login with your IBM account
Enter the Dashboard screen, and select â€śCreate Resourceâ€ť
Select â€śInternet of Thingsâ€ť (use the “search the catalog” for quick filtering)
The default settings are OK for now â€“ press â€śCreateâ€ť.
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:
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â€ť
Choose a â€śGatewayâ€ť type, Name and Description, then click â€śNextâ€ť.
InÂ the next screen, Device Information is irrelevant, since the gateway is not a physical device.
Click Next, then choose Register Device to create a gateway device, using our new type:
Select â€śFloGatewayâ€ť (or the name you gave the Gateway) as the device type, and choose an ID.
Since this is not a physical device, it is safe to ignore the device information step.
Set Gateway Privileged
In the next screen choose â€śPrivileged Gatewayâ€ť, then click Next.
Use an auto-generated token (or choose your own):
The summary screen shows the gateway to be created.
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â€ť.
We have no devices yet so press Back to return. You will see the gateway in the â€śDevicesâ€ť screen:
Create a device type in a similar way to creating a gateway type:
Optional: enter any relevant details about this device type.
Select â€śRegister Devicesâ€ť to add a device (this can also be done from the main devices screen)
Enter a device ID
Enter an authentication token manually or leave empty to generate one.
Press back to return to the devices screen.
Grant the gateway permissions to act on behalf of the device:
Select one or more devices.
At this point you will need to configure your IBM Watson Gateway and devices in your floLIVE account.
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.
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.
The Device settings shall open the following dialog:
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.
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).
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.
Select all properties (the checkbox on the table header) and Watson will map the JSON keys into the deviceâ€™s property table.
Now, the deviceâ€™s â€śStateâ€ť tab will show the current value of the mapped properties.
An example for an event of device connectivity to the mobile network (Action: Send Authentication Info):
An example for an event of device connectivity to the mobile network (Action: Close PDP):