Cayenne.begin( ) x Blynk.config ()

Hi,
I have a small project that controls some relays, I currently use Blynk, but I would like to migrate to the Cayenne.
I’m having a hard time!
I do not want to use the connection to the wifi of the Cayenne.begin function, since I’m already connected through another method. Using Blynk I have the Blynk.config (token) function, but I have not found similar function on the Cayenne.
I use an ESP8266-12e

tks!!!

Why? You can use the Arduino UNO example to try a connection to Cayenne Dashboard.

1 Like

I commercialize this project, and I can not leave a fixed SSID and password in the program, so I use the WifiManager library so that the person can select their network and enter their password. This way I need a function only to authenticate on the Cayenne, since I’m already connected!

Tks

1 Like

Did you ever figure out how to use “config” instead of begin()?

This is the WiFiManager library? Correct? It’s very interesting feature. Can you post your progress about this project?
Thanks

I’m having the same issue. I’ve tried a few work arounds using the CayenneEthernet.h and “Cayenne.begin(token, WiFi.localIP(), WiFi.gatewayIP(), WiFi.gatewayIP(), WiFi.subnetMask(), mac);” in my sketch.

It gets to…

[3286] Using static IP
[4612] My IP: 0.0.0.0
[5202] Connecting to arduino.mydevices.com:8442

Then hangs… Major bummer… I really would like to use this with the benefit of the wifimanager library. My device is portable and I won’t always have a computer to change the SSID and PWD in the sketch every time I’m on a new WIFI network. Defeats the purpose of a portable device, doesn’t it?

Craig

I’m working on #wifimanager. Now I can use this library. I’ve modified the Cayenne Library. Next week I post a tutorial about it.

1 Like

Great! I look forward to seeing it.

I’m using wifimanager to store the ssid, pass and token. But I can’t insert those data to the Cayenne.begin().
Wifimanager, as I understand, store the data into the json. I don’t know how to put those data to Cayenne

I got it, it works just fine with Cayenne…
BUT - till now, I haven’t managed to request for Cayenne token…

Here are my sketch, WiFiManager.h and WiFiManager.cpp…

.h and .cpp are new, so install new WiFiManager package, backup original .h and .cpp files, and then replace files in library/WiFiManager…

Hope this helps, and I’m working on to store and retrieve token (trying to figure out how to store and retrieve, same as SSID and pass), so it can be completely used for Cayenne.begin() function :slight_smile:

1 Like

Hi Vedran Musica
Nice to modify.

This is my practice

New INO file, with modified WiFiManager.cpp and WiFIManager.h. As in my previous post, install WiFiManager, backup original .h and .cpp files, and replace with this modified ones.

Cayenne token is written in JSON file ON ESP (I use Wemos D1 Mini, I guess it works on any other ESP8266, with little or no modification). This is WiFiManager built-in functionality which I used to make this for me :slight_smile:

If WiFi connection isn’t set, it will start AP config mode, with field to enter Cayenne token. Also, it can be done on demand, shorting D5 pin. On start, shorting D5 and D6 pin will erase json file, and will be needed to set everything again - real hard reset. If D6 is shorted before D5 but while ESP works, JSON file won’t be erased, and WIFi config will be entered - connection reset. If nothing is shorted, after power loss and return, ESP will work with saved data.

By start I mean power off / power on, not reset button.

I haven’t found bugs so far, but there might be some. I’m not good programmer.
Also, there is a lot serial debug left. Delete all that isn’t needed.

There is also 45% space used. All libraries included in INO file ARE needed.

I really hope that this solves someones problems. I know it does mine :grin:
Oh, and one more, last thing: all credits goes to WiFiManager and Cayenne developers, I didn’t do almost nothing except combining this into one (I hope) neat concoction :wink:

2 Likes