|
@ -186,6 +186,18 @@ void receiveMqtt(const char* topic, const char* data) { |
|
|
sensor->humidity = atof(data); |
|
|
sensor->humidity = atof(data); |
|
|
} else if (strcmp("/pressure", topic_last) == 0) { |
|
|
} else if (strcmp("/pressure", topic_last) == 0) { |
|
|
sensor->pressure = atof(data); |
|
|
sensor->pressure = atof(data); |
|
|
|
|
|
} else if (strcmp("/pm10", topic_last) == 0) { |
|
|
|
|
|
sensor->pm10 = atof(data); |
|
|
|
|
|
} else if (strcmp("/pm25", topic_last) == 0) { |
|
|
|
|
|
sensor->pm25 = atof(data); |
|
|
|
|
|
} else if (strcmp("/uvi", topic_last) == 0) { |
|
|
|
|
|
sensor->uvi = atof(data); |
|
|
|
|
|
} else if (strcmp("/uva", topic_last) == 0) { |
|
|
|
|
|
sensor->uva = atof(data); |
|
|
|
|
|
} else if (strcmp("/uvb", topic_last) == 0) { |
|
|
|
|
|
sensor->uvb = atof(data); |
|
|
|
|
|
} else if (strcmp("/voc", topic_last) == 0) { |
|
|
|
|
|
sensor->voc = atof(data); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|