[SOLVED] Arduino Ethernet Project - setup runs for several hours and hangs - how to detect it is disconnected and reconnect

Dear Community,

I am creating a smart thermostat project.

  • Arduino Uno connected to several sensors and to a remote controlled socket to turn a heater on/off
  • An arduino ethernet shield is used to connect to the internet.
  • I am using the ubidots-ethernet library to send sensor data and receive control inputs (on/off and desired tempetrature)

The project is working: sensor data is logged and I can turn on/off the heater from the ubidots dashboard.

The setup hangs however after a few hours.
Is there a way to detected the connection with ubidots is lost and to reinitiate this?

Regards,
Nico

Hi @NicoCloud,

On our last commit on the Arduino Ethernet Library we delete an infinity loop, that will solve your issue.

Please update your library with the last one .

Regards

Hii @NicoCloud
If you use operating system linux, with Wireshark we can monitor millis() betwen get request & respon or join/not the arduino to network. I use this tool to a few days ago, because my arduino cant sending data to ubidots.