@golemio/microclimate
This module is intended for use with Golemio services. Refer here for further information on usage, local development and more.
Installation
The APIs may be unstable. Therefore, we recommend to install this module as an exact version.
# Latest version
npm install --save-exact @golemio/microclimate@latest
# Development version
npm install --save-exact @golemio/microclimate@devProcessing of historical data
To trigger the measurement data processing of a specific sensor for a specific period, use the queue in RabbitMQ ...microclimate.refreshMeasurementsById according to the template:
{
"sensorAddr": "323434316F317A18",
"dateRange": "currentYear"
}
Where:
sensorAddr - Represents the transmitter's unique identifier. (Table sensor_devices, variable address)
dateRange - Time period: "today", "yesterday", "currentWeek", "previousWeek", "currentMonth", "previousMonth", "currentYear", "previousYear"
If an error is made in the RabbitMQ msg, the program will not crash, but will continue to work. It will also log an error of the type:
error: {
message:
"[Queue ....microclimate.refreshMeasurementsById] Message validation failed: [dateRange must be one of the following values: today, yesterday, currentWeek, previousWeek, currentMonth, previousMonth, currentYear, previousYear]",
class_name: "MessageDataValidator",
}