[!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
Parameter Type Required Description Range Example mid UUID Yes Message ID - 3e681859-6917-4b9a-9afd-3f162cd185bd type str Yes Message Type ems_mode_details ems_mode_details data data Yes Message Content - See Payload – EMSMode device_uid str Yes EMS Device UID - iYRkfVpi77 timestamp int Yes Timestamp (milliseconds) (0, ∞) 1696837112000 -
Payload – EMSMode
Parameter Type Required Description Range Example mode int Yes Working Mode 1 - Policy Mode 2 - Grid FM Mode (Ancillary Service Mode) 3 - Mixed Mode 1 policy_mode int Yes when mode is 1 and 3 Policy Mode 1 - Peak Shaving 2 - Scheduled PV Charging 3 - Full PV Priority 1 grid_fm_port int Yes when mode is 2 and 3 Grid FM Port [1, 65535] 502 grid_fm_mode int Yes when mode is 2 and 3 Grid FM Mode Defines how power is distributed among available BESS units. 1 - Average 2 - SOC 3 - Battery Capacity 1 occupied_time_sec int Yes when mode is 3 Occupied 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
Parameter Type Required Description Range Example trace_id UUID No Trace ID - 577f5df0-65d6-432d-8aac-0116e9530152 mid UUID Yes Message ID - 4c5b3c27-cea8-4ea1-a936-41fd3596e0e9 type str Yes Message Type ems_mode_sync ems_mode_sync device_uid str Yes EMS Device UID - iYRkfVpi77 timestamp int Yes Timestamp (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
Parameter Type Required Description Range Example trace_id UUID No Trace ID - 577f5df0-65d6-432d-8aac-0116e9530152 mid UUID Yes Message ID - 4c5b3c27-cea8-4ea1-a936-41fd3596e0e9 type str Yes Message Type ems_mode_sync ems_mode_sync device_uid str Yes EMS Device UID - iYRkfVpi77 timestamp int Yes Timestamp (ms) (0,∞) 1696837112000 reply UUID Yes Reply Message ID - 3e681859-6917-4b9a-9afd-3f162cd185bd code int Yes Response Code - 200 data data Yes Message 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
Parameter Type Required Description Range Example trace_id UUID No Trace ID - 577f5df0-65d6-432d-8aac-0116e9530152 mid UUID Yes Message ID - 4c5b3c27-cea8-4ea1-a936-41fd3596e0e9 type str Yes Message Type ems_mode_set ems_mode_set device_uid str Yes EMS Device UID - iYRkfVpi77 timestamp int Yes Timestamp (ms) (0,∞) 1696837112000 data data Yes Message 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
Parameter Type Required Description Range Example trace_id UUID No Trace ID - 577f5df0-65d6-432d-8aac-0116e9530152 mid UUID Yes Message ID - 4c5b3c27-cea8-4ea1-a936-41fd3596e0e9 type str Yes Message Type ems_mode_set ems_mode_set device_uid str Yes EMS Device UID - iYRkfVpi77 timestamp int Yes Timestamp (ms) (0,∞) 1696837112000 reply UUID Yes Reply Message ID - 3e681859-6917-4b9a-9afd-3f162cd185bd code int Yes Response Code - 200 data data Yes Message 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 } }
