Connection to Blynk server does not work

And I’ve said that it I were in your situation I would use a device that had native WiFi connectivity, to eliminate some of these potential problem areas.
If the problem persists with a NodeMCU or ESP32 then you have a better idea of where the problem may lie.

However, you seem reluctant to want to do that, and instead you’re focusing on areas that won’t have anything to do with your ussue.

Pete.

Ok, fair enough.

//Björn

Now I ordered an ESP32: https://www.electrokit.com/produkt/sparkfun-esp32-thing/
I found a way to patch my other hardware without to much impact so that should be fine.

I will hook ESP32 up and use Arduino IDE to handle it, then try some example Blynk sketches and see what happens.

Br Björn

That’s pricey!

Pete.

It is, but in Sweden everything is…if it works I will be happy…

I’d say a label saying “Sparkfun” is more extra pricey than “in Sweden”.

Another “in Sweden” which is good enough:

They also have some “cool” TTGO boards in stock. Often with built-in displays for quite low prices.

Buying from abroad is possible, but also with longer delivery times. And “non-local” if that matters …

Agreed, the Sparkfun boards are 4 times more expensive in the U.K. than the ESP32 v4 Dev boards that I buy.

Pete.

1 Like

Probably better alternatives available but I’ll get it next day and 300 SEK is not that much in absolute money.

So, while waiting for ESP32 to arrive, is there any settings needed in router to get it to work? I have a D-LINK 920, cheap mobile broadband router. I have forwarded some ports on it before, when trying to reach it remotely. But when using Blynk I have assumed that no port forwarding or other simlar settings will be needed.

//Björn

No, if you have any port forwarding set-up for Blynk currently then you’ve gone down totally the wrong route. Maybe the cause of your issues?

You will need to install the ESP32 core in the IDE, as described in the link you provided.

Pete.

Hi,
It turned out to be some issue with the router, probably I had old configurations still around. After reconfiguring it my application has run for weeks without any issues. So that’s good and I appreciate all help.

I will now add counting of pulses coming into the Arduino. They are reflecting energy consumption and will show up every 2-3 seconds in average and be at least 30 ms in duration. My first thought was to use the AVR external interrupt and just increase the counter. But then I became a bit unsure if such “frequent” interrupts will disturb Blynk operation.

One alternative would be to add Blynk timer every 20ms and check the state of the pin. What would the best solution frm Blynk perspective?

Using interrupts would be better.
You should probably use a timer to do some calculations on the number of pulses received during the elapsed time and push the results to Blynk and reset your pulse counter.
If you do this then using noInterrupts() and Interrupts() at the beginning and end of this calculation code is a good idea.

If you’re attempting to calculate something like Watt Hours then it makes the maths easier if you use a timer that runs every 36 seconds, as that’s 100th of an hour.

Pete.