Added support to change device by id according to the scanned QR code