Skip to content
JelinaJelina DocumentationTechnical documentation
Back to website

Quick Start: Build Your First EMS Builder Strategy Loop

This guide creates a minimal loop in a test environment: read acquisition points → trial-calculate an aggregation expression → create an aggregation point → verify results. Do not execute unreviewed writes directly on production devices.

  • Edge-EMS Builder is installed and running normally.
  • CommBridge is connected to at least one test device or simulator.
  • An Edge-EMS Builder administrator test account is ready.
  • The Edge-EMS Builder address is confirmed:
    • Direct LAN access: http://<device-IP>:8988
    • JelinaCloud proxy: https://<device-UUID>.proxy.jelina.wise-iot-cloud.com/api

Use your own test environment’s address, port, and account. Do not commit real passwords, Tokens, or device UUIDs to a code repository.

2. Confirm EMS Builder and CommBridge data

Section titled “2. Confirm EMS Builder and CommBridge data”
  1. Log in to the Edge-EMS Builder administration page.
  2. Open the Acquisition Data list.
  3. Confirm that at least two numeric acquisition points exist, for example:
    • voltage_a
    • voltage_b
  4. Check that the points have current values and normal communication status.

If no acquisition points exist, first check:

  • Whether the CommBridge project, nodes, and acquisition tasks are enabled.
  • Whether Edge-EMS Builder’s CommBridge WebSocket address is correct.
  • Whether the device or simulator is online.
  • Whether Edge-EMS Builder or CommBridge logs contain connection or configuration errors.

3. Trial-calculate the aggregation expression

Section titled “3. Trial-calculate the aggregation expression”

On the Aggregation Data page, select Trial Calculation and enter:

if ${voltage_a} == "__Null__" or ${voltage_b} == "__Null__" then
return 0
end
local a = tonumber(${voltage_a}) or 0
local b = tonumber(${voltage_b}) or 0
return (a + b) / 2

Replace voltage_a and voltage_b with actual dataKey values in the test environment.

Expected results:

  • Expression syntax validation passes.
  • A numeric value is returned.
  • The value equals the average of the two acquisition points.

After the trial succeeds, create an aggregation point:

Field Example
dataKey voltage_avg
Name Average voltage
Data type float
Expression Lua expression validated in the previous step
Acquisition/calculation interval Set according to test environment requirements

After saving:

  1. Return to the aggregation data list.
  2. Confirm that voltage_avg has been created.
  3. Change voltage_a or voltage_b in the simulator.
  4. Confirm that voltage_avg updates accordingly.

5. Perform the same operations through APIs

Section titled “5. Perform the same operations through APIs”

Corresponding Edge-EMS Builder APIs include:

  • POST /account/login
  • GET /collection-data-config/list
  • POST /aggregation-data-config/calculate
  • POST /aggregation-data-config/add
  • GET /aggregation-data-config/list

Example login request:

{
"mail": "<test-account>",
"password": "<test-password>"
}

Use the Token returned by the login API for subsequent requests. Refer to the Edge-EMS Builder HTTP API documentation for headers, fields, and response structures. Do not retain real credentials in documents, scripts, or screenshots.

After creating the aggregation point, continue with:

Start with test-environment schemes that carry no device-control risk, such as high-temperature alarms or records of test-point changes, before moving to actual device writes.

  • Acquisition points pushed by CommBridge are visible.
  • The aggregation expression passes trial calculation.
  • The aggregation point is created and refreshes successfully.
  • The script does not error when input is __Null__.
  • All operations use the test environment.
  • Documents, scripts, and screenshots contain no real credentials.