- 
                Notifications
    You must be signed in to change notification settings 
- Fork 307
Open
Description
Develop branch.
Simple settable property is defined. When I write "true" or "false" or any other value to the appropriate topic (homie/esp_node/fan_control/stage1_on/set) (either manually via MQTT Explorer or using a ready-to-use Homie convention module in NodeRED) I get "Range index control is not valid" message in console. fanStage1Handler is never called. I can't figure out where it comes from. Can't find anything similar to this.
#include <Homie.h>
const int FAN_MODE_PIN_1 = D6;
HomieNode fanNode("fan_control", "Fan Control", "switch");
bool fanStage1Handler(const HomieRange& range, const String& value);
void loopHandler() {
}
void setup() {
  Serial.begin(115200);
  Serial << endl << endl;
  delay(1000);
  pinMode(FAN_MODE_PIN_1, OUTPUT);
  Homie_setFirmware("esp_node", "1.0.0");
  Homie.setLoopFunction(loopHandler);
  fanNode.advertise("stage1_on").setName("Fan stage 1").setDatatype("boolean").settable(fanStage1Handler);
  Homie.setup();
}
void loop() {
  Homie.loop();
}
bool fanStage1Handler(const HomieRange& range, const String& value) { 
  Homie.getLogger() << "fanStage1Handler is fired " << endl;
  return true;
}
Metadata
Metadata
Assignees
Labels
No labels