EcoWatt Technologies Logo

Setting - EMS Working Mode

[!NOTE] Available in EcoWatt EMS v1.6.6 and later.

Reporting EMS Mode

  • Topic: ${PREFIX}/${DEVICE}/ems_mode/details/post

  • Platform Permission: Subscribe

  • Direction: EMS to Platform

  • Trigger: When changed by local UI or API.

  • Payload – Main Structure

    ParameterTypeRequiredDescriptionRangeExample
    midUUIDYesMessage ID-3e681859-6917-4b9a-9afd-3f162cd185bd
    typestrYesMessage Typeems_mode_detailsems_mode_details
    datadataYesMessage Content-See Payload – EMSMode
    device_uidstrYesEMS Device UID-iYRkfVpi77
    timestampintYesTimestamp (milliseconds)(0, ∞)1696837112000
  • Payload – EMSMode

    ParameterTypeRequiredDescriptionRangeExample
    modeintYesWorking Mode1 - Policy Mode 2 - Grid FM Mode (Ancillary Service Mode) 3 - Mixed Mode1
    policy_modeintYes when mode is 1 and 3Policy Mode1 - Peak Shaving 2 - Scheduled PV Charging 3 - Full PV Priority1
    grid_fm_portintYes when mode is 2 and 3Grid FM Port[1, 65535]502
    grid_fm_modeintYes when mode is 2 and 3Grid FM Mode Defines how power is distributed among available BESS units.1 - Average 2 - SOC 3 - Battery Capacity1
    occupied_time_secintYes when mode is 3Occupied Time (seconds) How long after zero power from ancillary, EMS should switch to policy mode automatically.(0, 60]10
  • Payload Example

    {
      "mid": "d6a712f5-f809-4939-8bcf-4dd7ad2b6faa",
      "type": "ems_mode_details",
      "device_uid": "iYRkfVpi77",
      "timestamp": 1696837112000,
      "data": {
        "mode": 2,
        "policy_mode": 1,
        "grid_fm_port": 502,
        "grid_fm_mode": 1,
        "occupied_time_sec": 10
      }
    }
    

Get Current EMS Mode - Request

  • Topic: ${PREFIX}/${DEVICE}/ems_mode/sync/command

  • Platform Permission: Publish

  • Direction: Platform to EMS

  • Payload – Main Structure

    ParameterTypeRequiredDescriptionRangeExample
    trace_idUUIDNoTrace ID-577f5df0-65d6-432d-8aac-0116e9530152
    midUUIDYesMessage ID-4c5b3c27-cea8-4ea1-a936-41fd3596e0e9
    typestrYesMessage Typeems_mode_syncems_mode_sync
    device_uidstrYesEMS Device UID-iYRkfVpi77
    timestampintYesTimestamp (ms)(0,∞)1696837112000
  • Payload Example

    {
        "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
        "mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
        "type": "ems_mode_sync",
        "device_uid": "iYRkfVpi77",
        "timestamp": 1696837112000
    }
    

Get Current EMS Mode - Response

  • Topic: ${PREFIX}/${DEVICE}/ems_mode/sync/result

  • Platform Permission: Subscribe

  • Direction: EMS to Platform

  • Trigger: When requested by platform.

  • Payload – Main Structure

    ParameterTypeRequiredDescriptionRangeExample
    trace_idUUIDNoTrace ID-577f5df0-65d6-432d-8aac-0116e9530152
    midUUIDYesMessage ID-4c5b3c27-cea8-4ea1-a936-41fd3596e0e9
    typestrYesMessage Typeems_mode_syncems_mode_sync
    device_uidstrYesEMS Device UID-iYRkfVpi77
    timestampintYesTimestamp (ms)(0,∞)1696837112000
    replyUUIDYesReply Message ID-3e681859-6917-4b9a-9afd-3f162cd185bd
    codeintYesResponse Code-200
    datadataYesMessage Content-See Payload – EMSMode
  • Payload Example

    {
        "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
        "mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
        "type": "ems_mode_sync",
        "device_uid": "iYRkfVpi77",
        "timestamp": 1696837112000,
        "reply": "3e681859-6917-4b9a-9afd-3f162cd185bd",
        "code": 200,
        "data": {
            "mode": 2,
            "policy_mode": 1,
            "grid_fm_port": 502,
            "grid_fm_mode": 1,
            "occupied_time_sec": 10
        }
    }
    

Set EMS Mode - Request

  • Topic: ${PREFIX}/${DEVICE}/ems_mode/set/command

  • Platform Permission: Publish

  • Direction: Platform to EMS

  • Trigger: When requested by platform.

  • Payload – Main Structure

    ParameterTypeRequiredDescriptionRangeExample
    trace_idUUIDNoTrace ID-577f5df0-65d6-432d-8aac-0116e9530152
    midUUIDYesMessage ID-4c5b3c27-cea8-4ea1-a936-41fd3596e0e9
    typestrYesMessage Typeems_mode_setems_mode_set
    device_uidstrYesEMS Device UID-iYRkfVpi77
    timestampintYesTimestamp (ms)(0,∞)1696837112000
    datadataYesMessage Content-See Payload – EMSMode
  • Payload Example

    {
        "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
        "mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
        "type": "ems_mode_set",
        "device_uid": "iYRkfVpi77",
        "timestamp": 1696837112000,
        "data": {
            "mode": 2,
            "policy_mode": 1,
            "grid_fm_port": 502,
            "grid_fm_mode": 1,
            "occupied_time_sec": 10
        }
    }
    

Set EMS Mode - Response

  • Topic: ${PREFIX}/${DEVICE}/ems_mode/set/result

  • Platform Permission: Subscribe

  • Direction: EMS to Platform

  • Trigger: When requested by platform.

  • Payload – Main Structure

    ParameterTypeRequiredDescriptionRangeExample
    trace_idUUIDNoTrace ID-577f5df0-65d6-432d-8aac-0116e9530152
    midUUIDYesMessage ID-4c5b3c27-cea8-4ea1-a936-41fd3596e0e9
    typestrYesMessage Typeems_mode_setems_mode_set
    device_uidstrYesEMS Device UID-iYRkfVpi77
    timestampintYesTimestamp (ms)(0,∞)1696837112000
    replyUUIDYesReply Message ID-3e681859-6917-4b9a-9afd-3f162cd185bd
    codeintYesResponse Code-200
    datadataYesMessage Content-See Payload – EMSMode
  • Payload Example

    {
        "trace_id": "577f5df0-65d6-432d-8aac-0116e9530152",
        "mid": "4c5b3c27-cea8-4ea1-a936-41fd3596e0e9",
        "type": "ems_mode_set",
        "device_uid": "iYRkfVpi77",
        "timestamp": 1696837112000,
        "reply": "3e681859-6917-4b9a-9afd-3f162cd185bd",
        "code": 200,
        "data": {
            "mode": 2,
            "policy_mode": 1,
            "grid_fm_port": 502,
            "grid_fm_mode": 1,
            "occupied_time_sec": 10
        }
    }