Migrating from cloud to server

Hi, this is my first post with this [new] account and I am a very happy Blynker of a couple years, and I am in the process of migrating my project to new boards, but also from cloud to server. I am very much a novice in terms of coding and languages and would like to ask a few questions here and there in the next few days to help me better understand what I’m doing. My first question is can I remain logged into my previous account and also leave my current project running with access to my Android app, and also log into this second account, or will I need to log out? Another way to put it, can I be logged into 2 accounts at the same time, or even download a 2nd app from the play store and log into the 2nd acct from the 2nd app?

Being new to server (java and any other non Arduino-like language), I know I’ll be hitting many brick walls in the near future and would really like to keep my current project online while I develop out the predecessor, but of course I would need to be logged into both to do that. I’m working my way through the Blynk Github instructions and that will likely take me a few days to get through, and if after my best effort to troubleshoot anything I still fail, I will revisit this post and ask more questions. At any rate, thanks for adding me (again, lol) and thank you all in advance.

You can have both Cloud and your own Local Server accounts… even use the same email and password if it helps your remember… but they will still be completely independent of one another, and you WILL have to log out of one in order to log into the other (by changing the Apps custom logging back and forth between Cloud and Custom - See here: https://github.com/blynkkk/blynk-server#app-and-sketch-changes)… Unless you have another phone, tablet or even an Android emulator on your PC, then you can run both side by side, so to speak

As for transfering your projects… use the Clone option (not sharing) to make copies to your LS.

Share your Project configuration - http://docs.blynk.cc/#sharing

Note: You will need to generate new Auth codes for each project, based on the server they are running from, so it will not be easy to swap devices back and forth between servers… but is possible by commenting out a few lines each time in your sketches (probably more elegant ways, but I don’t use them :stuck_out_tongue: )

char ssid[] = "xxxxxxxxxx";  // Your WiFi ID
char pass[] = "xxxxxxxxxx";  // Your WiFi Password
char IP[] = "xxx.xxx.xxx.xxx";  // The IP to your Local Server

// Comment out one of the following pairs based on server choice //

char auth[] = "xxxxxxxxxx"; // Cloud Server
//char auth[] = "xxxxxxxxxx"; // Local Server

Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442); // Cloud Server
//Blynk.begin(auth, ssid, pass, IP, 8442); // Local Server

Thanks @Gunner. I will experiment with your suggestions and figure out what works best for me. I may even have an old android laying around so I can have a dedicated device to run the app with. When migrating my project, I will also be chopping it up into pieces to be used with ESPs, but I guess that’s not really relevant.

Ok, I made a bit more headway. I took your advise and installed Nox (an Android emulator), created a new Gmail account, installed Blynk app to it and logged in. Can you advise me what needs to be different in my sketch(es) that will direct my hardware to the local server instead of the Blynk cloud?

Also, since I have all new hardware for the project, I will fragment my code as needed to isolate functionality, so essentially I will be building new projects and don’t see need of cloning anything. I also believe I can set flags in code to select the correct device(s) based on the function calls issued from my app, but please correct me if that’s wrong.

Also, I was about to post to THIS year old thread on the subject, but thought it wise to first post my question(s) here, but I wanted to inquire whether it would be easier to install the local server to a Pi Zero W, or Windows 10 PC? I have much more experience with Win10 and Zero experience with Pis, but still feel the question to be valid as I’m new to servers as well. So if it would be better to use the Zero W, it might be better to learn servers and Pi at the same time.

Edit - I have an ESP/DHT22 sketch I just built and tested with Blynk Cloud that I can immediately edit and upload to test the server connections etc, I just don’t know what needs to be changed in the sketch aside from the AUTH key.

First of all… you need to install your Local Server before anything else…

Yes… Thank you! Reopening older topics is not always recommended… Read them, study the various methods, then try for yourself and use your own topic for assistance as you go.

Installing Local Server is pretty much the same on either base… it is the base that will be different, if you want to learn RPi then that is the way to go, it can easily run 24/7 where’s your PC may not be as stable (rebooting, updates, etc.).


This stuff… fill out your info, pick one of the Auth and Blynk.begin() options, comment out the other

I recommend you simply clone over… don’t try to mix two servers with multiple devices sharing some or all of the code at same time… they (servers) run independently of each other and each needs to have it’s own accounts logged in and generate it’s own AUTH codes for hardware to connect to it.

AFAIK, the Windows/Blynk server is already installed, I just don’t know yet if I did it correctly and I presume not to know till I upload a sketch and see if the hardware connects to the emulated android app. Also, regarding the cloning aspect, I intend to keep the old Mega based project running while adding in new functions to the new boards, so as soon as I confirm the new hardware and local server are functioning, that portion of the old project will be discontinued indefinitely. This is why I wanted 2 independent projects running at same time. Once the entirety of the project has switched over, I can then shut down my cloud based project and reclaim the energy to build the new project and also no longer use the new email account.

Cloning is NOT sharing… it is … well, cloning… Two identical, but separate App projects, one in each server, running on their own App and server accounts, with their own Auth, their own hardware… etc… :stuck_out_tongue:

Just saves you recreating and setting up each and every Widget, one at a time.

To my knowledge, I think I need to recreate most/all of my widget settings as everything prior was based to run from a single board. Now all of the hardware will be divvied up into several ESP boards, and some will need to know the settings of others to know if it’s time to activate a a connected device. For instance, ESP-A will have a physical RTC to keep time/date. ESP-B has pumps on relays that need to execute according to time that is kept on ESP-A. ESP-C will have other types of pumps that will inject solutions weekly, so it will need to know date and time from A, and most likely need to have B pump out old water and in new water before executing. There will be many other ESPs to come and how/when they all relate will get confusing to explain, but this is something I’ve been working on for years and I know the needed relations. etc. Plus also, wouldn’t cloning the app also require that I have enough energy in the 2nd account? My intention is to use the free 2000 to build ESP A, then store it on the side unused and work on B, then C, then D one at a time till everything is moved over from the Mega to the ESPs.

I was just about to start a new topic for this question, but maybe you can answer here. Is there a way to merge several AUTH tokens into a single app? If no, I wanted to suggest a “Merge Tokens” widget. Can you link this post to the proper people for that?


The App is not where the projects are stored or where the Auths are actually generated… the server does all that, based on the projects in the App.

One Auth per device is normal, and you can have multiple devices per project, although it is technically possible to run multiple devices all with the same Auth, it is not recommended.

You can not take an existing Auth and insert it into a new project … it needs to be generated or regenerated by the Server (via the project) and inserted into the Device code… that is what links a device to a servers account/project.

Is it impossible to create a widget that can merge several apps into one for this purpose?

I don’t think you understand… you are talking about the fundamental roots of how Blynk works… it is not going to be uprooted with a simple modification just becasue you are unsure of how it works :wink:

  • Clone existing projects to new server and setup their new devices & auth. Clone some or all, your call, but they will not come apart or be merged automatically… for that your next option is…

  • Start from scratch on new server with the new projects devices & auth.

  • Or just use existing devices with ether option, but you still must update their auth codes from the new server.

Pick one or more combos… only other option is stick with the Cloud Server.

Does the Local Server have a different IP than the machine it’s running on?

  Blynk.begin(auth, ssid, pass, IP, 8442); // Local Server