Update to Homie V3
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
.pio
|
||||
data/homie/config.json
|
||||
nbproject
|
||||
|
@ -24,4 +24,4 @@ board = nodemcu
|
||||
upload_speed=921600
|
||||
|
||||
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||
lib_deps = https://github.com/homieiot/homie-esp8266.git#develop, Syslog
|
||||
lib_deps = https://github.com/homieiot/homie-esp8266.git#develop-v3, Syslog
|
||||
|
@ -8,7 +8,7 @@ const int PIN_RELAY = D1;
|
||||
#define OUTPUT_SET(x) digitalWrite(PIN_RELAY, x ? LOW : HIGH);
|
||||
unsigned int timer = 0;
|
||||
unsigned int next_timer_update = 0;
|
||||
HomieNode powerNode("power", "switch");
|
||||
HomieNode powerNode("power", "Power", "switch");
|
||||
|
||||
bool powerStateHandler(const HomieRange& range, const String& value) {
|
||||
if (value != "on" && value != "off") return false;
|
||||
|
Reference in New Issue
Block a user