Skip to content

Commit

Permalink
updated dependencies (Arduino Core for ESP8266 3.1.2, ArduinoJson 6.2…
Browse files Browse the repository at this point in the history
…1.3)
  • Loading branch information
jnsbyr committed Aug 19, 2023
1 parent 0b9a871 commit 13542c1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,17 @@ the timing right, but that is not all. Geoffroy documented in his code that the
interrupt driven data receive is unreliable but he did not name a reason. The
reason is that the ESP8266 WiFi processing has precedence over all other MCU
tasks and will disrupt time critical processing including ISRs. This is acceptable
for the data receive because the data repeats at a high frequency. Incomplete
for the data receive because the data repeats at a high frequency: incomplete
frames can be ignored and invalid frame data can be filtered out by using only
repeated identical data. But during the button signalling a receive error causes
side effects. A single button press might be ignored or may cause a double change.
With multiple consecutive button presses the error probability increases
significantly. To prevent this I decided to activate the ESP8266 WiFi modem sleep
when changing the water temperature. This improves the reliability noticeably but
the ESP8266 looses its connection to the AP and the MQTT server for a few seconds.
side effects: a single button press might be ignored or may cause a double change,
and with multiple consecutive button presses the error probability increases
significantly. Activating the ESP8266 WiFi modem sleep while changing the water
temperature improves the receive quality but then the ESP8266 looses its
connection to the AP and the MQTT server for a few seconds with every change.
That is why the latest firmware uses an iterative approach reading back the
new effective setting after each button press and even changing the direction
if an unintentional double change has resulted in overstepping the desired value.


## Building your own WiFi remote control
Expand Down Expand Up @@ -225,7 +228,7 @@ Select your Intex PureSpa model based on the table in the
at the beginning of the file [common.h](src/esp8266-intexsbh20/common.h).

If changing the water temperature does not work reliably for you, rebuild the
firmware after commenting in *#define FORCE_WIFI_SLEEP* to use the "original"
firmware after commenting in *#define FORCE_WIFI_SLEEP* to use an alternative
method where the WiFi will be disabled while changing the temperature. Note that
this will also interrupt the TCP/IP connection to the MQTT server.

Expand All @@ -234,10 +237,10 @@ The following **components** are required to build the firmware:
Component | Version | Notes
------------ |:------- |:-------------------------------------------------------------------------------------------------------
Arduino IDE | 1.8 | firmware does not build successfully with Arduino IDE 2.X, see [issue #30](../../issues/30)
ESP8266 SDK | 2.7.4 | install using the Arduino board manager,<br/>3.1.2 is also reported to work, see [issue #13](../../issues/13)
ArduinoJSON | 6.19.4 | install using the Arduino library manager
PubSubClient | 2.8 | install using the Arduino library manager, compiler warnings can be ignored
ESP8266 SDK | 3.1.2 | install using the Arduino board manager
ArduinoJSON | 6.21.3 | install using the Arduino library manager
PubSubClient | 2.8 | install using the Arduino library manager (ignore compiler warnings)

Other versions may also work but are not tested.

The required **board settings** are documented at the top of the INO file. Make
Expand All @@ -261,9 +264,8 @@ If you install the [Arduino ESP8266 LittleFS Filesystem Uploader](https://github
you can use the Arduino IDE *Tools* menu to upload the content of the *data*
subdirectory to the MCU.

With PlatformIO you should copy the *data* subdirectory from the *src* folder
into the project root folder to be able to use the task "Upload
Filesystem Image".
When using PlatformIO you should copy the *data* subdirectory from the *src*
folder into the project root folder to be able to use the task "Upload Filesystem Image".

Example:

Expand Down
8 changes: 5 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ include_dir=src/esp8266-intexsbh20
[env]
framework = arduino
lib_deps =
knolleary/PubSubClient@^2.8
bblanchon/ArduinoJson@^6.19.4
knolleary/PubSubClient@^2.8.0
bblanchon/ArduinoJson@^6.21.3

[env:d1_mini]
platform = espressif8266
board = d1_mini
board_build.f_cpu = 160000000L
board_build.filesystem = littlefs
framework-arduinoespressif8266@3.30102.0
build_flags =
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-D PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
-D VTABLES_IN_IRAM
platform = espressif8266
platform_packages =
monitor_speed = 74880
2 changes: 1 addition & 1 deletion src/esp8266-intexsbh20/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

namespace CONFIG
{
const char WIFI_VERSION[] = "1.0.7.2"; // 12.08.2023
const char WIFI_VERSION[] = "1.0.8.0"; // 19.08.2023

// WiFi parameters
const unsigned long WIFI_MAX_DISCONNECT_DURATION = 900000; // [ms] 5 min until reboot
Expand Down
6 changes: 3 additions & 3 deletions src/esp8266-intexsbh20/esp8266-intexsbh20.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
/**
* BUILD ENVIRONMENT:
*
* IDE: Arduino 1.8.13
* IDE: Arduino 1.8.19
*
* Libraries:
*
* - Arduino Core for ESP8266 2.7.4
* - ArduinoJson 6.19.4
* - Arduino Core for ESP8266 3.1.2
* - ArduinoJson 6.21.3
* - PubSubClient (MQTT) 2.8
*
* Board: Wemos D1 mini (ESP8266)
Expand Down

0 comments on commit 13542c1

Please sign in to comment.