# Battery Data

energyhd

# Battery - Hourly Energy

Hourly Energy Consumption values: import energy (ENEIM) and export energy (ENEEX). The parameters of the devices depends on devices type and the device model is also avaiable.

# HTTP Request

GET {url}/data/bat/energy/hourly?startTime={startTime}&endTime={endTime}&deviceIds={device_ids}&params={params}&sum={sum}

# Request Headers

Key Value
x-language en
Authorization Bearer {YOUR_API_TOKEN_HERE}

# Request Params

Parameter Required Type Description
startTime YES datetime Initial DateTime (UTC) for collecting the data
endTime YES datetime Final DateTime (UTC) for collecting the data.
The maximum allowed time interval is 30 days
deviceIds YES Array of String Array of Devices ID. The device ID could be specified more than 1 device by comma (,)
params YES Array of String Array of tag code (XXXXX). The tag code could be specified more than 1 parameters by comma (,)
sum NO Number If you need to summarized energy from devices per hour (device + device), please specified 1

# Response

When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.

Parameter Type Description
count Number The count of the energy hourly data in the requested period time.
deviceId String Devices ID
energy.date datetime The UTC datetime of the energy hourly
params double The tag code or Energy hourly's parameters as requested
{
    "data": {
        "count": 3,
        "energy": [
            {
                "date": "2021-09-14T17:00:00.000Z",
                "deviceId": "613f03c3df8e5d04cd396f88",
                "ENEIM": 0,
                "ENEEX": 8
            },
            ...
        ]
    }
}

Example

As the response above, we have got the hourly import energy (ENEIM) and export energy (ENEEX) in local timestamp "2021-09-15T00:00:00.000Z" of the device "DEVICE_NAME".


# Battery - Daily Energy

energydaily

Daily Energy Consumption values: import energy (ENEIM) and export energy (ENEEX). The parameters of the devices depends on devices type and the device model is also avaiable. Energy on peak time and off peak time is calculated from Thailand's TOU.

# HTTP Request

GET {url}/data/bat/energy/daily?startTime={startTime}&endTime={endTime}&deviceIds={device_ids}&params={params}&sum={sum}&total={total}

# Request Headers

Key Value
x-language en
Authorization Bearer {YOUR_API_TOKEN_HERE}

# Request Params

Parameter Required Type Description
startTime YES datetime Initial DateTime (UTC) for collecting the data
endTime YES datetime Final DateTime (UTC) for collecting the data.
The maximum allowed time interval is 30 days
deviceIds YES Array of String Array of Devices ID. The device ID could be specified more than 1 device by comma (,)
params YES Array of String Array of tag code (XXXXX). The tag code could be specified more than 1 parameters by comma (,)
sum NO Number If you need to summarized energy from devices per day (device + device), please specified 1
total NO Number If you need to summarized energy from days per device (day + day), please specified 1

# Response

When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.

Parameter Type Description
count Number The count of the energy hourly data in the requested period time.
deviceId String Devices ID
energy.date datetime The UTC datetime of the energy daily.
params double The tag code or Energy daily's parameters as requested
{
    "data": {
        "count": 2,
        "energy": [
            {
                "date": "2021-09-14T17:00:00.000Z",
                "deviceId": "613f03c3df8e5d04cd396f88",
                "ENEIM_ON": 241,
                "ENEIM_OFF": 0,
                "ENEIM_TOTAL": 241,
                "ENEEX_ON": 60,
                "ENEEX_OFF": 86,
                "ENEEX_TOTAL": 146
            },
            ...
        ]
    }
}

Example

As the response above, we have got the daily import energy (ENEIM) and export energy (ENEEX) (total, on-peak, off-time) on "2021-09-15" of the device "DEVICE_NAME".

TIP

ENETO_TOTAL on 2021-07-02 is energy daily since 2021-07-01T17:00:00.000Z (local 2021-07-01T00:00:00.000Z) to 2021-07-02T17:00:00.000Z (local 2021-07-02T00:00:00.000Z)
ENETO_ON on 2021-07-02 is energy daily on peak time since 2021-07-01T02:0:00.000Z (local 2021-07-01T09:00:00.000Z) to 2021-07-02T15:00:00.000Z (local 2021-07-02T22:00:00.000Z)
ENETO_OFF on 2021-07-02 is energy daily off peak time = ENETO_TOTAL - ENETO_ON


# Battery - Monhthly Energy

Monthly Energy Consumption values: import energy (ENEIM) and export energy (ENEEX). The parameters of the devices depends on devices type and the device model is also avaiable.

# HTTP Request

GET {url}/data/bat/energy/monthly?startTime={startTime}&endTime={endTime}&deviceIds={device_ids}&params={params}&sum={sum}

# Request Headers

Key Value
x-language en
Authorization Bearer {YOUR_API_TOKEN_HERE}

# Request Params

Parameter Required Type Description
startTime YES datetime Initial DateTime (UTC) for collecting the data
endTime YES datetime Final DateTime (UTC) for collecting the data.
The maximum allowed time interval is 1 year
deviceIds YES Array of String Array of Devices ID. The device ID could be specified more than 1 device by comma (,)
params YES Array of String Array of tag code (XXXXX). The tag code could be specified more than 1 parameters by comma (,)
sum NO Number If you need to summarized energy from devices per monthly (device + device), please specified 1

# Response

When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.

Parameter Type Description
count Number The count of the energy hourly data in the requested period time.
deviceId String Devices ID
energy.date datetime The UTC datetime of the energy monthly
params double The tag code or Energy monthly's parameters as requested
{
    "data": {
        "count": 2,
        "energy": [
            {
                "date": "2021-09-30T17:00:00.000Z",
                "deviceId": "613f03c3df8e5d04cd396f88",
                "ENEIM": 15441,
                "ENEEX": 1344
            },
            ...
        ]
    }
}

Example

As the response above, we have got the monthly import energy (ENEIM) and export energy (ENEEX) in "2021-10" of the device "DEVICE_NAME".


# Battery - Average Power 15 Minutes

rawdata15min

Average active power (PACTO) is for finding peak demand. Reactive power (QACTO) is for finding excess power factor as follow the electricity tariff. The parameters of the devices depends on devices type and the device model is also avaiable.

# HTTP Request

GET {url}/data/bat/power/average?startTime={startTime}&endTime={endTime}&deviceIds={device_ids}

# Request Headers

Key Value
x-language en
Authorization Bearer {YOUR_API_TOKEN_HERE}

# Request Params

Parameter Required Type Description
startTime YES datetime Initial DateTime (UTC) for collecting the data
endTime YES datetime Final DateTime (UTC) for collecting the data.
The maximum allowed time interval is 30 days
deviceIds YES Array of String Array of Devices ID. The device ID could be specified more than 1 device by comma (,)

# Response

When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.

Parameter Type Description
count Number The count of the raw data in the requested period time.
data.date datetime The UTC datetime of the publish timestamp (average 15 minutes) from the device or summarized devices
data.params double The tag code or Average value 15 minutes's parameters as requested
{
    "data": {
        "count": 5,
        "data": [
            {
                "PACTO": 7.764666666666667,
                "QACTO": 0,
                "date": "2021-09-14T17:00:00.000Z"
            },
            ...
        ]
    }
}

Example

As the response above, we have got the average active power (PACTO) and average reactive power (QACTO) per device when specified 1 device and got the summarized average active power (PACTO) and summarized average reactive power (QACTO) all devices when specified more than 1 devices at the local timestamap "2021-09-15T00:00:00.000Z"


# Battery - Max Average Power 15 Mintues

max15min

Finding Maximum Average active power (PACTO) 15 mintues and Maximum Average reactive power (QACTO) 15 mintues with timestamp on the period time to find the behavior maximum load consumption. The parameters of the devices depends on devices type and the device model is also avaiable.

# HTTP Request

GET {url}/data/bat/power/average.max?startTime={startTime}&endTime={endTime}&deviceIds={device_ids}

# Request Headers

Key Value
x-language en
Authorization Bearer {YOUR_API_TOKEN_HERE}

# Request Params

Parameter Required Type Description
startTime YES datetime Initial DateTime (UTC) for collecting the data
endTime YES datetime Final DateTime (UTC) for collecting the data.
The maximum allowed time interval is 30 days
deviceIds YES Array of String Array of Devices ID. The device ID could be specified more than 1 device by comma (,)

# Response

When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.

Parameter Type Description
count Number The count of the raw data in the requested period time.
data.date datetime The UTC datetime of the publish timestamp (max.average 15 minutes per day) from the device or summarized devices
data.params double the tag code or Maximum Average value per day's parameters as requested
{
    "code": 0,
    "message": "Success",
    "time": 27,
    "data": {
        "PACTO": {
            "date": "2021-09-14T18:00:00.000Z",
            "max": 10.700666666666669
        },
        "QACTO": {
            "date": "2021-09-17T04:15:00.000Z",
            "max": 0
        }
    }
}

Example

As the response above, we have got the Max Average active power (PACTO) and Max Average reactive power (QACTO) per device when specified 1 device and got the Max Summarized Average active power (PACTO) and Max Summarized Average reactive power (QACTO). All devices specified more than 1 devices at the local timestamap "2021-09-15T01:00:00.000Z" for active power (PACTO) and the local timestamap "2021-06-17T11:15:00.000Z" for active power (QACTO)