NodeMCU ESP8266 - Not posible to connect WIFI

Hello, I have a NodeMCU ESP8266 Amica, I have tried to connect, but no success. I have used the Arduino UNO => WIFI Shiead option.
I have achieved to connect it using BLYNK, but with Cayenne I not able to connect.
Compiling is OK, but no connection to Wifi, neither to Cayenne. “Waiting for board to connect…”
Please, can you help me, I’m completely lost.
Thank you for your support.

Hi @bigrocket70,

There has been some discussion in forum surrounding ESP8266. While not officially supported in Cayenne’s UI, there are some slight code modifications that can be made to get you up and running. This is a pretty helpful post to read through:

Let us know if it helps. :slight_smile:

-B

Hi, I have succeded yesterday to connect with NodeMCU, here’s code I used, just modify ssid, pass and token and (very important, wait for a while, with serial monitor):

#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <ESP8266WiFi.h>
#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"

// WiFi network info.
char ssid[] = "ssid";
char wifiPassword[] = "pass";
char token[] = "token";

void setup() {
  Serial.begin(230400);
  Cayenne.begin(token, ssid, wifiPassword);
}

void loop() {
  Cayenne.run();
  // do something
}

CAYENNE_CONNECTED()
{
  CAYENNE_LOG("Connection established");
}

Hi guys,
many thanks for your help! I have achieved to connect it to Wifi using the sketch from kurjak, I’m able to add actuators and sensor, it appears on dashboard, however it’s showing the status: “Unreachable”.
If you have any idea what’s wrong, please, let me know.

One thing more: Some days ago, I have achieve to connect but the PIN assignment showed as disabled (showing red crossed circle when I have put the mouse pointer on it. So, I have reset the Dashboard and now it’s working fine. But always when I reconnect new board (with new token) I must to reset dashboard again. … just if somebody has the same trouble, this was my solution.

Thanks again for your help.
I keen to make it working.

Cheers!

Hi again,
great things happened! From my Android Cayenne App is working perfectly! I have reset the Dashboard from my desktop PC and I have added the actuator from Android Cayenne App and it’s really working! Amazing!

So, no the question is what’s wrong with dashboard!
I will checked from to connect from other network just to confirm!

I will keep you informed!
Thanks again!

While it may not be the only case for this error message, generally what I’ve found is that these ‘Unreachable’ widgets are generated by creating the widget while the Arduino device they are associated to is offline. There is a bug in our UI flow that allows you to do this in the first place that we’ll be resolving soon – then the UI will insist you bring the parent device online before continuing with widget creation.

Farther down the road we’ll be improving Cayenne so it doesn’t matter whether the parent device is online or offline during widget creation - at that time we’ll remove this restriction.

Hi rsiegel, thanks for info and for effort.
I will check again if the “Unreachable” issue is related to “off-line” status of Arduino device. The strange thing in my case is that from Android app it’s working perfectly, I mean in the same time I’m able to add the sensor or actuator from App but from PC shows “Unreachable”. I have observed also in my case, that if I switch ON or OFF the actuator from Android App, the status is not changed / updated on my PC dashboard.
Just if this info can help you for investigation.

Thanks.

HI @bigrocket70, thought I would check in to see if you’re still having issues with ‘unreachable’ widgets or not, and just to see how things are going in general.

You had mentioned issues syncing dashboard state between Android and Arduino in this post, and I wanted to let you know that we’re hard at work rewriting the back end code that handles syncing between mobile and web in an effort to improve this facet of the platform. If you (or anyone else reading) are interested, I’m gathering a list of users to be part of a small beta test for this new mobile/web sync code when it is available on one of our pre-production servers. Just reply here or send me a PM if you’d like to part of that. There would be no formal test required – just use the servers with that new code in place and give us any issues or feedback that you might have.

Hello rsiegel, thanks for your answer and great job.

I have tried to re-connect my device to another network and finally, it
works better. Now the status “Unreachable” disappeared however there are
still some problems with the status icon on the switch in the app. (light
switch, when the status is changed, the “bulb” picture disappears from the
button. It is not happening always, I need to identify the circumstances
under which occurs) I will try to make a video when appears again.

Thank you.
Regards,
bigrocket70

Mine says offline after I tried to add a relay. Why isn’t the NodeMCU supported?