Added support for 'on' and 'off' commands