This API, developed in NodeJS, estimates battery life in IQRF networks based on a comprehensive battery life estimation model. It considers network size, data collection cycles, and specific active/inactive periods, ensuring accurate predictions for battery longevity. Designed for ease of integration, it uses RESTful POST requests with JSON messages.
The API enforces rate limiting to ensure fair usage and protect against abuse. The limit is set to 100 requests every 15 minutes. If this limit is exceeded, the API will respond with a 429 HTTP status code and the following message:
{ "error": "ratelimit" }
Method: POST
URI: https://api.iqhtech.eu/
{
"get": "estimatedLifetime",
"params": {
"batteryCapacity": "INTEGER", // in mAh, default: 1920 as as 80% percent of the total capacty of Xeno XLP-060F AA 2400mAh 3.6V
"activeDaysNum": "INTEGER", // between 0-7
"activeHoursStart": "INTEGER", // between 0-23
"activeHoursEnd": "INTEGER", // between 0-23
"activePeriodMinutes": "INTEGER", // 1,2,4,5,6,10,15,20,30,60,120
"inactivePeriodMinutes": "INTEGER", // 1,2,4,5,6,10,15,20,30,60,120
"numberOfNodes": "INTEGER", // between 1-239
"requestsPerPeriod": "INTEGER" // 1,2,3,4
}
}
{
"estimatedBatteryLifetime": "FLOAT", // battery life in years
"collectionCount": "INTEGER" // count of requests served from capacity
}
Note: The API assumes IQRF LP communication mode by default for battery-powered devices and considers all network nodes as routers in a homogeneous network.