Hi Everybody,
I have two ESP8266 chips that control household equipments. One Air cleaner and one humidifier.
Basic stuff, remote on-off, measuring humidify, work with some relays, your everyday examples.
They are working fine - or at least I don’t experience errors (besides the frequent ADC reading causing reboots, but that’s another story.)
Blynk library version is 0.4.3 and 0.4.6.
I have a NAS, that hosts a local blynk server (server-0.23.0.jar). I have self signed certs, they seem to be working.
server.properties
hardware.mqtt.port=8440
hardware.ssl.port=8441
hardware.default.port=8442
http.port=8180
ssl.websocket.port=8181
tcp.websocket.port=8182
https.port=9443
app.ssl.port=8443
server.ssl.cert=/PATH_to_BLYNK/blynk-server/ssl/server.crt
server.ssl.key=/PATH_to_BLYNK/blynk-server/ssl/server.pem
server.ssl.key.pass=pwd_used_during_creation
After overwriting the default fingerprint in my sketch I am able to connect to my local blynk server.
I tried the Bridge example provided in the docs, without luck. My device (device A, the control device)) keeps disconnecting from the network. Always reatenticates to Blynk local server.
I tried step-by-step adding the example code.
Seems that creating the bridge instance only does not cause any problems. e.g.:
WidgetBridge bridge1(V1);
Reconnects start to appear if I add this code:
const char blynkAuth_B[] = “3c71e13701e74cd09b6326xxxxxxxxxx”; //device B auth token
BLYNK_CONNECTED() {
bridge1.setAuthToken(blynkAuth_B); // Token of TherapyAir iOn PWC-570
}
I find these entries in blynk.log
2017-03-08 21:47:41.312 WARN - Hardware not logged. /192.168.5.54:25735. Closing.
2017-03-08 21:47:46.999 INFO - mailaddress+blynk@gmail.com hardware joined.
2017-03-08 21:47:57.004 WARN - Hardware not logged. /192.168.5.54:1729. Closing.
2017-03-08 21:48:02.659 INFO - mailaddress+blynk@gmail.com hardware joined.
2017-03-08 21:48:12.671 WARN - Hardware not logged. /192.168.5.54:6358. Closing.
2017-03-08 21:48:23.002 WARN - Unsecured connection attempt. Channel : /192.168.5.54:7199. Reason : javax.net.ssl.SSLException: Received close_notify during handshake
2017-03-08 21:48:28.023 WARN - Unsecured connection attempt. Channel : /192.168.5.54:27076. Reason : javax.net.ssl.SSLException: Received close_notify during handshake
192.168.5.54 is the IP of my router connecting to the Modem.
I am using a DynDNS address for connection. Even for local devices, so I assume that during connection they try to go ‘outside’ and connect to my local server through WAN. This address was used during the creation of the certs as well. So far my devices were working with it.
Anyhow, I think SSLExceptions as a not expected. Could you please suggest how to continue the investigation? Did I misconfigure the SSL connection?