You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 25, 2021. It is now read-only.
I'm inspired by [`EasyBlynk8266`](https://github.com/Barbayar/EasyBlynk8266)
5
+
I'm inspired by [`EasyBlynk8266`](https://github.com/Barbayar/EasyBlynk8266)
6
6
7
7
To help you to eliminate `hardcoding` your Wifi and Blynk credentials for ESP8266 and ESP32 (with / wwithout SSL), and updating/reflashing every time when you need to change them.
8
8
9
+
With version `v1.0.7` or later, you now can configure:
10
+
11
+
1.`Multiple WiFi Credentials (SSID, Password) and system will autoconnect to the best and available WiFi SSID.`
12
+
2.`Multiple Blynk Credentials (Server, Token) and system will autoconnect to the available Blynk Servers.`
13
+
14
+
With version `v1.0.5` or later, you now can configure:
15
+
16
+
1.`Config Portal Static IP address, Name and Password.`
17
+
2.`Static IP address, Gateway, Subnet Mask and 2 DNS Servers IP addresses.`
18
+
9
19
### Installation
10
20
11
21
The suggested way to install is to:
12
22
13
-
1. Navigate to [Blynk_WM](https://github.com/khoih-prog/Blynk_WM) page.
23
+
1. Navigate to [Blynk_WM](https://github.com/khoih-prog/Blynk_WM) page.
14
24
2. Download the latest release `Blynk_WM-master.zip`.
15
25
3. Extract the zip file to `Blynk_WM-master` directory
16
26
4. Copy whole `Blynk_WM-master/src` folder to Arduino libraries' `src` directory such as `~/Arduino/libraries/Blynk/src`.
@@ -36,8 +46,8 @@ to use SPIFFS or
36
46
```
37
47
#define USE_SPIFFS false
38
48
```
39
-
to use EEPROM ( 172 bytes from address EEPROM_START ) to save your configuration data.
40
-
EEPROM_SIZE can be specified from 256 to 4096 bytes. See examples [ESP32WM_Config](https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP32WM_Config) and [ESP8266WM_Config](https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP8266WM_Config).
49
+
to use EEPROM ( 176 bytes from address EEPROM_START ) to save your configuration data.
50
+
EEPROM_SIZE can be specified from 256 to 4096 bytes. See examples [ESP32WM_Config](https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP32WM_Config) and [ESP8266WM_Config](https://github.com/khoih-prog/Blynk_WM/tree/master/examples/ESP8266WM_Config).
41
51
42
52
43
53
```
@@ -76,18 +86,86 @@ Also see examples:
76
86
If it cannot connect to the Blynk server in 30 seconds, it will switch to `Configuration Mode`. You will see your built-in LED turned ON. In `Configuration Mode`, it starts an access point called `ESP_xxxxxx`. Connect to it using password `MyESP_xxxxxx` .
Enter your credentials, then click `Save`. After you restarted, you will see your built-in LED turned OFF. That means, it connected to your Blynk server successfully.
89
99
90
-
This `Blynk.begin()` is not a blocking call, so you can use it for critical functions requiring in loop().
100
+
The following is the sample terminal output when running example [ESP8266WM_Config](examples/ESP8266WM_Config)
101
+
102
+
```
103
+
Starting ...
104
+
[65] RFC925 Hostname = ESP8266-WM-Config
105
+
[66] Calc Cksum = 0x309d, Read Cksum = 0x309d
106
+
[66] Header = ESP8266, Board Name = ESP8266-Multi-WM
107
+
[67] SSID = ****, PW = ****
108
+
[70] SSID1 = ****1, PW1 = ****1
109
+
[74] Server = 192.168.2.112, Token = ****
110
+
[80] Server1 = account.duckdns.org, Token1 = ****
111
+
[86] Port = 8080
112
+
[88] Connecting MultiWifi...
113
+
[11276] WiFi connected after time: 2
114
+
[11276] SSID: ****, RSSI = -45 <= Connected to SSID
115
+
[11276] Channel: 2, IP address: 192.168.2.91
116
+
[11277] bg: WiFi connected. Try Blynk
117
+
[11279]
118
+
___ __ __
119
+
/ _ )/ /_ _____ / /__
120
+
/ _ / / // / _ \/ '_/
121
+
/____/_/\_, /_//_/_/\_\
122
+
/___/ v0.6.1 on NodeMCU
123
+
124
+
[11292] BlynkArduinoClient.connect: Connecting to 192.168.2.112:8080 <= Try Server
125
+
[11325] Ready (ping: 19ms). <= Connected to Server
126
+
[11392] Connected to Blynk Server = 192.168.2.112, Token = ****
127
+
[11392] bg: WiFi+Blynk connected
128
+
Blynk ESP8288 using EEPROM connected. Board Name : ESP8266-Multi-WM
[101232] run: WiFi lost. Reconnect WiFi+Blynk <= Lost SSID
132
+
[101232] Connecting MultiWifi...
133
+
[106316] WiFi connected after time: 1
134
+
[106317] SSID: ****1, RSSI = -62 <= Connected to SSID1
135
+
[106317] Channel: 4, IP address: 192.168.2.91
136
+
[106317] run: WiFi reconnected. Connect to Blynk
137
+
[106320] BlynkArduinoClient.connect: Connecting to 192.168.2.112:8080 <= Try Server
138
+
[106352] Ready (ping: 11ms). <= Connected to Server
139
+
[106419] run: WiFi+Blynk reconnected
140
+
RB
141
+
[165434] Heartbeat timeout <= Lost Server
142
+
[165735] run: Blynk lost. Connect Blynk
143
+
[165735]
144
+
___ __ __
145
+
/ _ )/ /_ _____ / /__
146
+
/ _ / / // / _ \/ '_/
147
+
/____/_/\_, /_//_/_/\_\
148
+
/___/ v0.6.1 on NodeMCU
149
+
150
+
[165741] BlynkArduinoClient.connect: Connecting to 192.168.2.112:8080 <= Try Server not OK
151
+
[170741]
152
+
___ __ __
153
+
/ _ )/ /_ _____ / /__
154
+
/ _ / / // / _ \/ '_/
155
+
/____/_/\_, /_//_/_/\_\
156
+
/___/ v0.6.1 on NodeMCU
157
+
158
+
[170743] BlynkArduinoClient.connect: Connecting to account.duckdns.org:8080 <= Try Server1
159
+
[170781] Ready (ping: 9ms).
160
+
[170848] Connected to Blynk Server = account.duckdns.org, Token = **** <= Connected to Server1
161
+
[170848] run: Blynk reconnected
162
+
RBRBRBRBRBRBRB RBRB
163
+
164
+
```
165
+
166
+
You can see that the system automatically detect and connect to the best or avaiable WiFi APs and/or Blynk Servers, whenever interruption happens. This feature is very useful for systems requiring high degree of reliability.
167
+
168
+
Moreover, this `Blynk.begin()` is not a blocking call, so you can use it for critical functions requiring in loop().
91
169
Anyway, this is better for projects using Blynk just for GUI (graphical user interface).
92
170
93
171
In operation, if WiFi or Blynk connection is lost, `Blynk.run()` will try reconnecting automatically. Therefore, `Blynk.run()` must be called in the `loop()` function. Don't use:
@@ -112,21 +190,27 @@ void loop()
112
190
```
113
191
114
192
## Prerequisite
115
-
*`ESP8266 core 2.5.2 or later` for Arduino(https://github.com/esp8266/Arduino#installing-with-boards-manager)
116
-
*`Blynk library 0.6.1 or later`(https://www.arduino.cc/en/guide/libraries#toc3)
193
+
*[`ESP8266 core 2.6.3 or later` for Arduino](https://github.com/esp8266/Arduino#installing-with-boards-manager)
194
+
*[`Blynk library 0.6.1 or later`](https://www.arduino.cc/en/guide/libraries#toc3)
117
195
118
196
## TO DO
119
197
120
198
1. Same features for other boards with WiFi.
121
199
122
200
## DONE
123
201
124
-
1. Permit EEPROM size and location configurable to avoid conflict with others.
125
-
2. More flexible to configure reconnection timeout.
126
-
3. For fresh config data, don't need to wait for connecting timeout before entering config portal.
127
-
4. If the config data not entered completely (SSID, password, Server and Blynk token), entering config portal
128
-
5. Correct the operation of BUILTIN_LED
129
-
6. Modify code to be compatible with ESP8266 core pre-2.5.2.
202
+
1. Permit EEPROM size and location configurable to avoid conflict with others.
203
+
2. More flexible to configure reconnection timeout.
204
+
3. For fresh config data, don't need to wait for connecting timeout before entering config portal.
205
+
4. If the config data not entered completely (SSID, password, Server and Blynk token), entering config portal
206
+
5. Correct the operation of BUILTIN_LED
207
+
6. Modify code to be compatible with ESP8266 core pre-2.5.2.
208
+
7. Add RFC952 hostname
209
+
8. Add configurable Config Portal IP, SSID and Password
210
+
9. Add configurable Static IP, GW, Subnet Mask and 2 DNS Servers' IP Addresses.
211
+
10. Add checksum for more reliable data
212
+
11. Add MultiWiFi feature to enable reconnect to the best / available WiFi AP.
213
+
12. Add MultiBlynk feature to enable reconnect to the best / available Blynk Server.
130
214
131
215
## Example
132
216
Please take a look at examples, as well.
@@ -154,7 +238,7 @@ Please take a look at examples, as well.
154
238
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
155
239
// Those above #define's must be placed before #include <BlynkSimpleEsp8266_WM.h>
156
240
157
-
#define USE_SSL true
241
+
#define USE_SSL false
158
242
159
243
#if USE_SSL
160
244
#include <BlynkSimpleEsp8266_SSL_WM.h>
@@ -164,6 +248,21 @@ Please take a look at examples, as well.
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
168
267
//Blynk.begin();
169
268
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -176,6 +275,41 @@ void loop()
176
275
Blynk.run();
177
276
}
178
277
```
278
+
### Releases v1.0.8
279
+
280
+
***Why this version***
281
+
282
+
1. Fix [AP-staying-open bug](https://github.com/khoih-prog/Blynk_WM/issues/2). Thanks to [chriskio](https://github.com/chriskio) to report.
283
+
2. Add clearConfigData().
284
+
285
+
### Releases v1.0.7
286
+
287
+
***Why this version***
288
+
289
+
1. Add checksum for more reliable data
290
+
2. Add MultiWiFi feature to enable reconnect to the best / available WiFi AP.
291
+
3. Add MultiBlynk feature to enable reconnect to the best / available Blynk Server.
292
+
293
+
### Releases v1.0.6
294
+
295
+
***Why this version***
296
+
297
+
Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions, use dynamically allocated Config Portal WebServer.
298
+
299
+
### Releases v1.0.5
300
+
301
+
***Why this version***
302
+
303
+
Normally, the `default Portal IP (192.168.4.1)`, SSID and PW as well as the `dynamically allocated` board's IP address are good enough.
304
+
In special cases where there is conflict, if static IP is required or bad router's DNS settings, you can use the new features to force the configurable IP addresses. ***But please use with care to avoid potential issues.***
305
+
306
+
***New in this version***
307
+
308
+
Add new features to enable :
309
+
310
+
1. configuring Portal Static IP address, Name and Password.
311
+
2. configuring Static IP address, Gateway, Subnet Mask and 2 DNS Servers IP addresses.
312
+
179
313
### Releases v1.0.4
180
314
181
315
***Why this version***
@@ -216,6 +350,11 @@ Now you can easily specify and have the friendly, identifiable, RFC-952-conforme
216
350
217
351
3. Correct the operation of BUILTIN_LED
218
352
353
+
### Contributions and thanks
354
+
355
+
1. Thanks to [chriskio](https://github.com/chriskio) to report [AP-staying-open bug](https://github.com/khoih-prog/Blynk_WM/issues/2).
Copy file name to clipboardExpand all lines: library.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "Blynk_WM",
3
-
"version": "1.0.4",
3
+
"version": "1.0.8",
4
4
"description": "Build a smartphone app for your project in minutes. Blynk allows creating IoT solutions easily. It supports WiFi, BLE, Bluetooth, Ethernet, GSM, USB, Serial. Works with many boards like ESP8266, ESP32, Arduino UNO, Nano, Due, Mega, Zero, MKR100, Yun, Raspberry Pi, Particle, Energia, ARM mbed, Intel Edison/Galileo/Joule, BBC micro:bit, DFRobot, RedBearLab, Microduino, LinkIt ONE ...",
0 commit comments