Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Option to Mass Import Variables/Widgets?
#1
Is there any way to bulk edit/import variables or widgets? I just redesigned 5 or 6 ESP systems averaging around 80 variables a piece and I'm dying entering in everything manually haha. Something like a csv import or some kind of option on the back end would be amazing! Thanks!
Reply
#2
(04-27-2025, 05:16 AM)rcl27 Wrote: Is there any way to bulk edit/import variables or widgets? I just redesigned 5 or 6 ESP systems averaging around 80 variables a piece and I'm dying entering in everything manually haha. Something like a csv import or some kind of option on the back end would be amazing! Thanks!

Yes, it would be helpful.
But.... forum seems to me "not so active"....
Reply
#3
I found a very "unofficial" way to do it thanks to ChatGPT. This is definitely a "create backups of backups" kind of scenario lol. The save files are basically hex encoded database files. If you download DB Browser (SQLite), you can just drop the save file into it and have access to all of the internal databases. I am still deep into some coding on one of my projects, so I haven't gotten to the mass upload stage yet. Buuut I have added buttons, changed some variables, etc through DB Browser. 

One interesting thing, I tried changing the order of the green connection dots to finally match my board list. For some reason, my reservoir controller happily switched with my fogger controller (they were next to each other), but my RO flow/pressure/temperature controller would go gray if I tried to change it's position (it was at the end). I only spent like 5 minutes with it, so I didn't get a chance to solve it. Big piece of advice, make a copy of your program (especially if it autoloads at startup), rename the file, and rename the program in Virtuino. Either turn off the autoload program feature, or just make sure it is on the one you are not editing. This technique can brick your program or Virtuino!

That being said, ChatGPT totally offered to write a python script to push all of my widgets/variables into Virtuino as long as I put everything in an Excel file. So, hey, it's at least something! lol
Reply
#4
(05-02-2025, 07:01 AM)rcl27 Wrote: I found a very "unofficial" way to do it thanks to ChatGPT. This is definitely a "create backups of backups" kind of scenario lol. The save files are basically hex encoded database files. If you download DB Browser (SQLite), you can just drop the save file into it and have access to all of the internal databases. I am still deep into some coding on one of my projects, so I haven't gotten to the mass upload stage yet. Buuut I have added buttons, changed some variables, etc through DB Browser. 

One interesting thing, I tried changing the order of the green connection dots to finally match my board list. For some reason, my reservoir controller happily switched with my fogger controller (they were next to each other), but my RO flow/pressure/temperature controller would go gray if I tried to change it's position (it was at the end). I only spent like 5 minutes with it, so I didn't get a chance to solve it. Big piece of advice, make a copy of your program (especially if it autoloads at startup), rename the file, and rename the program in Virtuino. Either turn off the autoload program feature, or just make sure it is on the one you are not editing. This technique can brick your program or Virtuino!

That being said, ChatGPT totally offered to write a python script to push all of my widgets/variables into Virtuino as long as I put everything in an Excel file. So, hey, it's at least something! lol

I don't know if this works for you but what I have had to do when I have a project that use similar variable for multiple boards but with board-specific details like port number, IP address, etc is to create a separate header file that holds all the variables and can be included in the main code. For me, it is easier to edit the header file for each board with it's specifics than to scroll endlessly and mindlessly through thousands of lines of code to edit variables embedded in my code.

Another approach I also use (with Virtuino 5 and 6 but not yet with Virtuino IoT) is to create blank variables and then be able to use the Virtuino app in AP mode to send each board's specific data to each board during the first time configuration (more like commissioning).

Both approaches, perhaps aren't the best, but have taken much pain out of having to edit each board's code to a large extent for me .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)