I think I was having a blonde moment when I wrote that because Blynk indicates the 10s I was looking for doesn’t include a X3 multiplier in the libraires.
There is though a library hack for faster connections. I’ll see if I can find it but the text of the thread referred to “5 seconds” from memory.
Hmmm … so what I did right now is I found where this values is. I found:
c:\Users\admin\Documents\Arduino\libraries\blynk-library-master\src\Blynk\BlynkProtocol.h
and I changed 5000UL to 10000UL, now the mentioned code part looks like:
#ifdef BLYNK_USE_DIRECT_CONNECT
if (!tconn)
conn.connect();
#else
if (tconn && (t - lastLogin > BLYNK_TIMEOUT_MS)) {
BLYNK_LOG1(BLYNK_F("Login timeout"));
conn.disconnect();
state = CONNECTING;
return false;
} else if (!tconn && (t - lastLogin > 10000UL)) {
conn.disconnect();
if (!conn.connect()) {
lastLogin = t;
return false;
}
after this change I updatet the ESP code again to the dev board but still it seems connection time is the same. Around 6 secs from reboot and most waiting time is between “blynk picture” and [5001] connecting …
Does this hack works also when connecting to the Blynk cloud? Because in the refered topic I have seen a lot about home blynk server (what is not my case)
OK so the 3 seconds you referred to includes reading the temperature sensor. Not too bad. You should be able to cut another 500ms by dropping the 1000L library hack to 500L. From memory you can’t go much below this.
Yes, I referenced 3 seconds to total time from reboot to 1st reading. Sounds great to me.
not sure if there is chance to save a few miliseconds by removing something from the code, but anyway there is a huge improvement (but we will see what will be the real battery lasting )
I will try with 500UL as well.
So another task for me is to prepare small board with this sensor and try to solder tiny wire to ESP8266-01 to allow deepsleep - that will be again challenging
Btw will be the connection faster in case I build my own Blynk server on Raspberry home? Maybe in the future I can imagine I will build also this setup with own Blynk. So no data outside the LAN (I am not sure if in case of home Blynk server I am paying for widgets or not)
many thanks all there participating, especiall Costas.
I will keed you updated what progress I did and how long I was able to power the project on the one battery charge
i’m glad you’ve figured out the ds18 hookup. i know i’ve promised to help you with this stuff, but this week i was quite busy with lots of work to do.
your code seems much better than the old one.
maybe you could make bit faster by setting a lower resolution for the ds18. also, you could try the api method. and in final version for max speed of course remove all serial prints.
i will send you some code tomorrow for api, to test.
Hi,
in the meantime waiting for battery lasting results
has somebody experience with bme280 and its reading speed?
I see it has also humidity function, but not sure if this is suitable for project like this (as also dth22 was obviously not this kind of project friendly)