Esp8266-12e MQTT sketch wont compile

What am I missing here? I have imported the Cayenne-MQTT-ESP-master library and installed the board.
Arduino IDE 1.8.4
board NodeMCU 1.0 (ESP-12E Module)
Documents\Arduino\libraries\Cayenne-MQTT-ESP-master\src/CayenneArduinoMQTTClient.h:45:7: note: no known conversion for argument 1 from ‘WiFiClient’ to ‘int&’

exit status 1

#include <CayenneArduinoDefines.h>
#include <CayenneArduinoMQTTClient.h>
#include <CayenneHandlers.h>
#include <CayenneMessage.h>
#include <CayenneMQTTESP32.h>
#include <CayenneMQTTESP8266.h>
#include <CayenneMQTTWiFiClient.h>
#include <DetectDevice.h>

// 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[] = "obnoxious";
char wifiPassword[] = "*";

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

unsigned long lastMillis = 0;

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

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

// Default function for sending sensor data at intervals to Cayenne.
// You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.
CAYENNE_OUT_DEFAULT()
{
	// Write data to Cayenne here. This example just sends the current uptime in milliseconds on virtual channel 0.
	Cayenne.virtualWrite(0, millis());
	// 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("Channel %u, value %s", request.channel, getValue.asString());
	//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError("Error message");
}

follow this tutorial Adding a New Device using MQTT

remove all this :

and keep only :

#include <CayenneMQTTESP8266.h>

1 Like

Thank you.

@modsbyus I had the same issue, I had to whip a brand new laptop image with the latest fresh and latest Arduino IDE download and then install the latest ESP8266 board and the ZIP library.

It then compiled so the Cayenne library is very picky on the version of the board, I did not want to install 2.x of ESP8266 because it totally bombs out all of my sketches using other libraries so this clean install works - I can confirm that

i dont think so, there are many users using the cayenne for esp8266 specially and no one complained about it. It must be something else with your system.