EcoWatt Technologies Logo

MC - PCS Control

Send PCS Remote Control Strategy

  • Topic:
    • Custom MQTT by user: v1/watt/${PRODUCT_KEY}/${DEVICE}/pcs_control/set/command
    • Default MQTT by platform: v1/user/${TENANT}/${DEVICE}/pcs_control/set/command
  • Permission: Subscribe

Payload – Main Structure

ParameterTypeRequiredDescriptionRangeExample
midUUIDYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typepcs_setpcs_set
datadataYesMessage Content-See Payload – data
sub_device_uidstrYesUID of the first-level device (only needed when a second-level device reports on behalf of a first-level)-jHODSda39
sub_device_idintYesID of the first-level device (only needed when a second-level device reports on behalf of a first-level)(0, ∞)2
device_uidstrYesDevice UID-iYRkfVpi77
timestampintYesMessage timestamp (milliseconds)(0, ∞)1696837112000

Payload – data

ParameterTypeRequiredDescriptionRangeExample
pcs_fault_resetintNoFault Reset[0,1]1
pcs_device_startupintNoDevice Startup[0,1]0
pcs_device_stopintNoDevice Shutdown[0,1]1
pcs_remote_emergency_stopintNoRemote Emergency Stop[0,1]0
pcs_reset_cumulative_chargeintNoReset Cumulative Charge[0,1]1
pcs_reset_cumulative_dischargeintNoReset Cumulative Discharge[0,1]1
pcs_remote_local_settingintNoRemote/Local Setting (0 = Local, 1 = Remote)[0,1]1

Payload Example

{
  "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
  "mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
  "type": "pcs_set",
  "data": {
    "pcs_device_stop": 1
  },
  "sub_device_uid": "${SUB_DEVICE_UID}",
  "sub_device_id": "${SUB_DEVICE_ID}",
  "device_uid": "${DEVICE_UID}",
  "timestamp": 1695265371000
}

Send PCS Remote Control Strategy Response

  • Topic:
    • Custom MQTT by user: v1/watt/${PRODUCT_KEY}/${DEVICE}/pcs_control/set/result
    • Default MQTT by platform: v1/user/${TENANT}/${DEVICE}/pcs_control/set/result
  • Permission: Subscribe

Payload – Main Structure

ParameterTypeRequiredDescriptionRangeExample
midUUIDYesMessage ID-4c5b3c27-cea8-4ea1-a936-41fd3596e0e9
replyUUIDYesThe mid of the message being replied to-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typepcs_setpcs_set
codeintYesResponse Code-See Response Codes
msgstrNoFailure Reason-Parameter error
sub_device_uidstrYesSub Device UID--
sub_device_idintYesSub Device ID-2
device_uidstrYes(Second-level) Device UID-iYRkfVpi77
timestampintYesMessage timestamp (milliseconds)(0, ∞)1696837112000

Response Codes

Error CodeDescriptionExplanation
200Issued Successfully-
400Parameter Error-

Payload Example

{
  "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
  "mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
  "type": "pcs_set",
  "reply": "3e681859-6917-4b9a-9afd-3f162cd185bd",
  "code": 200,
  "msg": "Command issued successfully",
  "sub_device_uid": "jHODSda39",
  "sub_device_id": 2,
  "device_uid": "iYRkfVpi77",
  "timestamp": 1695265671000
}

Request to Synchronize PCS Remote Control Strategy

  • Topic:
    • Custom MQTT by user: v1/watt/${PRODUCT_KEY}/${DEVICE}/pcs_control/sync/command
    • Default MQTT by platform: v1/user/${TENANT}/${DEVICE}/pcs_control/sync/command
  • Permission: Publish

Payload – Main Structure

ParameterTypeRequiredDescriptionRangeExample
midUUIDYesMessage ID-4c5b3c27-cea8-4ea1-a936-41fd3596e0e9
typestrYesMessage Typepcs_syncpcs_sync
sub_device_uidstrYesUID of the first-level device (only needed when a second-level device reports on behalf of a first-level)-jHODSda39
device_uidstrYesDevice UID-iYRkfVpi77
timestampintYesMessage timestamp (milliseconds)(0,∞)1696837112000

Response Codes

Error CodeDescriptionExplanation
200Issued Successfully-
400Parameter Error-

Payload Example

{
  "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
  "mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
  "type": "pcs_sync",
  "sub_device_uid": "${SUB_DEVICE_UID}",
  "sub_device_id": "${SUB_DEVICE_ID}",
  "device_uid": "${DEVICE_UID}",
  "timestamp": 1695265671000
}

Synchronize PCS Remote Control Strategy Response

  • Topic:
    • Custom MQTT by user: v1/watt/${PRODUCT_KEY}/${DEVICE}/pcs_control/sync/result
    • Default MQTT by platform: v1/user/${TENANT}/${DEVICE}/pcs_control/sync/result
  • Permission: Subscribe

Payload – Main Structure

ParameterTypeRequiredDescriptionRangeExample
midUUIDYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
typestrYesMessage Typepcs_syncpcs_sync
codeintYesResponse CodeSee Response Codes
datadataYesMessage Content-See Payload – data
sub_device_uidstrYesUID of the first-level device (only needed when a second-level device reports on behalf of a first-level)-jHODSda39
sub_device_idintYesID of the first-level device (only needed when a second-level device reports on behalf of a first-level)-2
device_uidstrYesDevice UID-iYRkfVpi77
timestampintYesMessage timestamp (milliseconds)(0,∞)1696837112000

Payload – data

ParameterTypeRequiredDescriptionRangeExample
pcs_fault_resetintNoFault Reset[0,1]1
pcs_device_startupintNoDevice Startup[0,1]0
pcs_device_stopintNoDevice Shutdown[0,1]1
pcs_remote_emergency_stopintNoRemote Emergency Stop[0,1]0
pcs_reset_cumulative_chargeintNoReset Cumulative Charge[0,1]1
pcs_reset_cumulative_dischargeintNoReset Cumulative Discharge[0,1]1
pcs_remote_local_settingintNoRemote/Local Setting (0 = Local, 1 = Remote)[0,1]1

Payload Example

{
  "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
  "mid": "ee2e8f09-b280-4e4d-bcb9-1529b703cfed",
  "reply": "3e681859-6917-4b9a-9afd-3f162cd185bd",
  "type": "pcs_sync",
  "code": 200,
  "data": {
    "pcs_fault_reset": 0,
    "pcs_device_startup": 0,
    "pcs_device_stop": 1,
    "pcs_remote_emergency_stop": 0,
    "pcs_reset_cumulative_charge": 0,
    "pcs_reset_cumulative_discharge": 0,
    "pcs_remote_local_setting": 0
  },
  "sub_device_uid": "${SUB_DEVICE_UID}",
  "sub_device_id": "${SUB_DEVICE_ID}",
  "device_uid": "${DEVICE_UID}",
  "timestamp": 1695265371000
}