I am using an Arduino Genuino Uno and the Ethernet Shield for Arduino - W5500 Chipset. I have everything set up correctly, but the Cayenne dashboard keeps saying “Last known status: 13 minutes ago ago (Jan 23, 2017, 9:26 am)”. I have notice that my last known status is when I refresh the page, which makes me think that either it connects when I refresh the page but never again or the dashboard is wrong. I can sometimes hook up sensors, but they won’t show any input, even after I confirmed that the coding and wiring is correct… I have been looking through the forums but none of them help.
My serial moniter shows the same thing over and over.
[0] MAC: FE-9A-A1-9E-9D-96
[0] Getting IP…
[2264] My IP: [instert my ip here]
[5001] Connecting to arduino.mydevices.com:8442
[5309] Ready (ping: 233ms).
[41318] Heartbeat timeout
[46317] Connecting to arduino.mydevices.com:8442
[46681] Ready (ping: 288ms).
[72689] Heartbeat timeout
(and then it repeats saying connecting to arduino, ready, and then heartbeat timeout)
//#define CAYENNE_DEBUG // Uncomment to show debug messages #define CAYENNE_PRINT Serial // Comment this out to disable prints and save space #include <CayenneEthernetW5500.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “______”;
Yeah it just got lost in the copy and paste. Sorry.
Here’s the code
//#define CAYENNE_DEBUG // Uncomment to show debug messages #define CAYENNE_PRINT Serial // Comment this out to disable prints and save space #include <CayenneEthernetW5500.h< (in the code its pointing the correct way but this website doesn’t let me)
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “____________”;
No worries. If you want to paste code without losing formatting on this forum, you can highlight it and click the ‘preformatted text’ option in the toolbar. It’s the one that looks like this: </>
Anyway, as for the heartbeat timeout, in the past we’ve seen this resolved by generating a new auth token for the device. To do this:
Delete the device from your account by selecting it from the left sidebar, then the Settings Gear > Configure > Remove Device > Confirm
Re-add the Arduino device from Add New > Device/Widget > Microcontrollers, and make sure to use the new auth token you get from this page in the sketch that you upload to your Uno.
The sketch you shared looks otherwise fine, so you can just swap out the auth token for it.
I removed my arduino like you said, and re-added it. Now, when I open my serial moniter in the code, it acts like it is working,
[0] MAC: FE-61-DE-DC-64-AC
[0] Getting IP…
[2264] My IP: _____________
[5001] Connecting to arduino.mydevices.com:8442
[10078] Connecting to arduino.mydevices.com:8442
[10172] Ready (ping: 21ms).
However, when I go to the Cayenne dashboard, I still get the offline error message at the top of the page “Last known status: 3 minutes ago (Jan 26, 2017, 9:48 am)”.
Can I ask, now that some hours have passed, is this intermittent or has it still been offline since 9:48 AM? It may also be worth clearing the cache in your web browser or trying a different browser to see if you get the same messaging.
Beyond that, it sounds like a network issue. I’d ask you to check that port 8442 is open on your network but if it made a connection even occasionally, it sounds like it is.