What's new

YazDHCP YazDHCP - feature expansion of DHCP assignments (increasing limit on the number of DHCP reservations)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

And looks like another minor update has dropped - suggest another forceupdate on develop branch.

PR #15
 
1) The current implementation of the "Back up & Restore" of custom user icons does *not* export to or import from an external PC or some other network client connected to the router. Instead, it targets a directory available either on the router's JFFS partition or in a USB-attached disk drive. This target directory where the subdirectory for backups is created can be modified using the CLI menu (see note #3 below).

Is this something that will be added in a future implementation?
 
1) The current implementation of the "Back up & Restore" of custom user icons does *not* export to or import from an external PC or some other network client connected to the router. Instead, it targets a directory available either on the router's JFFS partition or in a USB-attached disk drive.
@Martinski I've got no idea whether you have any desire to go further with this, but as food for thought ...

In my mind ideally the GUI would have a "Backup" and "Restore" pair of buttons and a "Export" and "Import" pair of buttons.
Backup/Restore would save (or restore from) both the .csv and custom icons to a user-selectable location (preferably) on their USB device, and keep multiple backups etc.
Export/Import would do the same but to an external location with a browser save/select dialogue.
That way the operations would be "one button push" and I'd be more likely to remember to do it after making changes! :D

But that's just my 2 cents ...
 
@Martinski I've got no idea whether you have any desire to go further with this, but as food for thought ...

In my mind ideally the GUI would have a "Backup" and "Restore" pair of buttons and a "Export" and "Import" pair of buttons.
Backup/Restore would save (or restore from) both the .csv and custom icons to a user-selectable location (preferably) on their USB device, and keep multiple backups etc.
Export/Import would do the same but to an external location with a browser save/select dialogue.
That way the operations would be "one button push" and I'd be more likely to remember to do it after making changes! :D

But that's just my 2 cents ...
It only takes saying his name @Martinski , to peak his curiousity.... If you say his name with a list of feature request, he may take you up on that challenge....

***Remember the things you are about to witness should not be attempted on your home setup, viewer discretion advised!***
 
Is this something that will be added in a future implementation?
@Martinski I've got no idea whether you have any desire to go further with this, but as food for thought ...
At this point, I have not thought about & considered it long enough to make a decision one way or the other, and for the next 2 to 3 weeks my "free" time will be very limited. Also, I have this vague recollection of having read some while ago (perhaps 2 or 3 years back) a post from @RMerlin discussing some limitations he had put into the WebGUI so that a 3rd-party add-on could not import any file directly into the filesystem. I honestly don't remember the details so I would need to search and dig deep for that post. My recollection could be completely wrong of course, and/or my understanding of the post/discussion could be entirely wrong as well.

If @RMerlin or @Jack Yaz could chime in here and shed some light on this to clarify whether any such "limitations" are currently placed on the WebGUI add-ons, I would very much appreciate their input.

In any case, for now I have not decided if the "export/import of icon files" functionality will be added in a future revision of the add-on.

In my mind ideally the GUI would have a "Backup" and "Restore" pair of buttons and a "Export" and "Import" pair of buttons.
Backup/Restore would save (or restore from) both the .csv and custom icons to a user-selectable location (preferably) on their USB device, and keep multiple backups etc.
Export/Import would do the same but to an external location with a browser save/select dialogue.
That way the operations would be "one button push" and I'd be more likely to remember to do it after making changes! :D
Those are very good ideas. I would certainly consider them if I decide to pursue this further.
 
At this point, I have not thought about & considered it long enough to make a decision one way or the other, and for the next 2 to 3 weeks my "free" time will be very limited. Also, I have this vague recollection of having read some while ago (perhaps 2 or 3 years back) a post from @RMerlin discussing some limitations he had put into the WebGUI so that a 3rd-party add-on could not import any file directly into the filesystem. I honestly don't remember the details so I would need to search and dig deep for that post. My recollection could be completely wrong of course, and/or my understanding of the post/discussion could be entirely wrong as well.

If @RMerlin or @Jack Yaz could chime in here and shed some light on this to clarify whether any such "limitations" are currently placed on the WebGUI add-ons, I would very much appreciate their input.

In any case, for now I have not decided if the "export/import of icon files" functionality will be added in a future revision of the add-on.


Those are very good ideas. I would certainly consider them if I decide to pursue this further.
The scripting world and this community hangs on your every word... even the prepositions! You have done, and continue to do, awesome work! All I can say is thank you for what you have done, and what you will continue to do.
 
It only takes saying his name @Martinski , to peak his curiousity.... If you say his name with a list of feature request, he may take you up on that challenge....

***Remember the things you are about to witness should not be attempted on your home setup, viewer discretion advised!***
If I only had the time...
 
Last edited:
oh there are ways to save things into the filesystem, but you'd need to stay within the AddonAPI character limit in crafted service messages. if the content can be base64 encoded, for example, you can pass it via a service command which a script catches and deciphers
this approach is obviously limited by content types too, unless suitable JS and shell utilities exist
 
oh there are ways to save things into the filesystem, but you'd need to stay within the AddonAPI character limit in crafted service messages. if the content can be base64 encoded, for example, you can pass it via a service command which a script catches and deciphers
this approach is obviously limited by content types too, unless suitable JS and shell utilities exist
Ah yes, I think what you're referring to is the AddonAPI that has the 8KB maximum limit. If so, I became familiar with it when I introduced the "DHCP Lease" option in the YazFi WebGUI last December. The problem is that this 8KB limit will be an issue when attempting to import and then write onto the filesystem a tarball that's larger than 8KB, which I believe most of them are likely to be.

After writing the shell script code to back up & restore the icons files, I ran several tests by adding 2 to 5 custom user icons (which were standard size & fairly simple) and the compressed tarballs that were generated are between ~5KB to ~13KB. If we extrapolate with having 10 or more user icons, the tarball is likely to be over 20KB.

Thinking out loud for a moment, ideally it would be nice to be able to import any size tarball as a "blob" and write it "as is" into the filesystem so that it can be uncompressed and then extract its contents into the "/jffs/usericon" directory.

In any event, thanks for the input.
 
@Martinski whatever you decide, thanks for your valuable icon tweaks thus far, it is greatly appreciated!
You're very welcome, and thanks for keeping me on my toes with that bug you found & reported. There's nothing like a 2nd pair of eyes when it comes to testing & verification.
 
I'm just trying this out for the first time. I can run the user icons backup, but when I try to restore them, it says there are no backup files available. Am I doing something wrong?

Screenshot - 03_06_2023 , 12_21_06.jpg

Screenshot - 03_06_2023 , 12_22_47.jpg

Screenshot - 03_06_2023 , 12_13_29.jpg
 
I'm just trying this out for the first time. I can run the user icons backup, but when I try to restore them, it says there are no backup files available.
SSH into the router and check that folder location (/mnt/USBSTORAGE/DHCP User Icons Backups/SavedUserIcons) to see if the exported CustomUserIcons_2023-06-03_12-20-46.tar.gzip file exists or if that location even exists on the USB storage device. That may help @Martinski narrow down the issue. Also make sure to include your firmware version as well just in case its a specific issue with the firmware.
 
SSH into the router and check that folder location (/mnt/USBSTORAGE/DHCP User Icons Backups/SavedUserIcons) to see if the exported CustomUserIcons_2023-06-03_12-20-46.tar.gzip file exists or if that location even exists on the USB storage device. That may help @Martinski narrow down the issue. Also make sure to include your firmware version as well just in case its a specific issue with the firmware.
It shows up and is accessible from Windows explorer and when I SSH into the router as you suggested, I see this:

Screenshot - 03_06_2023 , 18_56_37.jpg
 
I'm just trying this out for the first time. I can run the user icons backup, but when I try to restore them, it says there are no backup files available. Am I doing something wrong?

View attachment 50619
View attachment 50621
View attachment 50622
The problem is caused by the blank spaces in your directory path. Most likely I missed a couple of places where file globbing was not properly set up when searching for the list of backup files within a directory path that happens to include one or more blank spaces.

I'll take a look at this tomorrow. That's a good catch, BTW.

In the meantime, if you want to keep the backup files safely stored, use a directory path *without* any blank spaces.
 
Similar threads
Thread starter Title Forum Replies Date
V Best Practice When Importing CSV To YazDHCP? Asuswrt-Merlin AddOns 7

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top