Arduino often goes offline


#1

In the last two weeks almost daily Arduino Yun goes offline.
It is not a board problem because I did several tests with other boards (Arduino UNo + W5100), and the communication with the modem is always regular.
Depends on what? There is a bug?
Thanks so much


#2

Hi @gabrielimpianti and welcome to the Cayenne Community.

May I ask if you’re using the Yun’s WiFi to get an internet connection, or the built in Ethernet port? (or some other option like a Serial USB connection)


#3

Thank you!
But you certainly …
I use Arduino Yun and I connect to internet via the Ethernet port.
The power via a Micro USB 5V power supply.
Many thanks for your help !!


#4

Just to check the obvious… does the sketch you’re using to connect have the line
#include <CayenneYun.h> in it? I’m guessing yes if you’ve been connected at all with that board, but I’d like to confirm.


#5

Yes no problem… i check.


#6

Are you getting any errors in the serial output?


#7

No no errors …
And the library that I used is correct “CayenneYun.h”.
But the board keeps going offline and back online after a few minutes alone.
Each component (Modem and ArduinoYun) are under UPS, so I think we can rule out voltage problems.


#8

Would you mind showing what your serial output is displaying when going online/offline? Is it 'heartbeat timeout?

-B


#9

Good morning. Sorry for the delay but I was sick.
No, the serial monitor always tells me “connecting to 8442” for many many time.
But during the day it often happens … as if he could not connect with the Cayenne Server.
How can I fix?
Thanks so much!!


#10

Hello guys! I am a “new guy in town”…
I already succeeded to connect my ESP12 to Cayenne trying to replicate RichP’s experience https://www.wemustbegeeks.com/esp8266-nodemcu-wifi-iot-garage-door-opener-relay-with-cayenne/
All things went well (not surprisingly). Or almost…
As the wiring is put in place and the sensors being “seen” online, I begun looking for the real life functioning of the gadget. And watching closely the serial info I get from my ESP I realize that the frequent disconnections from arduino.mydevices.com:8442 are conducting to a very unpleasant feeling for the one which tries, in the real world, to use this little application. The Cayenne interface is going “online” and “offline” all the time.
If somebody have the curiosity to read a log of my serial messages will understand rapidly what the problem is.

Of course I tried, first, to get some answers from this community but I wasn’t able to. Even if there are a lot of “complaints” close to this one, I couldn’t find references to.
Secondly, I’ve tried to look for the problem right in my “yard”. For example I tried to connect through another access point (my private phone using “GSM data connection”, as Access Point. The same result.
I tried to connect with Telnet exactly when serial is reporting “connecting to…” unsuccesfuly but with Telnet it was OK

What can I say more?! At different times of day the communications are OK, having 10-20 minutes without disconnecting. But there are period when 10-20 minutes there is no connection.

So, now I am putting my question: is it right to have such erratic and often disconnections or is it a malfunctioning of the system, or am I doing something wrong?

I am looking forward to have some enlightment for this issue.

Thanks in advance.


#11

I am pretty sure it this is not the usual way to attach a log but I couldn’t (rapidly) find another… Sorry!

IP: 195.214.88.149
WiFi: -93
Ambient Light: 109
Luminosity: 107.00
Sending temperature:27.70
Sending humidity:20.60
[2574121] Connecting to arduino.mydevices.com:8442
[2580944] Connecting to arduino.mydevices.com:8442
[2588019] Connecting to arduino.mydevices.com:8442
[2595043] Connecting to arduino.mydevices.com:8442
[2602143] Connecting to arduino.mydevices.com:8442
[2606687] Ready (ping: 50ms).
Closing Garage!
IP: 195.214.88.149
WiFi: -93
Failed to read from DHT sensor!
Sending temperature:nan
Sending humidity:nan
[2676269] Heartbeat timeout
[2680229] Connecting to arduino.mydevices.com:8442
[2681027] Ready (ping: 221ms).
Closing Garage!
IP: 195.214.88.149
WiFi: -93
Ambient Light: 230
Luminosity: 216.00
Sending temperature:27.70
Sending humidity:21.40
[2737279] Connecting to arduino.mydevices.com:8442
[2739049] Ready (ping: 18ms).
IP: 195.214.88.149
WiFi: -93
Ambient Light: 224
Luminosity: 160.00
Sending temperature:27.70
Sending humidity:20.80
Closing Garage!
[2781022] Heartbeat timeout
[2784023] Connecting to arduino.mydevices.com:8442
[2791006] Connecting to arduino.mydevices.com:8442
[2791311] Connecting to arduino.mydevices.com:8442
[2791642] Connecting to arduino.mydevices.com:8442
[2792219] Ready (ping: 216ms).
Closing Garage!
IP: 195.214.88.149
WiFi: -93
Ambient Light: 214
Luminosity: 199.00
Sending temperature:27.70
Sending humidity:20.90
[2866611] Heartbeat timeout
[2870925] Connecting to arduino.mydevices.com:8442
[2873023] Ready (ping: 269ms).
Closing Garage!
IP: 195.214.88.149
WiFi: -91
Ambient Light: 150
Luminosity: 138.00
Sending temperature:27.70
Sending humidity:20.80
[2889352] Connecting to arduino.mydevices.com:8442
[2889695] Ready (ping: 18ms).
Closing Garage!
[2904998] Connecting to arduino.mydevices.com:8442
[2912751] Ready (ping: 7435ms).
Closing Garage!
IP: 195.214.88.149
WiFi: -91
Ambient Light: 197
Luminosity: 212.00
Sending temperature:27.70
Sending humidity:21.10
[2963195] Heartbeat timeout
[2966197] Connecting to arduino.mydevices.com:8442
[2972769] Connecting to arduino.mydevices.com:8442
[2979869] Connecting to arduino.mydevices.com:8442
[2986227] Connecting to arduino.mydevices.com:8442
[2992968] Connecting to arduino.mydevices.com:8442
[3000092] Connecting to arduino.mydevices.com:8442
IP: 195.214.88.149
WiFi: -93
Ambient Light: 136
Luminosity: 134.00
Sending temperature:27.70
Sending humidity:20.70
[3007443] Connecting to arduino.mydevices.com:8442
[3014192] Connecting to arduino.mydevices.com:8442
[3021291] Connecting to arduino.mydevices.com:8442
[3028366] Connecting to arduino.mydevices.com:8442
[3035365] Connecting to arduino.mydevices.com:8442
[3042365] Connecting to arduino.mydevices.com:8442
[3049439] Connecting to arduino.mydevices.com:8442


#12

Yes, in my case there are heartbeat timeouts…