fixed getDevicesByType