I was wondering if there was a way to test a modified version of my code on a spare esp8266, with an existing project already running in a remote location on another esp8266, while I am away from the proper project board? So have two versions running at the same time on two different boards.
What I was considering was cloning the blynk project with a different auth code, then uploading the code with the new auth code to another esp. That way any buttons i click in Blynk don’t affect the other project running, and I run two separate versions concurrently.
Prob with this approach is I need lots of credit as I need two Blynk Projects.
Another approach I was considering was removing the proper board from the existing blynk project and adding the new/spare board one. This would create a new auth code so button pushes only control the spare board I upload the code to. But in order to return the link back to the proper project esp I’d have to return home to upload the code with the new auth code as I don’t think I can return the orig auth code to the blynk project huh?
Maybe try adding a new device (spare esp), and then the device selector to your current project, and then re-map all the widgets to “selector”. They will then manipulate/display the device that is selected by the device selector widget.
Once testing is complete re-map widgets to their original hardware, then remove the device and then remove the device selector widget. From some quick testing, be sure to remap the widgets before removing the second device. If not, then you cannot delete the Device Selector Widget without recreating the widgets that were tied to second device (possible bug).
Interesting and glad you posted this as I see the point of this device selector, but not convinced its a great way to change all the elements in my project with 20 widgets for a trial test…
It’s a shame there isn’t something similar that just swaps the auth code so its only a matter of choosing which auth code/device to be receiving and sending to from the project at any one time (assuming both devices with the same pin numbers). Seems for this I need two projects at the current time = lots of credit that I can recover when I remove the trial project but it will remain as credit that I may never use again I assume.
It appears that my project is only 2400 energy’s so perhaps cloning is possible?
So if I cloned the project, then removed the device and added my spare device (new auth code) on the cloned version ONLY then this would have two identical projects (other than auth code) that run in parrallel, but be completely separate due to different auth codes yes?
Or won’t I be able to change the auth code for the clone? Or won’t I be able to clone the same project with the same account? I assume it will just have two copies, with one a different name yes?
From the docs it sounds like you are correct. Clone current project to generate QR Code, scan QR Code within BLYNK App to add it as a new project. In the project settings of the newly generated project, add a device (which will generate a new Auth Token). Load your program with newly generated BLYNK Auth Token to the spare ESP, and BLYNK away.
I do not think there is any reason to remove you original device from the project you are cloning.
In all honesty though, I have never cloned a project.
Thanks. I might give it a go then. I already have 2000 energy in the bank anyway so happy to add a little more as Blynk has added great value to my projects.
I have loads of credit sitting there now. For me the cost I have spent and having sitting there as spare for Blynk is easily justified. I hadn’t realised it was only 2400 energy to clone (just over 2 usd) when I started this thread an dhadn’t realised this would be such a great way of doing it. Happy days
Just to clarify for other readers who might have misinterpreted like I did at first
It doesn’t COST any energy to clone (like it does to SHARE access)… but obviously the receiving phone’s account needs to have enough available energy to accept the cloned copy.
Thanks for clarifying. I hadn’t realised it read that way until now.
Yes its only the widget costs to buy again (two copies of the project). But then I get them back as energy credit once the testing has been done.
Its a handy way for me to debug for applications where its hard to plug the USB cable into the projects board. I found that I wrote too much code and had too many difficult to trace bugs due to that as I wasn’t uploading the code very often. With the ability to check all my code at a desk with a spare NodeMCU I have
Only really works for things without many digital or analog inputs required to debug the code though I guess. I used a variable power supply to simulate my analog input, although I could have likely used a digital out of the esp with a pot and resistor to make a variable voltage divider I guess for the analog input I could just use a digital out on the board to one of the digital inputs for any digital channels… maybe worth making if I keep pursuing with debugging in the office without the full project there)