Request EMU Version Information
- Topic:
- User-defined MQTT:
v1/watt/${PRODUCT_KEY}/${DEVICE}/ota/emu_version/command
- Platform Default MQTT:
v1/user/${TENANT}/${DEVICE}/ota/emu_version/command
- Permissions: Publish
- Payload Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | true | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | true | Message type | emu_version | emu_version |
| data | data | true | Message content | - | See Payload - data |
| device_uid | str | true | Device UID | - | iYRkfVpi77 |
| timestamp | int | true | Message timestamp (ms) | (0, ∞) | 1696837112000 |
Payload - data None
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-06hjkgfg2",
"mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
"type": "emu_version",
"device_uid": "test",
"timestamp": 1697789021000
}
EMU Version Information Response
- Topic:
- User-defined MQTT:
v1/watt/${PRODUCT_KEY}/${DEVICE}/ota/emu_version/result
- Platform Default MQTT:
v1/user/${TENANT}/${DEVICE}/ota/emu_version/result
- Permissions: Subscribe
- Payload Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | true | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | true | Message type | emu_version | emu_version |
| data | data | true | Message content | - | See Payload - data |
| device_uid | str | true | Device UID | - | iYRkfVpi77 |
| timestamp | int | true | Message timestamp (ms) | (0, ∞) | 1696837112000 |
Payload - data []EMUVersion
EMUVersion
| Parameter | Type | Required | Description | Example |
|---|
| device_id | int | yes | Upgrade device ID | 2 |
| status | int | yes | Device status 1- Running 2- Offline 3- Fault | 1 |
| emu_upgrade_success | int | no | EMU upgrade success Bit0: Transmission completed Bit1: Board 1 success Bit2: Board 2 success Bit3: Board 3 success Bit4: Board 4 success Bit5: Board 5 success Bit6: Board 6 success Bit7: EMU success Bit8: All success bit9: Upgrade incomplete | 512 |
| emu_upgrade_device | int | no | EMU upgrade device 3: EMU 21: Comm board 1 22: Comm board 2 23: Comm board 3 24: Comm board 4 25: Comm board 5 26: Comm board 6 | 3 |
| emu_upgrade_status | int | no | EMU upgrade status 1: Preparation 2: Transmission prep 3: Transmission 4: Verification 5: Completed | 5 |
| emu_upgrade_content | int | no | Upgrade content When in transmission status: denotes file transmission progress | 100 |
| emu_product_sn | string | no | EMU Product SN | emu-v1.0.0 |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-011789wfg2",
"mid": "389d9ac9-c660-4459-b9d5-f43160183552",
"type": "emu_version",
"device_uid": "test",
"timestamp": 1725615497191,
"data": [{
"device_id": 2,
"status": 1,
"emu_upgrade_success": 512,
"emu_upgrade_device": 3,
"emu_upgrade_status": 5,
"emu_upgrade_content": 100,
"emu_product_sn": "emu-v1.0.0"
},
{
"device_id": 3,
"status": 1,
"emu_upgrade_success": 512,
"emu_upgrade_device": 3,
"emu_upgrade_status": 5,
"emu_upgrade_content": 100,
"emu_product_sn": "emu-v1.0.0"
},
{
"device_id": 4,
"status": 2,
"emu_upgrade_success": null,
"emu_upgrade_device": null,
"emu_upgrade_status": null,
"emu_upgrade_content": null,
"emu_product_sn": ""
}]
}
Issue an OTA-EMU Upgrade Command
- Topic:
- User-defined MQTT:
v1/watt/${PRODUCT_KEY}/${DEVICE}/ota/emu_upgrade/command
- Platform Default MQTT:
v1/user/${TENANT}/${DEVICE}/ota/emu_upgrade/command
- Permissions: Publish
- Payload Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | true | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | true | Message type | emu_upgrade | emu_upgrade |
| data | data | true | Message content | - | See Payload - data |
| sub_device_id | int | true | Primary device ID, only required if reported on behalf of that device | - | 2 |
| device_uid | str | true | Device UID | - | iYRkfVpi77 |
| timestamp | int | true | Message timestamp (ms) | (0,∞) | 1696837112000 |
Payload - data
| Parameter | Type | Required | Description | Example |
|---|
| download_url | string | yes | Download link | http://example.com/ems\\_II |
| md5_code | string | yes | MD5 code | 50a2811e047dd49ace3801685eedb732 |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-06hjkgfg2",
"mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
"type": "emu_upgrade",
"device_uid": "test",
"sub_device_id": 2,
"timestamp": 1697789021000,
"data": {
"download_url": "http://example.com/ems_II",
"md5_code": "50a2811e047dd49ace3801685eedb732"
}
}
OTA-EMU Upgrade Command Response
- Topic:
- User-defined MQTT:
v1/watt/${PRODUCT_KEY}/${DEVICE}/ota/emu_upgrade/result
- Platform Default MQTT:
v1/user/${TENANT}/${DEVICE}/ota/emu_upgrade/result
- Permissions: Subscribe
- Payload Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | true | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | true | Message type | emu_upgrade | emu_upgrade |
| data | data | true | Message content | - | See Payload - data |
| sub_device_id | int | true | Primary device ID, required if reported on behalf of that device | - | 2 |
| device_uid | str | true | Device UID | - | iYRkfVpi77 |
| timestamp | int | true | Message timestamp (ms) | (0,∞) | 1696837112000 |
Payload - data
| Parameter | Type | Required | Description | Example |
|---|
| device_id | int | yes | Upgrade device ID | 2 |
| download_status | int | yes | Download status 1: Issued EMU upgrade success 2: Download failed 3: MD5 check failed 4: Deletion of folder contents failed 5: Unzip failed 6: Issued EMU upgrade failed | 1 |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-011789wfg2",
"mid": "389d9ac9-c660-4459-b9d5-f43160183552",
"type": "emu_upgrade",
"device_uid": "test",
"sub_device_id": 2,
"timestamp": 1725615497191,
"data": {
"device_id": 2,
"download_status": 1
}
}
Request OTA-EMU Upgrade Result
- Topic:
- User-defined MQTT:
v1/watt/${PRODUCT_KEY}/${DEVICE}/ota/emu_upgrade_result/command
- Platform Default MQTT:
v1/user/${TENANT}/${DEVICE}/ota/emu_upgrade_result/command
- Permissions: Publish
- Payload Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | true | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | true | Message type | emu_upgrade_result | emu_upgrade_result |
| data | data | true | Message content | - | See Payload - data |
| sub_device_id | int | true | Primary device ID, required if reported on behalf of that device | - | 2 |
| device_uid | str | true | Device UID | - | iYRkfVpi77 |
| timestamp | int | true | Message timestamp (ms) | (0,∞) | 1696837112000 |
Payload - data None
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-06hjkgfg2",
"mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
"type": "emu_upgrade_result",
"device_uid": "test",
"sub_device_id": 2,
"timestamp": 1697789021000
}
OTA-EMU Upgrade Result Response
- Topic:
- User-defined MQTT:
v1/watt/${PRODUCT_KEY}/${DEVICE}/ota/emu_upgrade_result/result
- Platform Default MQTT:
v1/user/${TENANT}/${DEVICE}/ota/emu_upgrade_result/result
- Permissions: Subscribe
- Payload Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | true | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | true | Message type | emu_upgrade_result | emu_upgrade_result |
| data | data | true | Message content | - | See Payload - data |
| sub_device_id | int | true | Primary device ID, required if reported on behalf of that device | - | 2 |
| device_uid | str | true | Device UID | - | iYRkfVpi77 |
| timestamp | int | true | Message timestamp (ms) | (0,∞) | 1696837112000 |
Payload - data
| Parameter | Type | Required | Description | Example |
|---|
| device_id | int | yes | Upgrade device ID | 2 |
| status | int | yes | Device status 1: Running 2: Offline 3: Fault | 1 |
| emu_upgrade_success | int | no | EMU upgrade success Bit0: Transmission completed Bit1: Board 1 success Bit2: Board 2 success Bit3: Board 3 success Bit4: Board 4 success Bit5: Board 5 success Bit6: Board 6 success Bit7: EMU success Bit8: All success bit9: Upgrade incomplete | 512 |
| emu_upgrade_device | int | no | EMU upgrade device 3: EMU 21: Comm board 1 22: Comm board 2 23: Comm board 3 24: Comm board 4 25: Comm board 5 26: Comm board 6 | 3 |
| emu_upgrade_status | int | no | EMU upgrade status 1: Preparation 2: Transmission prep 3: Transmission 4: Verification 5: Completed | 5 |
| emu_upgrade_content | int | no | Upgrade content When in transmission status: indicates file transmission progress | 100 |
| emu_product_sn | string | no | EMU product SN code | emu-v1.0.0 |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-011789wfg2",
"mid": "389d9ac9-c660-4459-b9d5-f43160183552",
"type": "emu_upgrade_result",
"device_uid": "test",
"sub_device_id": 2,
"timestamp": 1725615497191,
"data": {
"device_id": 2,
"status": 1,
"emu_upgrade_success": 512,
"emu_upgrade_device": 3,
"emu_upgrade_status": 5,
"emu_upgrade_content": 100,
"emu_product_sn": "emu-v1.0.0"
}
}