Migrate projects from old to new Blynk

@vshymanskyy do we have some wrapper around the RTC?

1 Like

huh ?

Here are my thoughts in converting my blynk 1.0 to Blynk 2.0. I was running 4 devices into what became a two tab layout in Blynk 2.0.

First, when using the example that used BlynkEdgent.h for the backbone, I got 30% data drop outs on the DHT sensor reads, returning “nan” (not a number) in stead of a number. I solved it by down grading and using my old firmware as the backbone. After much searching I found the address of the ny cloud. Interestingly I could not ping it by name. This line will save hours of work and hook you to the new cloud:
Blynk.begin(BLYNK_auth, WiFi_ssid, WiFi_pass,“64.225.16.22”,80); //443 https://ny3.blynk.cloud/

I went ahead and used the OTA capability of the Arduino GUI to reprogram my boards, I also got the Blynk Air to work when running the BlynkEdgent example. (I will add it back if we get a stand alone way to add it.

I went and developed a UDP network to have my 3 satellite boards send data to the “mother board” which now communicates with Blynk getting around the current requirement (as I understand it) that only one board can communicate to the same layout (the old Blynk 1.0 could do many boards to one display.). I also invited another user and that all worked as described

I recommend that the “old Blynk” be referred to as V1.0, and the “new Blynk” as V2.0 The V0.1 then V2.0 is needlessly confusing.

I thank the developers, and do not want to be viewed as a thankless small guy. It would be nice to get multiple data feeds to the supercharts, labeled value display, switch in the baseline package. Also I am with others voting for a dark theme for the iPhone, like Blynk 1.0 had. Preference for sure, but I liked it.

All in all it is working, the conversion has taken about 22 hours of seat time to rewrite the Blynk GUI and reporgram all 4 nodes. (This includes the time to write from scratch the UDP routines.) However I found the one example supplied using BlynkEdgent very confusing at this time. Perhaps it will clarify as I progress.

2 Likes

oO. What does ping show in that case?

Dmitriy, I just ran it again with these results for you:

C:\Users\bigmoose>ping https://ny3.blynk.cloud/
Ping request could not find host https://ny3.blynk.cloud/. Please check the name and try again.

Interestingly if I put https://ny3.blynk.cloud/ into my browser, my Blynk console opens up!

Just pinging ny3.blynk.cloud returns the correct results…

C:\Users\Pete Knight>ping ny3.blynk.cloud

Pinging ny3.blynk.cloud [64.225.16.22] with 32 bytes of data:
Reply from 64.225.16.22: bytes=32 time=84ms TTL=53
Reply from 64.225.16.22: bytes=32 time=84ms TTL=53
Reply from 64.225.16.22: bytes=32 time=83ms TTL=53
Reply from 64.225.16.22: bytes=32 time=84ms TTL=53

Ping statistics for 64.225.16.22:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 83ms, Maximum = 84ms, Average = 83ms

Pete.

Pete if you put the link in your browser window, https://ny3.blynk.cloud/ does your console open up? For info I use Brave browser.

Yes. Well, it does if I replace ny3 with lon1, which is where my Blynk projects live.

Pete.

Interesting… DNS server issue on my side? Yet I find my console? I tested your cloud and google for info:

C:\Users\bigmoose>ping ion1.blynk.cloud
Ping request could not find host ion1.blynk.cloud. Please check the name and try again.

C:\Users\bigmoose>ping google.com

Pinging google.com [142.250.80.110] with 32 bytes of data:
Reply from 142.250.80.110: bytes=32 time=27ms TTL=118
Reply from 142.250.80.110: bytes=32 time=29ms TTL=118
Reply from 142.250.80.110: bytes=32 time=27ms TTL=118
Reply from 142.250.80.110: bytes=32 time=29ms TTL=118

Ping statistics for 142.250.80.110:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 27ms, Maximum = 29ms, Average = 28ms

Should be an “l” not an “i” (lon is short for London which is my local server).

Pete.

Worked like a champ Pete!

C:\Users\bigmoose>ping lon1.blynk.cloud

Pinging lon1.blynk.cloud [159.65.55.83] with 32 bytes of data:
Reply from 159.65.55.83: bytes=32 time=104ms TTL=49
Reply from 159.65.55.83: bytes=32 time=105ms TTL=49
Reply from 159.65.55.83: bytes=32 time=105ms TTL=49
Reply from 159.65.55.83: bytes=32 time=104ms TTL=49

Ping statistics for 159.65.55.83:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 104ms, Maximum = 105ms, Average = 104ms
…and now ny3.blynk.cloud works!
C:\Users\bigmoose>ping ny3.blynk.cloud

Pinging ny3.blynk.cloud [64.225.16.22] with 32 bytes of data:
Reply from 64.225.16.22: bytes=32 time=25ms TTL=53
Reply from 64.225.16.22: bytes=32 time=27ms TTL=53
Reply from 64.225.16.22: bytes=32 time=26ms TTL=53
Reply from 64.225.16.22: bytes=32 time=26ms TTL=53

Ping statistics for 64.225.16.22:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 25ms, Maximum = 27ms, Average = 26ms

1 Like

So looks like DNS works fine? So if you change the IP to host (blynk.cloud) in your sketch - do you still have troubles connecting?

Dmitriy today both of the following worked ok! I am in USA for info.

Blynk.begin(BLYNK_auth, WiFi_ssid, WiFi_pass,“ny3.blynk.cloud”,80);

and

Blynk.begin(BLYNK_auth, WiFi_ssid, WiFi_pass,“blynk.cloud”,80);

…sometimes the big questions are really simple.

If one were starting from scratch for a Blynk2.0 application, should we use Edgent_ESP8266.ino as the baseline “wire skeleton” to build off of for a WiFi provisioning application?

Should we tag onto edgentTimer instead of creating another instance of BlynkTimer? … as in a statement like:

edgentTimer.setInterval(BLYNK_SEND_INTERVAL_MS, TimerEvent1); //sets up our timer event

where TimerEvent1 is a subroutine in my code, and
BLYNK_SEND_INTERVAL_MS is a const int of interval time in my code.

In one of the migration to 2.0 threads, it was stated that device migration could be as simple as adding 2 defines:

#define BLYNK_TEMPLATE_ID “…”
#define BLYNK_DEVICE_NAME “…”

Was that incorrect?

Yes + the auth you got on the cloud

Okay, I’ve added all three items (template ID, device name, and token) to my legacy thermostat code, but the web dashboard still shows it offline, and there’s no communication with the new app. Watching the serial port output, it appears to be connecting to the wifi correctly. I get the "*WM: [3] unloading " indicating the WiFiManager has done it’s job. That’s usually the end of the serial output, but I did receive this after one bootup:

*WM: [3] unloading
jB⸮⸮⸮ the button to reset configuration…
[794] Hold the button to reset configuration…
[12351] Using Dynamic IP: 172.18.70.104
[12351] CONNECTING_NET => CONNECTING_CLOUD
[12463] Current time: Tue Jul 27 14:42:36 2021
[12463] Connecting to blynk.cloud:443
[13616] Ready (ping: 11ms).
[13713] CONNECTING_CLOUD => RUNNING

Any ideas?

hello. I just found out that the old Blynk platform has stopped working. I have all my home automation made with the old platform, what happens with the energy that I have bought?

You should read this…

Pete.