Open marcos1108 opened 1 week ago
Your issue is likely delay(60000);
which pauses the MCU (that ends up dropping the internal connection to the server).
Try re-writting without delay
like below
unsigned long lastSendTime = 0; // Stores the time of the last data send
void loop() {
SinricPro.handle();
// Check if 60 seconds have passed since the last send
if (millis() - lastSendTime >= 60000) {
lastSendTime = millis(); // Update last send time
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
float airQuality = mq135.readCO2();
readAndDisplaySensors();
sendToSinricPro(temperature, humidity, airQuality);
}
}
Ref: https://help.sinric.pro/pages/tutorials/air-quality-sensors/mq135
This issue has gone quiet. Spooky quiet. We currently close issues after 14 days of inactivity. It’s been at least 7 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder, the best way to fix this or any other problem is to provide a detailed error description including a serial log. Thanks for being a part of the SinricPro community!
I'm facing an issue with my ESP32 project where I'm unable to send temperature, humidity, and air quality data to Sinric Pro. The device connects to WiFi and Sinric Pro, but fails to send the data. Below is the code I'm using. Any guidance on what might be going wrong would be greatly appreciated.
Issue Description:
The device connects to WiFi and Sinric Pro successfully.
Fails to send temperature, humidity, and air quality data to Sinric Pro.
The Sinric Pro console shows the devices are connected, but no data is being received.
Request for Assistance:
Are there any issues with the way I'm sending the data to Sinric Pro?
Is there a specific order or additional steps required to ensure the data is sent successfully?
Any suggestions or modifications to make the code work as expected?
Thank you in advance for your help!