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
-
19
9
### Installation
20
10
21
11
The suggested way to install is to:
22
12
23
-
1. Navigate to [Blynk_WM](https://github.com/khoih-prog/Blynk_WM) page.
13
+
1. Navigate to [Blynk_WM](https://github.com/khoih-prog/Blynk_WM) page.
24
14
2. Download the latest release `Blynk_WM-master.zip`.
25
15
3. Extract the zip file to `Blynk_WM-master` directory
26
16
4. Copy whole `Blynk_WM-master/src` folder to Arduino libraries' `src` directory such as `~/Arduino/libraries/Blynk/src`.
@@ -46,8 +36,8 @@ to use SPIFFS or
46
36
```
47
37
#define USE_SPIFFS false
48
38
```
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).
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).
51
41
52
42
53
43
```
@@ -86,86 +76,18 @@ Also see examples:
86
76
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.
99
89
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().
90
+
This `Blynk.begin()` is not a blocking call, so you can use it for critical functions requiring in loop().
169
91
Anyway, this is better for projects using Blynk just for GUI (graphical user interface).
170
92
171
93
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:
@@ -190,27 +112,21 @@ void loop()
190
112
```
191
113
192
114
## Prerequisite
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)
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)
195
117
196
118
## TO DO
197
119
198
120
1. Same features for other boards with WiFi.
199
121
200
122
## DONE
201
123
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.
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.
214
130
215
131
## Example
216
132
Please take a look at examples, as well.
@@ -238,7 +154,7 @@ Please take a look at examples, as well.
238
154
#define CONFIG_TIMEOUT_RETRYTIMES_BEFORE_RESET 5
239
155
// Those above #define's must be placed before #include <BlynkSimpleEsp8266_WM.h>
240
156
241
-
#define USE_SSL false
157
+
#define USE_SSL true
242
158
243
159
#if USE_SSL
244
160
#include <BlynkSimpleEsp8266_SSL_WM.h>
@@ -248,21 +164,6 @@ Please take a look at examples, as well.
// Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX
267
168
//Blynk.begin();
268
169
// Use this to personalize DHCP hostname (RFC952 conformed)
@@ -275,35 +176,6 @@ void loop()
275
176
Blynk.run();
276
177
}
277
178
```
278
-
279
-
### Releases v1.0.7
280
-
281
-
***Why this version***
282
-
283
-
1. Add checksum for more reliable data
284
-
2. Add MultiWiFi feature to enable reconnect to the best / available WiFi AP.
285
-
3. Add MultiBlynk feature to enable reconnect to the best / available Blynk Server.
286
-
287
-
### Releases v1.0.6
288
-
289
-
***Why this version***
290
-
291
-
Optimize, fix ESP32 EEPROM size to 2K from 4K, shorten code size, add functions, use dynamically allocated Config Portal WebServer.
292
-
293
-
### Releases v1.0.5
294
-
295
-
***Why this version***
296
-
297
-
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.
298
-
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.***
299
-
300
-
***New in this version***
301
-
302
-
Add new features to enable :
303
-
304
-
1. configuring Portal Static IP address, Name and Password.
305
-
2. configuring Static IP address, Gateway, Subnet Mask and 2 DNS Servers IP addresses.
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.7",
3
+
"version": "1.0.4",
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