//Create a class for image capture sensor package ImageCapture import SmartThing.SmartThing public class ImageCapture extends SmartThing { // id, label, and display name of the device String id String label String displayName // Maps from features to values HashMap deviceValuesMap = new HashMap() ImageCapture(Closure sendEvent, String id, String label, String displayName, String currentImage) { deviceValueSmartThing = deviceValuesMap idSmartThing = id labelSmartThing = label displayNameSmartThing = displayName sendEventSmartThings = sendEvent // Initialization this.id = id this.label = label this.displayName = displayName deviceValuesMap.put("image", currentImage) } def take() { println("The camera with id:$id is taken a picture!") } def take(LinkedHashMap metaData) { take() } }