I've set up two multilevel channels in my sketch. But in web ui the temperature channel is represented twice.
Sketch:
Code: Select all
#include "ZUNO_DHT.h"
DHT dht22_sensor(11, DHT22);
// set up channel
ZUNO_SETUP_CHANNELS(
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_TEMPERATURE,
SENSOR_MULTILEVEL_SCALE_CELSIUS,
SENSOR_MULTILEVEL_SIZE_TWO_BYTES,
SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
getterTemp),
ZUNO_SENSOR_MULTILEVEL(ZUNO_SENSOR_MULTILEVEL_TYPE_RELATIVE_HUMIDITY,
SENSOR_MULTILEVEL_SCALE_PERCENTAGE_VALUE,
SENSOR_MULTILEVEL_SIZE_TWO_BYTES,
SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS,
getterHumid)
);
float temp; // here we will store the temperature
float humid; // here we will store the humidity
void setup() {
dht22_sensor.begin();
}
void loop() {
dht22_sensor.read(true);
humid = dht22_sensor.readHumidity() * 100;
temp = dht22_sensor.readTemperature() * 100;
zunoSendReport(1);
zunoSendReport(2);
delay(10000);
}
word getterTemp() {
return temp;
}
word getterHumid() {
return humid;
}
Any Idea how to fix this?
Thanks in advance,
Florian