Device Offline (even after restart remains offline)

  • Device & model you are using (Ex: Pi 2 Model B or Arduino Uno with W5100 ethernet shield)
    Arduino UNO + W5100

  • What dashboard are you using? (Web, iOS, Android)
    Web

  • Please describe the bug / issue as detailed as possible. Attaching the code and any relevant screenshots would be very helpful!
    New project, 3 widgets (generic actuators), simple sketch, works for a while the first time, then goes offline, restart does not solve this, actuators do not work. Realise simular problems are allready described,

Another simular project (on my own account) just keep on working. so question how to check if you are offline because your banned due to creating too much traffic; not expecting this sketch is doing this but it is possible I am loosing connection because I am not returning fast enough back to the loop but on the other hand I tested this already a couple of times without any problems.

PS I am working on a new account for a new cayennne member; so i want to start with a working environment :smiley:

Sketch looks like:

/*
Cayenne Ethernet Example

This sketch connects to the Cayenne server using an Arduino Ethernet Shield W5100
and runs the main communication loop.

The Cayenne Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.

Steps:

  1. Set the token variable to match the Arduino token from the Dashboard.
  2. Compile and upload this sketch.

For Cayenne Dashboard widgets using digital or analog pins this sketch will automatically
send data on those pins to the Cayenne server. If the widgets use Virtual Pins, data
should be sent to those pins using virtualWrites. Examples for sending and receiving
Virtual Pin data are under the Basics folder.

  • RemoteSwitch library v2.3.0 (20121229) made by Randy Simons http://randysimons.nl/
  • License: GPLv3. See license.txt

*/

//#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <CayenneEthernet.h>

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “xxxxxx”;

#include <RemoteTransmitter.h>
KaKuTransmitter kaKuTransmitter(7); //data-pin 433 on pin 7

void setup()
{
Serial.begin(115200);
Cayenne.begin(token);
}

void loop()
{
Cayenne.run();
}

CAYENNE_IN(V1) // KaKu B 1
{
kaKuTransmitter.sendSignal(‘B’,1, getValue.asInt());
}
CAYENNE_IN(V2) // KaKu B 2
{
kaKuTransmitter.sendSignal(‘B’,2, getValue.asInt());
}
CAYENNE_IN(V3) // KaKu B 3
{
kaKuTransmitter.sendSignal(‘B’,3, getValue.asInt());
}

@wj4me uncomment #define CAYENNE_DEBUG and check serial monitor for the error.

The LOG looks like this, the"["is repeated…

[0] MAC: FE-D9-E9-A5-D4-E4
[0] Getting IP...
[1613] My IP: 192.168.0.106
[5001] state 0, tconn 0
[5001] Connecting to arduino.mydevices.com:[0] MAC: FE-D9-E9-A5-D4-E4
[1] Getting IP...
[1614] My IP: 192.168.0.106
[5001] state 0, tconn 0
[5001] Connecting to arduino.mydevices.com:8442
[37224] Connect failure
[37224] state 0, tconn 0
[37225] Connecting to arduino.mydevices.com:8442
[37[0] MAC: FE-D9-E9-A5-D4-E4
[1] Getting IP...
[1614] My IP: 192.168.0.106
[5001] state 0, tconn 0
[5001] Connecting to arduino.mydevices.com:8442
[5066] Connect failure
[10002] Connecting to arduino.mydevices.com:8442
[10171] Connect success
[10172] <msg 2,1,10
<udwr7nnfnv
[10173] state 0, tconn 1
[10211] Login timeout
[0[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[

BTW This is the first time I am using this library, running without this library solves the problem but ping is low

[0] MAC: FE-D9-E9-A5-D4-E4
[0] Getting IP...
[1613] My IP: 192.168.0.106
[5001] Connecting to arduino.mydevices.com:8442
[10277] Connecting to arduino.mydevices.com:8442
[10806] Ready (ping: 154ms).

@shramik_salgaonkar did some test with another Arduino+W5100 combination and it seems problems are caused by the hardware. Thanks for your reaction to the problem, sorry for the trouble.

3 Likes

Happy that you solve the problem. What was the exact problem in the hardware ? Did you manage to find it ?

Should practice on my solder skills; in this case attaching an antenna to the 433 sensor (will revert next time to the 17cm wire)

1 Like

Get some flux gel. It make it very simple :wink: