tradfri-demo/tradfri-motion.js
// Event handlers for the registered resource.
Event handlers for the registered resource.
Event handlers for the registered resource .
function retrieveHandler(request) {
    motionResource.properties = getProperties();
    request.respond(motionResource).catch(handleError);
    if ('observe' in request) {
        observerCount += request.observe ? 1 : -1;
        if (observerCount > 0)
            setTimeout(notifyObservers, 200);
    }
}
function retrieveHandler ( request ) { motionResource . properties = getProperties ( ) ; request . respond ( motionResource ) . catch ( handleError ) ; if ( 'observe' in request ) { observerCount += request . observe ? 1 : - 1 ; if ( observerCount > 0 ) setTimeout ( notifyObservers , 200 ) ; } }
Event handlers for the registered resource.
Event handlers for the registered resource .