What's new
  • 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!

MerlinAU MerlinAU v1.4.6 - The Ultimate Firmware Auto-Updater (WEBUI + GNUTON SUPPORT!)

MerlinAU 1.4.3 Released!

What's Changed/Fixed?:

PR: [ #458 ] - Script Update Email Notifications
  • As requested by maghuro here: https://www.snbforums.com/threads/m...auto-updater-gnuton-support.91326/post-951576
  • I am implementing email notifications only when the script auto-updates and is non-interactive.

    1745622871661.png
PR: [ #459 ] - Improved Subject Line for Script Update Emails
  • Modified code to set a more appropriate Subject line for the "Script Update Status" email notifications.
  • The previous Subject line was misleading because the email is not about a F/W Update Status.
  • (Thanks @Martinski4GitHub )

    1745622897691.png
    1745622906988.png
PR: [ #456 ] - Patch PR 458
As always, we highly recommend you update ASAP as this includes functional improvements and little bug fixes.
Thanks!
 
This script has come a very long way congratulations on the newest release. It also works flawlessly 👍

We hit a few speed bumps along the way with the latest WebUI, but we got there and that's all that matters. It was a massive overhaul for a script of a "mature" size already, I'm very happy to hear your enjoying the script!

It's only possible with the feedback and users here at SNBForums, and Martinski and I both appreciate the constructive feedback. 👍
 
MerlinAU 1.4.4 Released!

What's Changed/Fixed?:

PR: [ #464 ] - Fixing Gnuton Errors Since Overhaul

Fixing Gnuton Specific issues identified below; these issues were only identified with the Gnuton mode of the script and not the Merlin mode.
  1. With the regular flash process, users would get the error: WARNING: The release version found by MerlinAU does not match the F/W update version.. Yet they should match.
    1746767450395.png
  2. Users would also get the error: No Firmware release URL was found for (ROUTER_MODEL) router model
    1746767421963.png
  3. When starting the script, users would get the error: changeLogFile: parameter not set
    1746767374245.png
PR: [ #465 ] - Minor changes & fixes
As always, we highly recommend you update ASAP as this includes functional improvements and little bug fixes.
Thanks!
 
Last edited:
Finally!! With this update I caught what I thought was a bug, but it was my typo. My router and node sent me the notification that the script updated, my second node did not 🤦‍♂️
But somewhere on the Internet someone with an email address one letter off from me in the same domain has been getting email updates from my second node 🤷‍♂️🤣

Guessing in the mad rush of rebuilding the wiping and reflashing the nodes, restoring backups and setting things back up again and re-establishing the Mesh. I mistyped my email address, or more accurately, one letter of it, under the email settings of AMTM. Could've of been longer :oops:😬
Since testing verbose shows it succeeded and scrolls by quickly and it's only one letter off in the middle of the address, I didn't notice it or catch it until now 🤦‍♂️

Though I suspect the recipient of those emails likely has a confused look when opening them 😵‍💫🤣
 
Finally!! With this update I caught what I thought was a bug, but it was my typo. My router and node sent me the notification that the script updated, my second node did not 🤦‍♂️
But somewhere on the Internet someone with an email address one letter off from me in the same domain has been getting email updates from my second node 🤷‍♂️🤣

Guessing in the mad rush of rebuilding the wiping and reflashing the nodes, restoring backups and setting things back up again and re-establishing the Mesh. I mistyped my email address, or more accurately, one letter of it, under the email settings of AMTM. Could've of been longer :oops:😬
Since testing verbose shows it succeeded and scrolls by quickly and it's only one letter in the middle of the address, I didn't notice it or catch it until now 🤦‍♂️

Though I suspect the recipient of those emails likely has a confused look when opening them 😵‍💫🤣

Happy to know you found the cause of the missing emails and it was a simple input error 😂 I really liked the suggestion for notification emails when the script auto updates.

This morning, I woke up to 3 emails that 3 routers I manage successfully updated the script. The only one that didn't send the email was my Gnuton router which I was using to test and develop the fixes in the PR; so it was already updated to the latest before we pushed it out lol.

All worked perfectly for me, and it's a nice indication that everything is updated and ready for a firmware drop... Good timing too, because I can see on GitHub Gnuton is working on his 388.9 release.
 
Happy to know you found the cause of the missing emails and it was a simple input error 😂 I really liked the suggestion for notification emails when the script auto updates.

This morning, I woke up to 3 emails that 3 routers I manage successfully updated the script. The only one that didn't send the email was my Gnuton router which I was using to test and develop the fixes in the PR; so it was already updated to the latest before we pushed it out lol.

All worked perfectly for me, and it's a nice indication that everything is updated and ready for a firmware drop... Good timing too, because I can see on GitHub Gnuton is working on his 388.9 release.
And hopefully 388.9_2 to NOT go through what we did ;)
 
MerlinAU 1.4.5 Released!

What's Changed/Fixed?:

PR: [ #468 ] - Include Update Button for Script in WebUI

PR: [ #469 ] - Fix & Improvements
  • Fix to prevent showing "vTBD" on the WebGUI page for "Script Update Available"
1747352203298.png

  • Improved some message wording.
  • General code improvements.
  • (Thanks @Martinski4GitHub )
As always, we highly recommend you update ASAP as this includes functional improvements and little bug fixes.
Thanks!
 
Last edited:
Is there a known issue that causes the delay period to be ignored? I woke up yesterday to an unpleasant surprise: my router had been upgraded to the latest version -- a major version change! The first email showed a new firmware version available, and said it would be updated May 30. *Five minutes* later, a second email showed the new version was installed :( Then I got to spend the rest of the morning getting my thermostat to connect :( :(

Now this may well be partially my own fault since I had gotten complacent and not been checking updates for the script. I think I was on 1.3.12 but I'm not positive (first thing I did was update the software).

Given my bad experience, would it be possible to allow an option to automatically *check* for updates, and send email, but leave it up to me to click a button in the web interface to "approve" the update? I see there is now an auto-update the software, but that adds its own risk perhaps?
 
Is there a known issue that causes the delay period to be ignored?

No - You would be the first.
I'll test and advise shortly.

I woke up yesterday to an unpleasant surprise: my router had been upgraded to the latest version -- a major version change! The first email showed a new firmware version available, and said it would be updated May 30. *Five minutes* later, a second email showed the new version was installed :( Then I got to spend the rest of the morning getting my thermostat to connect :( :(

Not saying I don't believe you; but can you please provide screenshots of the email trail as you received them with the timestamps? Or your MerlinAU logs?
This will help us better understand; it should even identify the script version within the Email as an example.

Now this may well be partially my own fault since I had gotten complacent and not been checking updates for the script. I think I was on 1.3.12 but I'm not positive (first thing I did was update the software).

I would enable auto-updates in the script if you feel it comfortable; to make sure it stays updated.

Given my bad experience, would it be possible to allow an option to automatically *check* for updates, and send email, but leave it up to me to click a button in the web interface to "approve" the update? I see there is now an auto-update the software, but that adds its own risk perhaps?

Currently you can have auto-updates enabled and that will send emails and update the script for you when it does; or auto-updates disabled and use the WebUI "check" button along with the "install" checkbox when your ready.
I'll discuss with Martinski if there's appetite in doing a hybrid of the two. (Automatically check and advise but not update)
 
Last edited:
I'll discuss with Martinski if there's appetite in doing a hybrid of the two. (Automatically check and advise but not update)

Actually sorry I just had a brain fart, why not just install AMTM script email notifications? That advises when there's script updates via email but doesn't auto update them.
 
No - You would be the first.
My Mom always said I was special :D

Not saying I don't believe you; but can you please provide screenshots of the email trail as you received them with the timestamps? Or your MerlinAU logs?
This will help us better understand; it should even identify the script version within the Email as an example.
There's not room for the full text of the emails as well as logs, but I can include them in a separate email if that would help. Also help me if you need other info from the logs, what I included was the first [MerlinAU] to the last, prior to reboot. I still have the pre-update backup if that would help, but I'd need some way to get it to you privately.

You can see from the logs that it says everything will happen in 13 days, and then the script appears to go directly to starting the backup.

First email at Fri, 16 May 2025 01:37:01 -0500:
Code:
The F/W version that is currently installed: <b>3004.388.8.4</b>
Number of days to postpone flashing the new F/W Update version: <b>13</b>
Please click here to review the changelog:

The firmware update is expected to occur on: <b>2025-05-30 01:37:00</b>

Note that the place to click to review the changelog is empty.

Second email, Fri, 16 May 2025 01:38:14 -0500:
Code:
Started flashing the new F/W Update version <b>3006.102.4.0</b> on the <b>GT-AX6000</b> router.

Third email, Fri, 16 May 2025 01:41:37 -0500, success.

I needed to post the log separately anyway, see next post.

I would enable auto-updates in the script if you feel it comfortable; to make sure it stays updated.
Since I got everything working on the new firmware I might try that. Or maybe switch to AMTM notifications, as long as that handles firmware updates.
 
Here are logs...

Code:
May 16 01:37:01 [MerlinAU] 24206: MerlinAU v1.3.12
May 16 01:37:01 [MerlinAU] 24206: Running the update task now... Checking for F/W updates...
May 16 01:37:05 [MerlinAU] 24206: The email notification was sent successfully [NEW_FW_UPDATE_STATUS].
May 16 01:37:05 [MerlinAU] 24206: Using release information for Merlin Firmware.
May 16 01:37:06 [MerlinAU] 24206: The firmware update to 3006.102.4.0 version is currently postponed for 13 day(s).
May 16 01:37:06 [MerlinAU] 24206: The firmware update is expected to occur on 2025-05-30 01:37:00.
May 16 01:37:07 [MerlinAU] 24206: Required RAM: 96106 KB - RAM Free: 121544 KB - RAM Available: 431072 KB
May 16 01:37:07 [MerlinAU] 24206: Backup Started (by BACKUPMON)
May 16 01:37:09 A1MeshBoss: BACKUPMON INFO: Finished backing up JFFS to /tmp/mnt/backups/Storage/Network_Backup/router/BackupMon/GT-AX6000-Backup/20250516-013708/jffs.tar.gz
May 16 01:37:10 A1MeshBoss: BACKUPMON INFO: Finished backing up NVRAM to /tmp/mnt/backups/Storage/Network_Backup/router/BackupMon/GT-AX6000-Backup/20250516-013708/nvram.cfg
May 16 01:37:38 A1MeshBoss: BACKUPMON INFO: Finished backing up EXT Drive in 28 sec to /tmp/mnt/backups/Storage/Network_Backup/router/BackupMon/GT-AX6000-Backup/20250516-013708/Entware.tar.gz
May 16 01:38:02 [MerlinAU] 24206: Backup Finished
May 16 01:38:02 [MerlinAU] 24206: Backup Completed Successfully
May 16 01:38:02 [MerlinAU] 24206: Latest release version is 3006.102.4.0.
May 16 01:38:02 rc_service: service 27923:notify_rc restart_leds
May 16 01:38:02 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:02 [MerlinAU] 24206: Downloading https://sourceforge.net/projects/asuswrt-merlin/files/GT-AX6000/Release/GT-AX6000_3006_102.4_0.zip
May 16 01:38:04 rc_service: service 28243:notify_rc restart_leds
May 16 01:38:04 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:05 [MerlinAU] 24206: Required RAM: 96106 KB - RAM Free: 56268 KB - RAM Available: 430484 KB
May 16 01:38:05 [MerlinAU] 24206: -----------------------------------------------------------
May 16 01:38:05 [MerlinAU] 24206: Archive:  /tmp/mnt/Entware/MerlinAU.d/GT-AX6000_firmware/GT-AX6000_firmware.zip
May 16 01:38:05 [MerlinAU] 24206:   Length      Date    Time    Name
May 16 01:38:05 [MerlinAU] 24206: ---------  ---------- -----   ----
May 16 01:38:05 [MerlinAU] 24206:  69408012  05-10-2025 12:34   GT-AX6000_3006_102.4_0_nand_squashfs.pkgtb
May 16 01:38:05 [MerlinAU] 24206:      9622  05-10-2025 11:50   README-merlin.txt
May 16 01:38:05 [MerlinAU] 24206:     11489  05-10-2025 12:34   Changelog-3006.txt
May 16 01:38:05 [MerlinAU] 24206:       109  05-10-2025 12:34   sha256sum.sha256
May 16 01:38:05 [MerlinAU] 24206:  --------                     -------
May 16 01:38:05 [MerlinAU] 24206:  69429232                     4 files
May 16 01:38:05 [MerlinAU] 24206: -----------------------------------------------------------
May 16 01:38:06 rc_service: service 28591:notify_rc restart_leds
May 16 01:38:06 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:08 rc_service: service 28905:notify_rc restart_leds
May 16 01:38:08 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:08 [MerlinAU] 24206: Archive:  /tmp/mnt/Entware/MerlinAU.d/GT-AX6000_firmware/GT-AX6000_firmware.zip
May 16 01:38:08 [MerlinAU] 24206:   inflating: GT-AX6000_3006_102.4_0_nand_squashfs.pkgtb
May 16 01:38:08 [MerlinAU] 24206:   inflating: Changelog-3006.txt
May 16 01:38:08 [MerlinAU] 24206:   inflating: sha256sum.sha256
May 16 01:38:08 [MerlinAU] 24206: -----------------------------------------------------------
May 16 01:38:08 [MerlinAU] 24206: Required RAM: 96106 KB - RAM Free: 34420 KB - RAM Available: 361212 KB
May 16 01:38:08 [MerlinAU] 24206: Current version NOT found in changelog file. Bypassing changelog verification for this run.
May 16 01:38:08 [MerlinAU] 24206: Required RAM: 96106 KB - RAM Free: 34784 KB - RAM Available: 362484 KB
May 16 01:38:09 [MerlinAU] 24206: SHA256 signature check for firmware image file passed successfully.
May 16 01:38:09 [MerlinAU] 24206: Required RAM: 96106 KB - RAM Free: 34116 KB - RAM Available: 361488 KB
May 16 01:38:09 [MerlinAU] 24206: Router Web URL is: http://[redacted]
May 16 01:38:09 rc_service: service 29359:notify_rc restart_httpd
May 16 01:38:09 custom_script: Running /jffs/scripts/service-event (args: restart httpd)
May 16 01:38:09 GT-AX6000: start https:443
May 16 01:38:09 GT-AX6000: start httpd:80
May 16 01:38:09 httpd: Succeed to init SSL certificate...443
May 16 01:38:10 rc_service: service 29457:notify_rc restart_leds
May 16 01:38:10 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:12 rc_service: service 29769:notify_rc restart_leds
May 16 01:38:12 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:14 rc_service: service 30030:notify_rc restart_leds
May 16 01:38:14 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:16 rc_service: service 30317:notify_rc restart_leds
May 16 01:38:16 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:18 [MerlinAU] 24206: The email notification was sent successfully [START_FW_UPDATE_STATUS].
May 16 01:38:18 rc_service: service 30529:notify_rc restart_leds
May 16 01:38:18 custom_script: Running /jffs/scripts/service-event (args: restart leds)
May 16 01:38:20 [MerlinAU] 24206: Searching for Entware services to stop...
May 16 01:38:20 [MerlinAU] 24206: Stopping Entware services...
May 16 01:38:20 [MerlinAU] 24206: -----------------------------------------------------------
May 16 01:38:20 [MerlinAU] 24206: /opt/etc/init.d/S33vnstat
May 16 01:38:20 [MerlinAU] 24206: /opt/etc/init.d/S77ntpd
May 16 01:38:20 [MerlinAU] 24206: /opt/etc/init.d/S77chronyd
May 16 01:38:20 [MerlinAU] 24206: -----------------------------------------------------------
May 16 01:38:20 vnstatd[2662]: SIGTERM received, exiting.
May 16 01:38:26 [MerlinAU] 24206: ---------------------------------------------------------------
May 16 01:38:26 [MerlinAU] 24206: Cron job #1: [30 2 * * * sh /jffs/scripts/backupmon.sh -backup #RunBackupMon#]
May 16 01:38:27 [MerlinAU] 24206: Cron job [RunBackupMon] was removed successfully.
May 16 01:38:27 [MerlinAU] 24206: Cron job #2: [0 8 * * * /bin/sh /jffs/addons/amtm/led_control.mod -on #amtm_LEDcontrol_on#]
May 16 01:38:28 [MerlinAU] 24206: Cron job [amtm_LEDcontrol_on] was removed successfully.
May 16 01:38:28 [MerlinAU] 24206: Cron job #3: [30 17 * * * /bin/sh /jffs/addons/amtm/led_control.mod -off #amtm_LEDcontrol_off#]
May 16 01:38:29 [MerlinAU] 24206: Cron job [amtm_LEDcontrol_off] was removed successfully.
May 16 01:38:29 [MerlinAU] 24206: Cron job #4: [*/5 * * * * /jffs/scripts/dn-vnstat generate #dn-vnstat_generate#]
May 16 01:38:30 [MerlinAU] 24206: Cron job [dn-vnstat_generate] was removed successfully.
May 16 01:38:30 [MerlinAU] 24206: Cron job #5: [59 23 * * * /jffs/scripts/dn-vnstat summary #dn-vnstat_summary#]
May 16 01:38:31 [MerlinAU] 24206: Cron job [dn-vnstat_summary] was removed successfully.
May 16 01:38:31 [MerlinAU] 24206: Cron job #6: [*/10 * * * * /jffs/scripts/ntpmerlin generate #ntpMerlin#]
May 16 01:38:32 [MerlinAU] 24206: Cron job [ntpMerlin] was removed successfully.
May 16 01:38:32 [MerlinAU] 24206: Cron job #7: [23 4 * * 3,0 /jffs/scripts/spdmerlin generate #spdMerlin#]
May 16 01:38:33 [MerlinAU] 24206: Cron job [spdMerlin] was removed successfully.
May 16 01:38:33 [MerlinAU] 24206: Cron job #8: [37 1 * * Fri sh /jffs/scripts/MerlinAU.sh run_now #MerlinAU_FWUpdate#]
May 16 01:38:34 [MerlinAU] 24206: Cron job [MerlinAU_FWUpdate] was removed successfully.
May 16 01:38:34 [MerlinAU] 24206: Cron jobs [8] from 3rd-party add-ons were found.
May 16 01:38:34 [MerlinAU] 24206: ---------------------------------------------------------------
May 16 01:38:49 [MerlinAU] 24206: Post-update email notification hook was added successfully to '/jffs/scripts/services-start' script.
May 16 01:38:49 [MerlinAU] 24206: Flashing GT-AX6000_3006_102.4_0_nand_squashfs.pkgtb... Please wait for reboot in about 4 minutes or less.
 
Here are logs...

Sorry I should of updated sooner; I've confirmed the problem in testing as found below even though I have a 7 day postpone set:

1747507444217.png


I've found the problem and testing the fix now; please stay tuned for incoming PR with the fix soon. (Considering I'd say this is a fairly important feature that broke in one of recent updates.)
THANK YOU for being a user; and for reporting.

Just for piece of mind, I went back through these remaining "returns" for the update process, and confirmed the rest are okay, we must just of missed this exit code at some point.

Since I got everything working on the new firmware I might try that. Or maybe switch to AMTM notifications, as long as that handles firmware updates.

I was thinking just install it along side; that's what I do. You install "em" from AMTM for email notifications; you install "sc" for "Script Update Notifications"
That will notify you when there is a MerlinAU update without actually updating the script; MerlinAU itself will continue to notify you for actual firmware updates.

Otherwise if you enable the auto-updates for the script, then the AMTM script notifications should never notify for MerlinAU.
 
Actually sorry I just had a brain fart, why not just install AMTM script email notifications? That advises when there's script updates via email but doesn't auto update them.
Just to explain a little, I would like to know when there is an update (which I could use amtm for) but when it comes time to actually install the update, I REALLY like the MerlinAU approach, with all the checks and balances and backup.

I'm thinking of something like a setting that would put updates on hold indefinitely until I manually "Approve" each update.
 
I believe that I found a bug with the Script Update Check function from the web UI. The Install script update flag was not checked, but the script updated from v1.4.5 to v1.4.6 when checking for an update.
 
I believe that I found a bug with the Script Update Check function from the web UI. The Install script update flag was not checked, but the script updated from v1.4.5 to v1.4.6 when checking for an update.

Hey @visortgw

It's actually not a bug but the intended design when you have auto updates enabled, it will update when you hit that button as that's always the first thing it does when the script starts.

But for the next update we can gray out the checkbox if auto updates is enabled to make that more clear
 
Hey @visortgw

It's actually not a bug but the intended design when you have auto updates enabled, it will update when you hit that button as that's always the first thing it does when the script starts.

But for the next update we can gray out the checkbox if auto updates is enabled to make that more clear
Sorry, I missed that memo. Its all good!
 
Last edited:

Latest 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!
Back
Top