What's new

MerlinAU MerlinAU v1.2.6 - The Ultimate Firmware Auto-Updater (**Thread closed due to age**)

  • 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!

Just reviewed the code and my recollection was slightly wrong, so minor correction incoming below to set the record straight:

The /usr/sbin/webs_update.sh is called everytime MerlinAU is run interactively, but not when the update function runs as a cron job.
However the rest of what I said still remains the same. The _GetLatestFWUpdateVersionFromWebsite_ function is designed to always fetch the latest firmware version available on the website.

It does this by:
1. Extracting all firmware versions for the product on the website.
2. Sorting all these versions numerically.
3. Selecting the last item from the sorted list, which represents the newest version.

Given this design, even if the /usr/sbin/webs_update.sh is not called by the cron job and is only called interactively, if a second new firmware version is released while you are in the postponement period for the first update, the function when next invoked, would identify and select this second new version as the latest.
This is because the function does not track the history of versions it has previously identified (however it is in the settings file) but simply selects the newest version available at the time of its execution.

(This is excluding the fact that /usr/sbin/webs_update.sh runs every night anyways. Unless you disable the update check in the MerlinAU script or the WebUI.)
Does the postponement period start over when the second new version is detected? It should.
 
Does the postponement period start over when the second new version is detected? It should.

Yes, it does. :) As per the section of the script:

Code:
fwNewUpdateNotificationVers="$(Get_Custom_Setting FW_New_Update_Notification_Vers TBD)"
   if [ -z "$fwNewUpdateNotificationVers" ] || [ "$fwNewUpdateNotificationVers" = "TBD" ]
   then
       fwNewUpdateNotificationVers="$2"
       Update_Custom_Settings FW_New_Update_Notification_Vers "$fwNewUpdateNotificationVers"
   else
       numVersionFields="$(echo "$fwNewUpdateNotificationVers" | awk -F '.' '{print NF}')"
       fwNewUpdateVersNum="$(_FWVersionStrToNum_ "$fwNewUpdateNotificationVers" "$numVersionFields")"
       if [ "$releaseVersionNum" -gt "$fwNewUpdateVersNum" ]
       then
           fwNewUpdateNotificationVers="$2"
           fwNewUpdateNotificationDate="$(date +"$FW_UpdateNotificationDateFormat")"
           Update_Custom_Settings FW_New_Update_Notification_Vers "$fwNewUpdateNotificationVers"
           Update_Custom_Settings FW_New_Update_Notification_Date "$fwNewUpdateNotificationDate"
           _SendEMailNotification_ NEW_FW_UPDATE_STATUS
       fi
   fi

Essentially in short this code says if a newer version is available, the script updates the notification version to the new version ($2), sets the notification date to the current date formatted according to FW_UpdateNotificationDateFormat, and updates these values in the configuration file.
Finally, if a new firmware version is detected and the settings are updated, an email notification is sent indicating the new firmware update status.

All this is done before the _CheckTimeToUpdateFirmware_ function, which is what postpones the update itself, so yes, it would detect the newer version, and re-postpone if a newer version comes along within the postpone window.
But this was really a long answer the original question, which it will always download the newest version, but as you pointed out, it should, and will, re-apply the delay within the postpone window if a newer update is found.
 
Does the postponement period start over when the second new version is detected? It should.

Added a new FAQ question with this info!
Thanks for the fantastic questions on the general logic, and exploring the features of how the script functions :)

I'll have a great little knowledge base when I'm done here. Some questions I can answer from memory, others I need to re-review the code a bit against the 3800+ lines of logic lol.
 
Last edited:
Just to confirm, is this script compatible with the ASUS RT-AX86U Pro?
 
Just to confirm, is this script compatible with the ASUS RT-AX86U Pro?

Yes it's only listed as an untested model on GitHub :) it's not apart of the blocked list.

All HND AX models are supported.
 
Last edited:
I've just installed MerlinAU and I've left the default value of 15 days after a new firmware is detected. I would like any automatic updates to run in the early hours, when no-one will be using the network. So, if that's possible, how would I set it to run at say 5:00 AM any day of the week or even better, 5:00 AM on certains days (such as Sat, Sun, Mon, Tue & Wed)?
 
I've just installed MerlinAU and I've left the default value of 15 days after a new firmware is detected. I would like any automatic updates to run in the early hours, when no-one will be using the network. So, if that's possible, how would I set it to run at say 5:00 AM any day of the week or even better, 5:00 AM on certains days (such as Sat, Sun, Mon, Tue & Wed)?

Feel free to use a cron calculator like we have linked on our GitHub: https://crontab.guru/

It's set under the advanced options on MerlinAU (ad)
 
Thank you for that.

Happy to be of assistance. Cron guru also has a link towards the bottom for quick examples to reference.
Feel free to report when you get success on your next upgrade with that model, so I can update the list of tested models. 🙂

Edit: I've also modified question 9 in the FAQ to be more clear on this question/topic.
 
Last edited:
Will this script support RT-AX82U running gnuton anytime in the future?
 
MerlinAU Version 1.0.5 released.

What's Changed/Fixed?:

PR: 132 - Added a Redirect to Output Unzip to the logs. (Useful if the unzip fails for some reason!)
PR: 133 - Menu Patch for clarity and remove the possibility of confusing language. (Thanks @Ubimo for the suggestion!)
PR: 136 - Added email notification on failure to decompress F/W ZIP file. Also added logging of F/W ZIP file contents. (Thanks @Martinski )
PR: 138 and 139 in relation to bug Fixes for the Cron Job Translations I made. (Thanks @Martinski )
PR: 142 Re-worked validation of entered cron schedules (Thanks @Martinski )

Tightening up some code & general code improvements. As always, we highly recommend you update whenever possible. Enjoy the new release! :)

Significant screenshots:
1708661683541.png

1708661688807.png
 
Will this script support RT-AX82U running gnuton anytime in the future?
This request was already made on our Github here: https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/issues/89

Martinski and I have made the decision to not officially support Gnuton without hardware.
Without hardware to validate the changes we are making, we would be "running blind" so to speak.
(Full answer on the linked Github issue)

We do have a Gnuton branch which hasn't been updated since version 1.0.3 here: https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/tree/GnutonF/W
We needed some questions answered about Gnuton firmware to help push this forwards. We never got the replies we needed to continue.

If someone from the Gnuton community can answer our questions we might be able to help adapt the base script for Gnuton firmware, however we will never be able to officially support Gnuton without a router with the firmware.
Otherwise if a dev from the Gnuton community would like to fork our project from that branch I started and complete it, they are more than free too take on the project and complete the work I started using the Github API. :)

I still hold to our original stance that we shouldn't officially support it without hardware, I just decided to pickup another challenge and see what could be done using Githubs API to download their firmware.
It seem to work to download the correct Gnuton firmware from Github using their API (for the correct model and version.) That's as far as I got without hardware or any questions answered.
 
Last edited:
This request was already made on our Github here: https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/issues/89

Martinski and I have made the decision to not officially support Gnuton without hardware.
Without hardware to validate the changes we are making, we would be "running blind" so to speak.
(Full answer on the linked Github issue)

We do have a Gnuton branch which hasn't been updated since version 1.0.3 here: https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/tree/GnutonF/W
We needed some questions answered about Gnuton firmware to help push this forwards. We never got the replies we needed to continue.

If someone from the Gnuton community can answer our questions we might be able to help adapt the base script for Gnuton firmware, however we will never be able to officially support Gnuton without a router with the firmware.
Otherwise if a dev from the Gnuton community would like to fork our project from that branch I started and complete it, they are more than free too take on the project and complete the work I started using the Github API. :)

I still hold to our original stance that we shouldn't officially support it without hardware, I just decided to pickup another challenge and see what could be done using Githubs API to download their firmware.
It seem to work to download the correct Gnuton firmware from Github using their API (for the correct model and version.) That's as far as I got without hardware or any questions answered.
Ok, i think he moved to discord. There is a link to the discord channel on his webpage/github

 
Ok, i think he moved to discord. There is a link to the discord channel on his webpage/github


No worries we just ended up closing the request since as I mentioned I can only do so much from my side without hardware anyways.
If you know any devs or anyone from the Gnuton community that want to fork my branch and finish it, they are more than welcome too :)
 
No worries we just ended up closing the request since as I mentioned I can only do so much from my side without hardware anyways.
If you know any devs or anyone from the Gnuton community that want to fork my branch and finish it, they are more than welcome too :)
No i have no idea, sorry
 
It’s showtime! :)
And what a show...
I've a daily Cron, with a 2 days postpone. As soon as I received the two emails for both my gt-ax6000 (running alpha version) and my rt-ac86u (stable), I went straight to the app and reduced the postpone to zero days 🌚

Then I forced a check and guess what... All went crazily smooth and well ☺️

With backup auto made via Backupmon!

Thanks everyone.
 
Have been pondering AiMesh node update. With Merlin on the node(s), AMTM works. Set up AUMerlin on the node to run at a different time than the router. There would be no real need to do a backup.
Possible?
 

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