Create Physical & Logical Interfaces
IoT device data must be mapped from physical devices that are reading the metrics on assets to a logical interfaces that represent that whole asset or system you will monitor. Physical Interfaces are what are used to save the device data into the Monitor. Logical Interfaces are what Monitor uses to create asset types and assets with their corresponding metric values. In this exercise you will use Monitor to create:
Create the Physical Interface
Note
Alternate option for step 5 is to click Use Last Event Cache enter the name of the device ID 111137F8. Which ever you
have in your data. pump_co event will appear if you already have the simulator running. This corresponds to the Python
device simulator script you will run in the next exercise. See image for Event cache
-
Still in the Watson IoT Platform, go to the
Device Typestab menu, search then selectpump_co,
-
Click on the
Interfacetab menu and clickCreate Physical Interfacebutton. Enter the namepump_co_pi, ClickNext.
-
Click
Create event typebutton
-
If your pump simulator is sending data you can wait for the dialog to fill in with your event data. Otherwise you can set the payload by click on
Create event typebutton.
Add Device Event Typeto thePhysical Interfaceby uploading a json file that contains a payload similar to the one below. Replacecowith your initials for your eventID.{ "EventName": "event", "EventDescription": "Device event", "EventID": "pump_co", "Payload": { "evt_timestamp": "2020-01-19T03:59:53.03Z", "speed": 1124, "head": 54.424, "pump_mode": "a", "flow": 115.934, "voltage": 274, "POWER": 2.664, "CURRENT": 8.69 } } -
In the dialog click on
Importlink and drag the event_template.json file into the dialog.
-
Click the
Addbutton -
Click the
Add Propertybutton. You must change thetypefrom string totimestampfor theevet_timestamp. ClickSelectbutton.

-
click the
3 dotson theevet_timestamprow. -
Click edit
pencil icon -
Click select box for
Eventnamed.
-
Click the check box next to
evt_timestampand change theEvent,Data TypetoString(Date Time)
-
Click
Done.
-
Click
Done. Again.
You now are able to save the device data that is sent from any device to this Device Type physical interface named
pump_co_pi. Stay on the current page and continue to the next exercise below.
Create the Logical Interface
Logical interfaces allow you to map the metrics from the physical device types into a single Entity Type for Monitor.
-
Click
Create Logical Interfacebutton.
-
Change the default name
pump_co_li, clickNext.
-
Tick the
Allow Additional PropertiestoONand then ClickAdd Propertybutton.
-
Click the
Selectbutton for theevt_timestamp.
-
In the dialog
Typefield, selectString (date-time)and clickSavebutton.
-
Click
Add Propertyagain for all the remaining metrics leaving the values as is shown below.
)
)

-
Click
Next, click linkNo event notifications
-
change to
All eventsand click thexto close the dialog box.
-
Click
Apply, thenDone.
-
Click
Activatetwice.

-
Click
Done.
You now are able to create dashboards and calculated metrics using the device data that is sent by any device into Monitor. You must wait upto 10 minutes to start seeing your devices show up in Monitor.