gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
371 stars 133 forks source link

Errors with the build. #207

Closed kayak01 closed 1 year ago

kayak01 commented 1 year ago

I could use a hand with getting this compiled.

If I dumb down the code and hardcode the value, it will build, but doesn't work 100%. (The big issue is it never sends anything to MQTT even though it's listed as CONNECTED.

This is everything fresh from origin/master with no changes. It would be great to make this work. Any suggestions would be welcome.

Arduino: 1.8.19 (Linux), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"

/home/jkates/repos/github/mitsubishi2MQTT/src/mitsubishi2mqtt/mitsubishi2mqtt.ino: In function 'void saveAdvance(String, String, String, String)': mitsubishi2mqtt:237:19: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 237 if (tempUnit == '\0') tempUnit = "cel"; ^~~~
char
In file included from /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/Arduino.h:295, from sketch/mitsubishi2mqtt.ino.cpp:1: /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/WString.h:227:38: note: initializing argument 1 of 'bool String::operator==(const char*) const' 227 bool operator ==(const char *cstr) const { ~~^~ mitsubishi2mqtt:240:22: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 240 if (supportMode == '\0') supportMode = "all"; ^~~~
char
In file included from /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/Arduino.h:295, from sketch/mitsubishi2mqtt.ino.cpp:1: /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/WString.h:227:38: note: initializing argument 1 of 'bool String::operator==(const char*) const' 227 bool operator ==(const char *cstr) const { ~~^~ mitsubishi2mqtt:243:25: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 243 if (supportFanMode == '\0') supportFanMode = "allf"; ^~~~
char
In file included from /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/Arduino.h:295, from sketch/mitsubishi2mqtt.ino.cpp:1: /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/WString.h:227:38: note: initializing argument 1 of 'bool String::operator==(const char*) const' 227 bool operator ==(const char *cstr) const { ~~^~ mitsubishi2mqtt:246:24: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 246 if (loginPassword == '\0') loginPassword = ""; ^~~~
char

In file included from /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/Arduino.h:295, from sketch/mitsubishi2mqtt.ino.cpp:1: /home/jkates/.arduino15/packages/esp8266/hardware/esp8266/3.1.1/cores/esp8266/WString.h:227:38: note: initializing argument 1 of 'bool String::operator==(const char) const' 227 | bool operator ==(const char cstr) const { | ~~^~ exit status 1 invalid conversion from 'char' to 'const char*' [-fpermissive]

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

kayak01 commented 1 year ago

My pull from the repo was very old, fixing my keys I was able to grab the current version and compiles without issue.