ota works (for me)
This commit is contained in:
parent
b1fc885f4e
commit
240652ccb9
@ -13,12 +13,9 @@ platform = espressif32
|
|||||||
board = esp32doit-devkit-v1
|
board = esp32doit-devkit-v1
|
||||||
framework = arduino
|
framework = arduino
|
||||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||||
board_build.partitions = huge_app.csv
|
|
||||||
|
|
||||||
; the latest development brankitchen-lightch (convention V3.0.x)
|
; the latest development brankitchen-lightch (convention V3.0.x)
|
||||||
lib_deps = ArduinoJson@6.16.1
|
lib_deps = ArduinoJson@6.16.1
|
||||||
https://github.com/homieiot/homie-esp8266.git#v3.0
|
https://github.com/homieiot/homie-esp8266.git#v3.0
|
||||||
OneWire
|
OneWire
|
||||||
|
|
||||||
|
|
||||||
upload_port = /dev/ttyUSB0
|
|
||||||
|
@ -468,7 +468,6 @@ void homieLoop(){
|
|||||||
|
|
||||||
void systemInit(){
|
void systemInit(){
|
||||||
WiFi.mode(WIFI_STA);
|
WiFi.mode(WIFI_STA);
|
||||||
Serial.println("1");
|
|
||||||
|
|
||||||
Homie_setFirmware("PlantControl", FIRMWARE_VERSION);
|
Homie_setFirmware("PlantControl", FIRMWARE_VERSION);
|
||||||
|
|
||||||
@ -476,24 +475,15 @@ void systemInit(){
|
|||||||
deepSleepTime.setDefaultValue(300000); /* 5 minutes in milliseconds */
|
deepSleepTime.setDefaultValue(300000); /* 5 minutes in milliseconds */
|
||||||
deepSleepNightTime.setDefaultValue(0);
|
deepSleepNightTime.setDefaultValue(0);
|
||||||
wateringDeepSleep.setDefaultValue(60000); /* 1 minute in milliseconds */
|
wateringDeepSleep.setDefaultValue(60000); /* 1 minute in milliseconds */
|
||||||
|
|
||||||
Serial.println("2");
|
|
||||||
|
|
||||||
waterLevelMax.setDefaultValue(1000); /* 100cm in mm */
|
waterLevelMax.setDefaultValue(1000); /* 100cm in mm */
|
||||||
waterLevelMin.setDefaultValue(50); /* 5cm in mm */
|
waterLevelMin.setDefaultValue(50); /* 5cm in mm */
|
||||||
waterLevelWarn.setDefaultValue(500); /* 50cm in mm */
|
waterLevelWarn.setDefaultValue(500); /* 50cm in mm */
|
||||||
waterLevelVol.setDefaultValue(5000); /* 5l in ml */
|
waterLevelVol.setDefaultValue(5000); /* 5l in ml */
|
||||||
|
|
||||||
Serial.println("4");
|
|
||||||
Homie.setLoopFunction(homieLoop);
|
Homie.setLoopFunction(homieLoop);
|
||||||
Serial.println("5");
|
|
||||||
Homie.setup();
|
Homie.setup();
|
||||||
Serial.println("6");
|
|
||||||
|
|
||||||
Serial.println("3");
|
|
||||||
|
|
||||||
mConfigured = Homie.isConfigured();
|
mConfigured = Homie.isConfigured();
|
||||||
Serial.println("3b");
|
|
||||||
if (mConfigured) {
|
if (mConfigured) {
|
||||||
// Advertise topics
|
// Advertise topics
|
||||||
plant1.advertise("switch").setName("Pump 1")
|
plant1.advertise("switch").setName("Pump 1")
|
||||||
@ -554,10 +544,8 @@ Serial.println("2");
|
|||||||
.setDatatype("number")
|
.setDatatype("number")
|
||||||
.setUnit("V");
|
.setUnit("V");
|
||||||
sensorWater.advertise("remaining").setDatatype("number").setUnit("%");
|
sensorWater.advertise("remaining").setDatatype("number").setUnit("%");
|
||||||
|
|
||||||
// Mode 3
|
|
||||||
stayAlive.advertise("alive").setName("Alive").setDatatype("number").settable(aliveHandler);
|
|
||||||
}
|
}
|
||||||
|
stayAlive.advertise("alive").setName("Alive").setDatatype("number").settable(aliveHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user