ImageCapture from the virtual camera


I’m trying to write an application that would capture the image from the door camera, and send the image file or bytecode to my web server.

I have to note that I’m testing ST and do not have ST hub nor any of the supported devices. So I’m using virtual devices in IDE and simulator. For that reason I added ‘Smart Sense Camera’ to “My Devices” and a corresponding device handler for it from the templates in “My device handlers”. The device handler has a ‘simulator’ section with the following content:

simulator {
    	status "image": "raw:C45F5708D89A4F3CB1A7EEEE2E0C73D900, image:C45F5708D89A4F3CB1A7EEEE2E0C73D9, result:00"
    	reply "take C45F5708D89A4F3CB1A7EEEE2E0C73D9": "raw:C45F5708D89A4F3CB1A7EEEE2E0C73D900, image:C45F5708D89A4F3CB1A7EEEE2E0C73D9, result:00"

Now, when I write a SmartApp to access the image data, like this

(1..((burstCount ?: 5) - 1)).each {
    camera.take(delay: (500 * it))

def status = camera.currentValue("image")
log.debug "MY IMAGE IS: ${status}"
def attrs = camera.supportedAttributes
attrs.each {
log.debug "${camera.displayName}, attribute ${}, dataType: ${it.dataType}, values: ${it.values}"

In the IDE log I see that the image value is null

51f45ee3-c374-455f-ab5d-e0306232ef23 5:39:18 PM: debug Smart Sense Camera, attribute image, dataType: STRING, values: []
51f45ee3-c374-455f-ab5d-e0306232ef23 5:39:18 PM: debug MY IMAGE IS: null

I can’t understand what I’m doing wrong. Or maybe it’s impossible to get the virtual image data?