WiFi Shield vs Wemos ESP8266 MQTT sketch compilation error


#1

Tryung test sketch look compilation errors

Arduino: 1.8.5 (Windows 7), Плата:"WeMos D1 R2 & mini, 80 MHz, 4M (1M SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 921600"

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26:0,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h: In member function 'void CayenneMQTTWiFiClient::begin(const char*, const char*, const char*, const char*, const char*)':

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:49:33: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]

    WiFi.begin(ssid, wifiPassword);

                                 ^

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:24:0,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Program Files (x86)\Arduino-ESP32-IDE\libraries\WiFi\src/WiFi.h:79:9: error:   initializing argument 1 of 'int WiFiClass::begin(char*, const char*)' [-fpermissive]

     int begin(char* ssid, const char *passphrase);

         ^

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26:0,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:52:19: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]

    WiFi.begin(ssid);

                   ^

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:24:0,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Program Files (x86)\Arduino-ESP32-IDE\libraries\WiFi\src/WiFi.h:60:9: error:   initializing argument 1 of 'int WiFiClass::begin(char*)' [-fpermissive]

     int begin(char* ssid);

         ^

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21:0,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h: In instantiation of 'static void CayenneArduinoMQTTClient::publishData(CayenneTopic, unsigned int, const T&, const char*, const char*) [with T = const __FlashStringHelper*; CayenneTopic = CayenneTopic]':

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:128:66:   required from here

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:350:3: error: call of overloaded 'add(const char*&, const __FlashStringHelper* const&)' is ambiguous

   values.add(subkey, data);

   ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:350:3: note: candidates are:

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/CayenneMQTTClient.h:24:0,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMessage.h:32,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneHandlers.h:29,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoDefines.h:128,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:21,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:106:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4] <near match>

   inline void add(const char* unit, const int value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:106:15: note:   no known conversion for argument 2 from 'const __FlashStringHelper* const' to 'int'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:121:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4] <near match>

   inline void add(const char* unit, const unsigned int value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:121:15: note:   no known conversion for argument 2 from 'const __FlashStringHelper* const' to 'unsigned int'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:136:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4] <near match>

   inline void add(const char* unit, const long value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:136:15: note:   no known conversion for argument 2 from 'const __FlashStringHelper* const' to 'long int'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:151:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4] <near match>

   inline void add(const char* unit, const unsigned long value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:151:15: note:   no known conversion for argument 2 from 'const __FlashStringHelper* const' to 'long unsigned int'

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21:0,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h: In instantiation of 'static void CayenneArduinoMQTTClient::publishData(CayenneTopic, unsigned int, const T&, const __FlashStringHelper*, const __FlashStringHelper*) [with T = float; CayenneTopic = CayenneTopic]':

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:165:52:   required from 'void CayenneArduinoMQTTClient::virtualWrite(unsigned int, const T&, const __FlashStringHelper*, const __FlashStringHelper*) [with T = float]'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:227:68:   required from here

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:366:3: error: no matching function for call to 'CayenneMQTT::DataArray<>::add(const __FlashStringHelper*&, const float&)'

   values.add(subkey, data);

   ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:366:3: note: candidates are:

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/CayenneMQTTClient.h:24:0,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMessage.h:32,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneHandlers.h:29,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoDefines.h:128,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:21,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:65:8: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, const char*, bool, bool) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   void add(const char* unit, const char* value, bool unitInFlash = false, bool valueInFlash = false) {

        ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:65:8: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:106:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const int value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:106:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:121:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const unsigned int value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:121:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:136:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const long value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:136:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:151:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const unsigned long value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:151:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:190:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, float) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const float value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:190:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:201:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, double) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const double value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:201:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21:0,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h: In instantiation of 'static void CayenneArduinoMQTTClient::publishData(CayenneTopic, unsigned int, const T&, const __FlashStringHelper*, const __FlashStringHelper*) [with T = int; CayenneTopic = CayenneTopic]':

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:165:52:   required from 'void CayenneArduinoMQTTClient::virtualWrite(unsigned int, const T&, const __FlashStringHelper*, const __FlashStringHelper*) [with T = int]'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:293:71:   required from here

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:366:3: error: no matching function for call to 'CayenneMQTT::DataArray<>::add(const __FlashStringHelper*&, const int&)'

   values.add(subkey, data);

   ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:366:3: note: candidates are:

In file included from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/CayenneMQTTClient.h:24:0,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMessage.h:32,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneHandlers.h:29,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoDefines.h:128,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneArduinoMQTTClient.h:21,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFiClient.h:21,

                 from C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTWiFi.h:26,

                 from C:\Users\ZolAnd\Documents\Arduino\WiFiShield_Cayenne\WiFiShield_Cayenne.ino:15:

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:65:8: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, const char*, bool, bool) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   void add(const char* unit, const char* value, bool unitInFlash = false, bool valueInFlash = false) {

        ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:65:8: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:106:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const int value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:106:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:121:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const unsigned int value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:121:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:136:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const long value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:136:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:151:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, long unsigned int) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const unsigned long value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:151:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:190:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, float) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const float value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:190:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:201:15: note: void CayenneMQTT::DataArray<BUFFER_SIZE, MAX_VALUES>::add(const char*, double) [with int BUFFER_SIZE = 64; int MAX_VALUES = 4]

   inline void add(const char* unit, const double value) {

               ^

C:\Users\ZolAnd\Documents\Arduino\libraries\CayenneMQTT\src/CayenneMQTTClient/../CayenneUtils/CayenneDataArray.h:201:15: note:   no known conversion for argument 1 from 'const __FlashStringHelper*' to 'const char*'

exit status 1

WOW!!! Whats wrong?


#2

make sure you have cayenneMQTTesp8266 library installed.
on your dashboard add a new device using “Bring Your Own Thing” and copy the MQTT credential into below code and upload in Wemos with correct board selected.

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

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

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 > 10000) {
		lastMillis = millis();
		//Write data to Cayenne here. This example just sends the current uptime in milliseconds.
		Cayenne.virtualWrite(0, lastMillis);
}
}

#3

Thanks, already change library to Cayenne-MQTT-ESP! I’m happy!


#4

so is it working now?


#5

One time was success, but after adding my sensors locked after connecting to my WiFi (((

By the way - where can I find description of library calls,

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, bme.readTemperature());
Cayenne.hectoPascalWrite(2, bme.readPressure());
Cayenne.luxWrite(3, LightSensor.getAmbientLight());
//Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
}

I find only temp, pressure and lux… I’ll try to organise first my Meteo station

Many thanks for your help


#6

And where can I find description of usage CAYENNE_OUT(xxx)?

// You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.


#7

all the supported data types: https://mydevices.com/cayenne/docs_stage/cayenne-mqtt-api/#cayenne-mqtt-api-supported-data-types


#8

OK, thanks
It;s seemd that my WiFi time to time blocked…

But anyway, is somewere functions and it’s parameters description, or, maybe CLASSes descriptoin - how they can be used?


#9

Refer to the chart @shramiksalgaonkar posted above