Detect when devices are added and removed.