Perform OTA Update

[TCP/WebSocket<-->IM]

Performing updates to the latest firmware for either InvisOutlet or InvisDeco.

Request

  • packetID: Represents the ID of the packet. This can be any six digit number, no leading zeros.

  • payload:

    • callbackName: 21

    • callbackArgs:

      • 0: Specifies which device to update; 1 - InvisOutlet, 2 - InvisDeco.

      • 1: Specifies which method to update InvisDeco; 0 - via Wi-Fi, 1 - via InvisOutlet

If you are having trouble using the via Wi-Fi method to update InvisDeco, please try to update InvisDeco via the via InvisOutlet method.

{
    "packetID": 414883,  
    "payload":
    {
        "callbackName": 21,  
        "callbackArgs": [1,0] 
    }
}

Response for InvisOutlet revA:

  • sn: The serial number of the InvisOutlet.

  • packetID: Represents the ID of the packet based on request packetID.

  • PUBACK : If the request is successfully processed; 1 - Update will be performed, 0 - Update failed to initialize (may due to the current device running firmware version is already up to date).

Response for InvisOutlet revB:

  • sn: The serial number of the InvisOutlet.

  • packetID: Represents the ID of the packet based on request packetID.

  • PUBACK : If the request is successfully received.

If you are performing OTA update for InvisOutlet, you will not receive the response, as the device will be restarted immediately. Please use below Response for InvisOutlet revB, synchronous to check the OTA status.

Response for InvisOutlet revB, synchronous:

  • sn: The serial number of the InvisOutlet.

  • packetID: Represents the ID of the packet based on request packetID.

  • payload:

    • callbackName: 21

    • callbackArgs:

      • 0: Specifies which device is performing the update; 1 - InvisOutlet, 2 - InvisDeco.

      • 1: Specifies whether the OTA is performed successfully or not; 1 - OTA will continue to perform, 0 - Fail

If you are on InvisOutlet hardware revB, the device will restart immediately to perform the OTA update when performing InvisOutlet or InvisDeco update (via InvisOutlet), the non-synchronous response is only sent for whether the command is successfully received or not.

In order to receive the synchronous response when performing InvisOutlet or InvisDeco update (via InvisOutlet), you will need to reconnect the TCP connection again right after the Request is sent.

The OTA update status will be updated via OTA Download Progress (Synchronous) and OTA Result Update (Synchronous). Please note the packetID will be different then the requested packetID.

Last updated