EcoWatt Technologies Logo

Device - Electric Meter Device

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

ParameterTypeRequiredDescriptionRangeExample
miduuidYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typeelemeter_info_detailselemeter_info_details
datadataYesMessage Content-See Payload – data
sub_device_idintYesID of the first-level device (only needed when second-level device reports on behalf of the first-level device)-1
device_uidstrYes(Second-level) Device UID-iYRkfVpi77
timestampintYesMessage timestamp (milliseconds)(0,∞)1696837112000

Payload – data/eleMeter

ParameterTypeRequiredDescriptionRangeExample
iduintYesID-1
station_namestrYesSite Name-Lovely Square
virtual_typeuintYesVirtual Type (1=Virtual Meter,2=Real Meter)1 or 22
proto_typeuintYesTransport Layer Protocol Type (1=TCP,2=RTU)1 or 21
application_proto_typeuintYesApplication-layer protocol type (1=dlt645,2=modbus)1 or 22
slave_iduintNoSlave ID (required if application_proto_type = modbus)-1
dlt_addrstrNoPrivate address (required if application_proto_type = 1)-AAAAAAAAAAAA
hoststrNoAddress (required if proto_type = 2)-192.168.0.1
portuintNoPort (required if proto_type = 2)[0..65535]502
com_addrstrNoSerial address (required if proto_type = 1)-/dev/ttyS1
com_nouintNoSerial number (required if proto_type = 1)-1
baud_rateintNoBaud rate (required if proto_type = 1)-9600
data_bitsintNoData bits (required if proto_type = 1)-8
stop_bitsintNoStop bits (required if proto_type = 1)-1
paritystrNoParity (required if proto_type = 1). N=No parity, E=Even parity, O=Odd parityN/E/ON
namestrYesDevice Name-East Transformer
ele_device_type_iduintYesMeter Type ID-1
ele_device_typeele_device_typeYesMeter Type Object--
ptuintYesVoltage transformer ratio-10
ctuintYesCurrent transformer ratio-10
directionintYesMeter direction-
running_statusuintYesRunning status-1
purposeintNoPurpose (1=Gate meter,2=Billing meter)-1
associate_meters[]eleMeterNoAssociated 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

ParameterTypeRequiredDescriptionRangeExample
midUUIDYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typeelemeter_info_syncelemeter_info_sync
sub_device_idstrYesUID of the first-level device (only needed if second-level dev. reports on behalf)-jHODSda39
device_uidstrYes(Second-level) Device UID-iYRkfVpi77
timestampintYesMessage timestamp (ms)(0,∞)1696837112000

Response Codes

Error CodeDescriptionNote
200Issued Successfully-
400Parameter 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

ParameterTypeRequiredDescriptionRangeExample
miduuidYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
replyuuidYesThe mid of the message being replied to-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typeelemeter_info_syncelemeter_info_sync
datadataYesMessage Content-See Payload – data
codeintYesResponse code-See response codes
msgstrYesFailure reason-Parameter error
sub_device_idintYesID of the first-level device (only needed if second-level device reports on behalf of a first-level)-1
device_uidstrYes(Second-level) Device UID-iYRkfVpi77
timestampintYesMessage 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

ParameterTypeRequiredDescriptionRangeExample
miduuidYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typeelemeter_info_listelemeter_info_list
device_uidstrYes(Second-level) Device UID-iYRkfVpi77
timestampintYesMessage timestamp (milliseconds)(0,∞)1696837112000

Response Codes

Error CodeDescriptionNote
200Issued Successfully-
400Parameter 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

ParameterTypeRequiredDescriptionRangeExample
miduuidYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
replyuuidYesThe mid of the message being replied to-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typeelemeter_info_listelemeter_info_list
datadataYesMessage Content-See Payload – data
codeintYesResponse Code-See response codes
msgstrYesFailure Reason-Parameter Error
sub_device_idintYesID of the first-level device (only needed if second-level device is reporting on behalf of a first-level device)-1
device_uidstrYes(Second-level) Device UID-iYRkfVpi77
timestampintYesMessage 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
}