Welcome, Guest
Username: Password: Remember me

TOPIC: mymqtt not defined

mymqtt not defined 11 months 1 week ago #3471

  • alyons12
  • alyons12's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
ok so i did the easiot could switch loaded the file for mqtt. tried three times removing file and such and still getting myMqtt not named when i compile

Arduino: 1.6.11 (Windows 7), Board: "Adafruit HUZZAH ESP8266, 80 MHz, 115200, 4M (3M SPIFFS)"

switch2:27: error: 'MQTT' does not name a type

MQTT myMqtt("", EIOT_CLOUD_ADDRESS, 1883);

^

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino: In function 'String macToStr(const uint8_t*)':

switch2:80: error: call of overloaded 'String(const uint8_t*&, int)' is ambiguous

result += String(mac, 16);

^

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino:80:29: note: candidates are:

In file included from C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:243:0,

from sketch\switch2.ino.cpp:1:

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:68:18: note: String::String(long unsigned int, unsigned char) <near match>

explicit String(unsigned long, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:68:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'long unsigned int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:67:18: note: String::String(long int, unsigned char) <near match>

explicit String(long, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:67:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'long int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:66:18: note: String::String(unsigned int, unsigned char) <near match>

explicit String(unsigned int, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:66:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'unsigned int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:65:18: note: String::String(int, unsigned char) <near match>

explicit String(int, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:65:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:64:18: note: String::String(unsigned char, unsigned char) <near match>

explicit String(unsigned char, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:64:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'unsigned char'

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino: In function 'void myConnectedCb()':

switch2:96: error: 'myMqtt' was not declared in this scope

myMqtt.subscribe("/Db/" + instanceId + "/" + String(storage.moduleId) + "/Sensor.Parameter1");

^

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino: In function 'void myDisconnectedCb()':

switch2:104: error: 'myMqtt' was not declared in this scope

myMqtt.connect();

^

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino: In function 'void setup()':

switch2:207: error: 'myMqtt' was not declared in this scope

myMqtt.setClientId((char*) clientName.c_str());

^

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino: In function 'void loop()':

switch2:298: error: 'myMqtt' was not declared in this scope

result = myMqtt.publish(topic, valueStr);

^

exit status 1
'MQTT' does not name a type

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
The administrator has disabled public write access.

mymqtt not defined 11 months 1 week ago #3473

  • alyons12
  • alyons12's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
ok forget that last post got that to go away now i have this

Arduino: 1.6.11 (Windows 7), Board: "Adafruit HUZZAH ESP8266, 80 MHz, 115200, 4M (3M SPIFFS)"

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino: In function 'String macToStr(const uint8_t*)':

switch2:70: error: call of overloaded 'String(const uint8_t*&, int)' is ambiguous

result += String(mac, 16);

^

C:\Users\Andy\Documents\Arduino\switch2\switch2.ino:70:29: note: candidates are:

In file included from C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:243:0,

from sketch\switch2.ino.cpp:1:

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:68:18: note: String::String(long unsigned int, unsigned char) <near match>

explicit String(unsigned long, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:68:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'long unsigned int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:67:18: note: String::String(long int, unsigned char) <near match>

explicit String(long, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:67:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'long int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:66:18: note: String::String(unsigned int, unsigned char) <near match>

explicit String(unsigned int, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:66:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'unsigned int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:65:18: note: String::String(int, unsigned char) <near match>

explicit String(int, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:65:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'int'

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:64:18: note: String::String(unsigned char, unsigned char) <near match>

explicit String(unsigned char, unsigned char base = 10);

^

C:\Users\Andy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/WString.h:64:18: note: no known conversion for argument 1 from 'const uint8_t* {aka const unsigned char*}' to 'unsigned char'

exit status 1
call of overloaded 'String(const uint8_t*&, int)' is ambiguous
The administrator has disabled public write access.

mymqtt not defined 11 months 1 week ago #3476

  • alyons12
  • alyons12's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
arg :evil: got it to compile and load ......gets on to mqtt server logs in and every thing but........switch has not shown up on web interface
The administrator has disabled public write access.
Time to create page: 0.146 seconds
Powered by Kunena Forum