homie-esp8266: Cannot get sketch to verify or compile.
I have Mac, Arudino 1.8.1
Have installed ESP8266 for Arduino Bounce2 PubSubClient ArduinoJson
When adding Homie 1.5.0 and attempting to verify it always fails with the following:
`Arduino: 1.8.1 (Mac OS X), Board: “Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None”
esp8266Switch:16: error: ‘HomieRange’ does not name a type bool lightOnHandler(const HomieRange& range, const String& value) { ^ esp8266Switch:16: error: ISO C++ forbids declaration of ‘range’ with no type [-fpermissive] bool lightOnHandler(const HomieRange& range, const String& value) { ^ esp8266Switch:16: error: ‘HomieRange’ does not name a type bool lightOnHandler(const HomieRange& range, const String& value) { ^ esp8266Switch:16: error: ISO C++ forbids declaration of ‘range’ with no type [-fpermissive] bool lightOnHandler(const HomieRange& range, const String& value) { ^ /Users/john/Downloads/esp8266Switch-master/esp8266Switch/esp8266Switch.ino: In function ‘bool lightOnHandler(const int&, const String&)’: esp8266Switch:19: error: no matching function for call to ‘HomieInternals::HomieClass::setNodeProperty(HomieNode&, const char [3])’ Homie.setNodeProperty(switchNode, “on”).send(“true”); ^ /Users/john/Downloads/esp8266Switch-master/esp8266Switch/esp8266Switch.ino:19:43: note: candidates are: In file included from /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.h:4:0, from /Users/john/Downloads/esp8266Switch-master/esp8266Switch/esp8266Switch.ino:1: /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:40:12: note: bool HomieInternals::HomieClass::setNodeProperty(const HomieNode&, const String&, const String&, bool) bool setNodeProperty(const HomieNode& node, const String& property, const String& value, bool retained = true) { ^ /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:40:12: note: candidate expects 4 arguments, 2 provided /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:43:12: note: bool HomieInternals::HomieClass::setNodeProperty(const HomieNode&, const char*, const char*, bool) bool setNodeProperty(const HomieNode& node, const char* property, const char* value, bool retained = true); ^ /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:43:12: note: candidate expects 4 arguments, 2 provided esp8266Switch:24: error: no matching function for call to ‘HomieInternals::HomieClass::setNodeProperty(HomieNode&, const char [3])’ Homie.setNodeProperty(switchNode, “on”).send(“false”); ^ /Users/john/Downloads/esp8266Switch-master/esp8266Switch/esp8266Switch.ino:24:43: note: candidates are: In file included from /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.h:4:0, from /Users/john/Downloads/esp8266Switch-master/esp8266Switch/esp8266Switch.ino:1: /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:40:12: note: bool HomieInternals::HomieClass::setNodeProperty(const HomieNode&, const String&, const String&, bool) bool setNodeProperty(const HomieNode& node, const String& property, const String& value, bool retained = true) { ^ /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:40:12: note: candidate expects 4 arguments, 2 provided /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:43:12: note: bool HomieInternals::HomieClass::setNodeProperty(const HomieNode&, const char*, const char*, bool) bool setNodeProperty(const HomieNode& node, const char* property, const char* value, bool retained = true); ^ /Users/john/Documents/Arduino/libraries/homie-esp8266-1.5.0/src/Homie.hpp:43:12: note: candidate expects 4 arguments, 2 provided /Users/john/Downloads/esp8266Switch-master/esp8266Switch/esp8266Switch.ino: In function ‘void setup()’: esp8266Switch:47: error: ‘Homie_setFirmware’ was not declared in this scope Homie_setFirmware(“ecoplug”, “1.0.0”); ^ esp8266Switch:48: error: ‘class HomieNode’ has no member named ‘advertise’ switchNode.advertise(“on”).settable(lightOnHandler); ^ exit status 1 ‘HomieRange’ does not name a type
This report would have more information with “Show verbose output during compilation” option enabled in File -> Preferences. `
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 43 (3 by maintainers)
See this related post