diff --git a/README.md b/README.md index aa57834a..c14f30c2 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,14 @@ Once you have flashed it you can flash it again over-the-air using the ```ota``` > platformio run --target uploadfs -e ota ``` +When using OTA environment it defaults to the IP address of the device in SoftAP mode. If you want to flash it when connected to your home network best way is to supply the IP of the device: + +```bash +> platformio run --target upload -e ota --upload_port 192.168.1.151 +> platformio run --target uploadfs -e ota --upload_port 192.168.1.151 +``` + + Library dependencies are automatically managed via PlatformIO Library Manager. ## Usage diff --git a/code/src/code.ino b/code/src/code.ino index 6f98cf9c..c09163fc 100644 --- a/code/src/code.ino +++ b/code/src/code.ino @@ -50,7 +50,7 @@ along with this program. If not, see . #define MODEL "SONOFF" #define BUTTON_PIN 0 #define RELAY_PIN 12 -#define LED_PIN 13ter +#define LED_PIN 13 #define ADMIN_PASS "fibonacci" #define CONFIG_PATH "/.config" @@ -986,7 +986,7 @@ void hardwareLoop() { if (button1.loop()) { if (button1.getEvent() == EVENT_SINGLE_CLICK) toggleRelay(); if (button1.getEvent() == EVENT_DOUBLE_CLICK) wifiSetupAP(); - if (button1.getEvent() == EVENT_LONG_CLICK) ESP.restart(); + if (button1.getEvent() == EVENT_LONG_CLICK) ESP.reset(); } showStatus(); }