// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “xxxx”;
char password = “xxxx”;
char clientID = “xxxx”;
This one throws some errors. maybe u can give me a hint whats wrong
In file included from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneArduinoDefines.h:130:0,
from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneArduinoMQTTClient.h:21,
from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTWiFiClient.h:21,
from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTESP8266.h:23,
from src\CayenneMQTT.cpp:63:
C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/DetectDevice.h:234:10: warning: #warning “Cannot detect board type” [-Wcpp] #warning “Cannot detect board type”
^
In file included from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTWiFiClient.h:21:0,
from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTESP8266.h:23,
from src\CayenneMQTT.cpp:63:
C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneArduinoMQTTClient.h: In member function ‘void CayenneArduinoMQTTClient::connect()’:
C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneArduinoMQTTClient.h:58:63: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
if (!NetworkConnect(&_network, CAYENNE_DOMAIN, CAYENNE_PORT)) {
^
In file included from C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTESP8266.h:23:0,
from src\CayenneMQTT.cpp:63:
C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTWiFiClient.h: In member function ‘void CayenneMQTTWiFiClient::begin(const char*, const char*, const char*, const char*, const char*)’:
C:\Users\admin.platformio\lib\Cayenne-MQTT-ESP_ID1451\src/CayenneMQTTWiFiClient.h:41:7: warning: unused variable ‘status’ [-Wunused-variable]
int status = WL_IDLE_STATUS;
^
Linking .pio\build\heltec_wifi_kit_8\firmware.elf
c:/users/admin/.platformio/packages/toolchain-xtensa/bin/…/lib/gcc/xtensa-lx106-elf/4.8.2/…/…/…/…/xtensa-lx106-elf/bin/ld.exe: .pio\build\heltec_wifi_kit_8\src\main.cpp.o: in function setup': main.cpp:(.text.setup+0x38): multiple definition of setup’; .pio\build\heltec_wifi_kit_8\src\CayenneMQTT.cpp.o:CayenneMQTT.cpp:(.text.setup+0x28): first defined here
c:/users/admin/.platformio/packages/toolchain-xtensa/bin/…/lib/gcc/xtensa-lx106-elf/4.8.2/…/…/…/…/xtensa-lx106-elf/bin/ld.exe: .pio\build\heltec_wifi_kit_8\src\main.cpp.o: in function loop': main.cpp:(.text.loop+0x18): multiple definition of loop’; .pio\build\heltec_wifi_kit_8\src\CayenneMQTT.cpp.o:CayenneMQTT.cpp:(.text.loop+0x8): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\heltec_wifi_kit_8\firmware.elf] Error 1
can you try some example sketches and see if you can get data via TCP, like from Google or something.
If that works you might try a simple example MQTT sketch with some third party MQTT broker and see if that works. https://www.14core.com/pushing-topic-to-mqtt-with-esp32-esp8266/