ESP8266 showing offline and more


#1

I am using ESP8266 based Wemos D1 board to connect to Cayenne.

  1. It rarely shows my device online even though widget is accurately shows my data coming from device.

  2. Value widget shows the data and also shows chart when I click Details&Chart button. However, when I add Line Chart widget to see data from THE SAME channel, it tells me No Data Available.

  3. When I want to add Analog Input Sensor, it does not let me choose device, even my device is online(after many tries and resets)

  4. And one of my Line chart widgets seems to be magically missing from my dashboard even though I see its name on the left side. Ridiculous :slight_smile:
    I am just using simple sketch file.

    // This example shows how to connect to Cayenne using an ESP8266 and send/receive sample data.
    // Make sure you install the ESP8266 Board Package via the Arduino IDE Board Manager and select the correct ESP8266 board before compiling.

//#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid[] = “Nijat”;
char wifiPassword[] = “xxxxxxxxxxx”;

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = “xxxxxxxxxxxxxxx”;
char password[] = “xxxxxxxxxxxxxxx”;
char clientID[] = “xxxxxxxxxxxxxxx”;

unsigned long lastMillis = 0;

void setup() {
Serial.begin(9600);
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}

void loop() {
Cayenne.loop();

//Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.
if (millis() - lastMillis > 1000) {
lastMillis = millis();
//Write data to Cayenne here. This example just sends the current uptime in milliseconds.
Cayenne.virtualWrite(V0,analogRead(0)); // 0 or V0 not matter
//Some examples of other functions you can use to send data.
//Cayenne.celsiusWrite(1, 22.0);
//Cayenne.luxWrite(2, 700);
//Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
}
}

//Default function for processing actuator commands from the Cayenne Dashboard.
//You can also use functions for specific channels, e.g CAYENNE_IN(1) for channel 1 commands.
CAYENNE_IN_DEFAULT()
{
CAYENNE_LOG(“CAYENNE_IN_DEFAULT(%u) - %s, %s”, request.channel, getValue.getId(), getValue.asString());
//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError(“Error message”);
}

And there is more and more problems on every click, but you are organizing World’s First ESP8266 IoT contest :slight_smile:
Finally, nothing is wrong with my device because I used it to build very complex projects with Adafruit IO.
I try to upload an image right now but that does not work either. It stuck at 100%.


#2

#3

Hi guys,

I’m randomly having the exact same problems (1, 2 and 3), with a NodeMCU ESP8266, using the MQTT API. Many, many times, the device shows offline, but MQTT messages keep updating the dashboard just fine. Also the same issues described in items 2 and 3.

At least I’m not the only one! :sweat_smile:


#4

I know a month ago there were issues with MQTT online/offline status but believe it was resolved.

However, I can recreate your issues also so there may be something else going on. @rsiegel are you aware of any issues regarding this still?


#5

Looks like there is a issue they are working on. See this post:


#6

So now I want to create a trigger to automate my system. However, as I understand, it does not work either because devices are shown offline in Cayenne. I manually change sensor conditions to test, but trigger is not reacting. What else can I do with Cayenne, even it does not let me to use triggers? :frowning:


#7

hi mr nicathesenov i have the same problem with you, do you have solution in now?


#8

@MiftahulJannah0911 there is a bug with trigger engine and team is working on getting new engine.