Handle sensor type, misc minor fixes, prepare for handling custom conditions.
Added custom conditions, fixed stop request.