Getting the stored data in a device

When a device is created you have the ability to store a map of info along with it. Sometimes things like this are included when creating a device addChildDevice(“space”, deviceType, dni, hub, [ data: [“ip”: ip, “port” : port]]). My question is how to get in a SmartApp the value for ip or port in data?