Merge branch 'master' of https://github.com/0110/PlantCtrl into master

This commit is contained in:
Empire 2020-10-20 21:35:37 +02:00
commit 100883f861
2 changed files with 8 additions and 8 deletions

View File

@ -18,4 +18,3 @@ build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
lib_deps = ArduinoJson@6.16.1
https://github.com/homieiot/homie-esp8266.git#v3.0
OneWire

View File

@ -311,15 +311,16 @@ void readSensors() {
//Homie.getMqttClient().disconnect();
void onHomieEvent(const HomieEvent& event) {
const String OFF = String("OFF");
switch(event.type) {
case HomieEventType::MQTT_READY:
plant0.setProperty("switch").send(String("OFF"));
plant1.setProperty("switch").send(String("OFF"));
plant2.setProperty("switch").send(String("OFF"));
plant3.setProperty("switch").send(String("OFF"));
plant4.setProperty("switch").send(String("OFF"));
plant5.setProperty("switch").send(String("OFF"));
plant6.setProperty("switch").send(String("OFF"));
plant0.setProperty("switch").send(OFF);
plant1.setProperty("switch").send(OFF);
plant2.setProperty("switch").send(OFF);
plant3.setProperty("switch").send(OFF);
plant4.setProperty("switch").send(OFF);
plant5.setProperty("switch").send(OFF);
plant6.setProperty("switch").send(OFF);
//wait for rtc sync?
rtcDeepSleepTime = deepSleepTime.get();