Device Configuration and Update
Pre-requisite: The user has to be signed in to perform the following operations.
Update Device Information
To update the device information, The following method can be used:
spaceId(required): The space ID of the device.deviceId(required): The device ID.request(required): The request object containing the updated device information.
Factory.deviceService.updateDevice(spaceId: String, deviceId: String, request: UpdateDeviceRequest?) -> IVPublisher<DeviceModel>
Update Device Settings
To update the device settings, The following method can be used:
spaceId(required): The space ID of the device.deviceId(required): The device ID.request(required): The request object containing the updated device settings.wakeup(required): Bool(If device is battery operated)
Factory.deviceService.updateDeviceSettings(spaceId: String, deviceId: String, wakeup: Bool, request: UpdateDeviceSettingRequestModel?) -> IVPublisher<DeviceSettingModel>
Toggle Device Light Mode
To update the device light mode, The following method can be used:
spaceId(required): The space ID of the device.deviceId(required): The device ID.isOn(required): The new light mode status.wakeup(required): Bool(If device is battery operated)
Factory.deviceService.updateDeviceLightSetting(spaceId: String, deviceId: String, wakeup: Bool, request: UpdateDeviceLightSettingRequestModel?) -> IVPublisher<DeviceSettingModel>