Cayenne + Wifimanager

Hi!
I’m working in a project with Cayenne in a Sonoff device.
I want to store the data of ssid, pass and token with the wifimanager interface.
I save these data in json (I think :slight_smile:) then I can access to it with wifimanager.getValue(), but I don’t know how to put those data to Cayenne.begin().

Anyone have been trying with a configurable Cayenne code?

Perdón mi mal inglés :slight_smile:

Hi, cfieiras.

My solution is as follows.
The new method to solve the WiFi setup problem.
Modify the CayenneWiFiClient.h file in the Cayenne library.

The code is as follows.

/* The new method to solve the WiFi setup problem

  • Steve Wang 2017/04/26
    */

void begin(const char* token){
Blynk.config(token, CAYENNE_DOMAIN, CAYENNE_PORT);
}

arduino code:

void setup() {
Serial.begin(9600);
//Cayenne.begin(token, ssid, password);
Cayenne.begin(token);
}

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

1 Like