Reporting Meter Device Information
- Topic:
- Custom MQTT by User:
v1/watt/${PRODUCT_KEY}/${DEVICE}/elemeter_info/details/post
- Default MQTT by Platform:
v1/user/${TENANT}/${DEVICE}/elemeter_info/details/post
- Permission: Subscribe
Payload – Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | uuid | Yes | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | Yes | Message Type | elemeter_info_details | elemeter_info_details |
| data | data | Yes | Message Content | - | See Payload – data |
| sub_device_id | int | Yes | ID of the first-level device (only needed when second-level device reports on behalf of the first-level device) | - | 1 |
| device_uid | str | Yes | (Second-level) Device UID | - | iYRkfVpi77 |
| timestamp | int | Yes | Message timestamp (milliseconds) | (0,∞) | 1696837112000 |
Payload – data/eleMeter
| Parameter | Type | Required | Description | Range | Example |
|---|
| id | uint | Yes | ID | - | 1 |
| station_name | str | Yes | Site Name | - | Lovely Square |
| virtual_type | uint | Yes | Virtual Type (1=Virtual Meter,2=Real Meter) | 1 or 2 | 2 |
| proto_type | uint | Yes | Transport Layer Protocol Type (1=TCP,2=RTU) | 1 or 2 | 1 |
| application_proto_type | uint | Yes | Application-layer protocol type (1=dlt645,2=modbus) | 1 or 2 | 2 |
| slave_id | uint | No | Slave ID (required if application_proto_type = modbus) | - | 1 |
| dlt_addr | str | No | Private address (required if application_proto_type = 1) | - | AAAAAAAAAAAA |
| host | str | No | Address (required if proto_type = 2) | - | 192.168.0.1 |
| port | uint | No | Port (required if proto_type = 2) | [0..65535] | 502 |
| com_addr | str | No | Serial address (required if proto_type = 1) | - | /dev/ttyS1 |
| com_no | uint | No | Serial number (required if proto_type = 1) | - | 1 |
| baud_rate | int | No | Baud rate (required if proto_type = 1) | - | 9600 |
| data_bits | int | No | Data bits (required if proto_type = 1) | - | 8 |
| stop_bits | int | No | Stop bits (required if proto_type = 1) | - | 1 |
| parity | str | No | Parity (required if proto_type = 1). N=No parity, E=Even parity, O=Odd parity | N/E/O | N |
| name | str | Yes | Device Name | - | East Transformer |
| ele_device_type_id | uint | Yes | Meter Type ID | - | 1 |
| ele_device_type | ele_device_type | Yes | Meter Type Object | - | - |
| pt | uint | Yes | Voltage transformer ratio | - | 10 |
| ct | uint | Yes | Current transformer ratio | - | 10 |
| direction | int | Yes | Meter direction | - | |
| running_status | uint | Yes | Running status | - | 1 |
| purpose | int | No | Purpose (1=Gate meter,2=Billing meter) | - | 1 |
| associate_meters | []eleMeter | No | Associated meter list | - | Associated itself |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
"mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
"type": "elemeter_info_details",
"data": {
"id": 1,
"proto_id": 1,
"proto_type": 1,
"application_proto_type": 2,
"host": "192.168.1.2",
"port": 502,
"com_addr": "",
"com_no": 0,
"baud_rate": 9600,
"data_bits": 8,
"stop_bits": 1,
"parity": "N",
"dlt_addr": "",
"slave_id": 1,
"uid": "",
"station_name": "Test Site",
"name": "Meter208",
"virtual_type": 2,
"ele_device_type_id": 1,
"ele_device_type": {
"id": 1,
"device_type": 1,
"name": "Acrel-ADW300"
},
"running_status": 1,
"direction": 1,
"pt": 1,
"ct": 1,
"purpose": 1,
"meter_ids": null,
"associate_meters": []
},
"sub_device_uid": "${SUB_DEVICE_UID}",
"sub_device_id": 2,
"device_uid": "${DEVICE_UID}",
"timestamp": 1695265371000
}
Platform Requests Meter Device Information Sync
- Topic:
- Custom MQTT by user:
v1/watt/${PRODUCT_KEY}/${DEVICE}/elemeter_info/sync/command
- Default MQTT by platform:
v1/user/${TENANT}/${DEVICE}/elemeter_info/sync/command
- Permission: Publish
Payload – Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | UUID | Yes | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | Yes | Message Type | elemeter_info_sync | elemeter_info_sync |
| sub_device_id | str | Yes | UID of the first-level device (only needed if second-level dev. reports on behalf) | - | jHODSda39 |
| device_uid | str | Yes | (Second-level) Device UID | - | iYRkfVpi77 |
| timestamp | int | Yes | Message timestamp (ms) | (0,∞) | 1696837112000 |
Response Codes
| Error Code | Description | Note |
|---|
| 200 | Issued Successfully | - |
| 400 | Parameter Error | - |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
"mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
"type": "elemeter_info_sync",
"sub_device_id": "${SUB_DEVICE_ID}",
"device_uid": "${DEVICE_UID}",
"timestamp": 1695265671000
}
Synchronize Meter Device Information Response
- Topic:
- Custom MQTT by user:
v1/watt/${PRODUCT_KEY}/${DEVICE}/elemeter_info/sync/result
- Default MQTT by platform:
v1/user/${TENANT}/${DEVICE}/elemeter_info/sync/result
- Permission: Subscribe
Payload – Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | uuid | Yes | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| reply | uuid | Yes | The mid of the message being replied to | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | Yes | Message Type | elemeter_info_sync | elemeter_info_sync |
| data | data | Yes | Message Content | - | See Payload – data |
| code | int | Yes | Response code | - | See response codes |
| msg | str | Yes | Failure reason | - | Parameter error |
| sub_device_id | int | Yes | ID of the first-level device (only needed if second-level device reports on behalf of a first-level) | - | 1 |
| device_uid | str | Yes | (Second-level) Device UID | - | iYRkfVpi77 |
| timestamp | int | Yes | Message timestamp (ms) | (0,∞) | 1696837112000 |
Payload – data/eleMeter
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
"mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
"reply": "3e681859-6917-4b9a-9afd-3f162cd185bd",
"type": "elemeter_info_sync",
"data": {
"id": 1,
"proto_id": 1,
"proto_type": 1,
"application_proto_type": 2,
"host": "192.168.1.2",
"port": 502,
"com_addr": "",
"com_no": 0,
"baud_rate": 9600,
"data_bits": 8,
"stop_bits": 1,
"parity": "N",
"dlt_addr": "",
"slave_id": 1,
"uid": "",
"station_name": "Test Site",
"name": "Meter208",
"virtual_type": 2,
"ele_device_type_id": 1,
"ele_device_type": {
"id": 1,
"device_type": 1,
"name": "Acrel-ADW300"
},
"running_status": 1,
"direction": 1,
"pt": 1,
"ct": 1,
"purpose": 1,
"meter_ids": null,
"associate_meters": []
},
"sub_device_id": "${SUB_DEVICE_ID}",
"device_uid": "${DEVICE_UID}",
"timestamp": 1695265371000
}
Platform Requests Synchronization of Meter Device Information List
- Topic:
- Custom MQTT by User:
v1/watt/${PRODUCT_KEY}/${DEVICE}/elemeter_info/list/command
- Default MQTT by Platform:
v1/user/${TENANT}/${DEVICE}/elemeter_info/list/command
- Permission: Publish
Payload – Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | uuid | Yes | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | Yes | Message Type | elemeter_info_list | elemeter_info_list |
| device_uid | str | Yes | (Second-level) Device UID | - | iYRkfVpi77 |
| timestamp | int | Yes | Message timestamp (milliseconds) | (0,∞) | 1696837112000 |
Response Codes
| Error Code | Description | Note |
|---|
| 200 | Issued Successfully | - |
| 400 | Parameter Error | - |
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
"mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
"type": "elemeter_info_list",
"device_uid": "${DEVICE_UID}",
"timestamp": 1695265671000
}
Synchronize Meter Device Information Response
- Topic:
- Custom MQTT by User:
v1/watt/${PRODUCT_KEY}/${DEVICE}/elemeter_info/list/result
- Default MQTT by Platform:
v1/user/${TENANT}/${DEVICE}/elemeter_info/list/result
- Permission: Subscribe
Payload – Main Structure
| Parameter | Type | Required | Description | Range | Example |
|---|
| mid | uuid | Yes | Message ID | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| reply | uuid | Yes | The mid of the message being replied to | - | 3e681859-6917-4b9a-9afd-3f162cd185bd |
| type | str | Yes | Message Type | elemeter_info_list | elemeter_info_list |
| data | data | Yes | Message Content | - | See Payload – data |
| code | int | Yes | Response Code | - | See response codes |
| msg | str | Yes | Failure Reason | - | Parameter Error |
| sub_device_id | int | Yes | ID of the first-level device (only needed if second-level device is reporting on behalf of a first-level device) | - | 1 |
| device_uid | str | Yes | (Second-level) Device UID | - | iYRkfVpi77 |
| timestamp | int | Yes | Message timestamp (milliseconds) | (0,∞) | 1696837112000 |
Payload – data/[]eleMeter
Payload Example
{
"trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
"mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
"reply": "3e681859-6917-4b9a-9afd-3f162cd185bd",
"type": "elemeter_info_list",
"data": [
{
"id": 1,
"proto_id": 1,
"proto_type": 1,
"application_proto_type": 2,
"host": "192.168.1.2",
"port": 502,
"com_addr": "",
"com_no": 0,
"baud_rate": 9600,
"data_bits": 8,
"stop_bits": 1,
"parity": "N",
"dlt_addr": "",
"slave_id": 1,
"uid": "",
"station_name": "Test Site",
"name": "Meter208",
"virtual_type": 2,
"ele_device_type_id": 1,
"ele_device_type": {
"id": 1,
"device_type": 1,
"name": "Acrel-ADW300"
},
"running_status": 1,
"direction": 1,
"pt": 1,
"ct": 1,
"purpose": 1,
"meter_ids": null,
"associate_meters": []
}
],
"sub_device_id": "${SUB_DEVICE_ID}",
"device_uid": "${DEVICE_UID}",
"timestamp": 1695265371000
}