Skip to content

Commit

Permalink
Swap OTA
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 19, 2023
1 parent b67c8d8 commit 53cb756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions sensor/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ lib_deps =
https://github.com/dawidchyrzynski/arduino-home-assistant.git#2.0.0
links2004/WebSockets@^2.3.7
https://github.com/EinarArnason/ArduinoQueue.git@^1.2.5
https://github.com/scottchiefbaker/ESP-WebOTA.git#aefb6c1a9190601b12b973a0c1cce39cb4e0f453


[env:wemos_d1_mini32]
platform = espressif32
Expand Down
9 changes: 4 additions & 5 deletions sensor/src/sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include <SoftwareSerial.h> // - https://github.com/plerup/espsoftwareserial
#endif
#include <ArduinoHA.h>
#include <ArduinoOTA.h>
#include <ArduinoQueue.h>
#include <WebSocketsServer.h>
#include <WiFiUdp.h>
#include <WebOTA.h>

// ************************************************************************************************
// Start of config
Expand Down Expand Up @@ -336,9 +336,8 @@ void setup() {
tub.updateBaudRate(115200);
#endif

ArduinoOTA.setHostname("hottub-sensor");

ArduinoOTA.begin();
init_wifi(ssid, passphrase, "hottub-sensor");
webota.init(8080, "/update");

// start telnet server
server.begin();
Expand Down Expand Up @@ -500,7 +499,7 @@ void loop() {
}

mqtt.loop();
ArduinoOTA.handle();
webota.handle();

telnetLoop();

Expand Down

0 comments on commit 53cb756

Please sign in to comment.