changed motionsensor to contactswitch in raspberrypi.cpp