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>

Create Two Way Call Event

To create two way call event, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
  • request (optional): The request object containing the Two way call event information.
Factory.deviceService.createTwoWayCallEvent(
        spaceId: String,
        deviceId: String,
        request: TwoWayCallEventRequest?
    ) -> IVPublisher<TwoWayCallEventModel>

Update Two Way Call Status

To update two way call status, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
  • callId (required): The call ID.
  • request (optional): The request object containing the Two way call event information.
Factory.deviceService.updateTwoWayCallStatus(
        spaceId: String,
        deviceId: String,
        callId: String,
        request: TwoWayCallStatusRequest?
    ) -> IVPublisher<Void>

Get Operators List

To get available network operators, The following method can be used:

  • spaceId (required): The space ID of the device.
  • providerId (required): The provider ID.
  • iccid (required): The iccid of the device.
Factory.deviceService.getOperatorsList(
        spaceId: String,
        providerId: String,
        iccid: String
    ) -> IVPublisher<OperatorsListModel>

Update Device Operator

To update device operator, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID.
  • operatorValue (required): The operator of the device.
  • wakeup (required): Bool(If device is battery operated)
Factory.deviceService.updateDeviceOperator(
        spaceId: String,
        deviceId: String,
        operatorValue: String,
        wakeup: Bool
    ) -> IVPublisher<DeviceModel>