i have added it now in the code.
CAYENNE_OUT(VIRTUAL_CHANNEL)
{
sensors.requestTemperatures();
Cayenne.virtualWrite(VIRTUAL_CHANNEL, sensors.getTempFByIndex(0), "temp", "f");
}
have a look at this Sending MQTT messages within rate limits
i have added it now in the code.
CAYENNE_OUT(VIRTUAL_CHANNEL)
{
sensors.requestTemperatures();
Cayenne.virtualWrite(VIRTUAL_CHANNEL, sensors.getTempFByIndex(0), "temp", "f");
}
have a look at this Sending MQTT messages within rate limits