Adding javascript subscribers for motion and door sensors