added set doorstate command
refactored door command structure