Usage data
  • 06 Sep 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Usage data

  • Dark
    Light
  • PDF

Article summary

File

download this sample file and open with any hex editor

How to read the content

Port setting
Fig.1 File content
  • AC 2F 00 00  -> 4B of last value (4B little endian)
  • 17      -> date in hex
  • 07      -> month in hex
  • 16      -> year in hex
  • the rest is 4B of value (4B little endian) at 00.00 AM to 23.00 PM

File sent to server

  • Protocol: MQTT
  • Topic: device/meter_usage/(imei)
  • Data form: JSON
  • Format:
{
  "DATE": datetime with string type and format "YY-MM-DD",
  "LAST_VAL":  integer of rotation,
  "DATA_COUNT": length of DATA props,
  "DATA": array of integer of rotation that started from 23 PM sorted descending until 0 AM
}
  • Sample:
{
  "DATE": "2023-08-28",
  "LAST_VAL": 23,
  "DATA_COUNT": 24,
  "DATA": [
    23,
    22,
    21,
    20,
    19,
    18,
    17,
    16,
    15,
    14,
    13,
    12,
    11,
    10,
    9,
    8,
    7,
    6,
    5,
    4,
    3,
    2,
    1,
    0
  ]
}

Was this article helpful?