CredoID

Controller firmware update via API

Updating Mercury module firmware via CredoID API

  1. Open CredoID and log in using your credentials.
  2. Open devtools by pressing F12 and select “Network” tab. Using "Chrome" is recommended.
  3. Click on any request in the list, navigate to “Headers” tab, look for “Request Headers” section and find “Authorization:” line.
  4. Copy authorization header, everything after the word bearer.

Example:
authbearer.png

  1. Go to Device related API calls if CredoID is hosted on http://localhost:8090 or change the link according to your domain.

  2. Click “Authorize” and paste authorization header into the “Value” field and click “Authorize”.

  3. Scroll down to “Mercury” section and look for “POST /api/devices/mercury/{id}/send-command”

  4. Click “Try it out”`

  5. Enter device ID in the ID field.
    To find device ID - go back CredoID window, open devtools Network tab, navigate to “Hardware → Devices” in CredoID, click on your device and you should see a request in network tab that is a number (that will be your device ID).

  6. Get your module identifier number. You can find it in CredoID “Hardware → Devices” by expanding your device info (Module identifier will be the number under ID column) or clicking on your device and going to “Device modules” in the side menu.
    moduleid2.jpg
    moduleid.jpg

  7. Create a folder in “C:\” and name it “Firmwares”, move your firmware file to that folder.

  8. Back in Swagger API window, in the request body - instead of “string”, copy and paste

[
"328", "module identifier", "C:\Firmwares\firmware name.aax"
]

Change "module identifier" inside quotation marks with your module identifier from step 10 and exact firmware file name.
As example it could look like this:

[
"328", "2", "C:\Firmwares\mr52_s3b_3_22_4_enc.aax"
]
  1. Click “Execute”, if everything is correct you should get server response with code 200 : success. It may take a few minutes for module to update.