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!

scMerlin scMerlin 2.5.41 - Service and script control menu for Asuswrt-Merlin

Wow!
I'm shocked how much time, effort, collaboration, and testing it took to get the WAN Uptime feature working perfectly now!
I did see the feature when it got implemented back then, but to my bad, I never had time to test it since then. Anyhow, great work everybody, I'm jealous now!

Now, I guess this is the last bit missing in the WAN Uptime feature, like a cake topping...
Recently, when I tried Dual WAN in load-balance mode for the very first time following my recent home network setup change, I found out that when both wan0 and wan1 are connected simultaneously, you get only one WAN reported with this feature (not sure which one exactly in different connection scenarios).

How about this last feature upgrade?

Can you confirm your output for this while in Load Balance mode?

Code:
nvram get wans_mode

Sorry as I don't have anything in Load-Balancing to test this myself.
 
Yeah, sure buddy! Here's the result:

Code:
# nvram get wans_mode
lb

I'll have something for you to test in half an hour or so in the development branch. Stand by as I tune it a bit more.
 
Thanks! I'll be available for more than this timeframe
 
Thanks! I'll be available for more than this timeframe

Hi @Tarek Yag

I'm ready for you to test, keep in mind I don't have a setup to test this with, if can you please give it a try and share your results and feedback (ideally screenshots if possible)

Run:
Code:
sh /jffs/scripts/scmerlin develop

Thanks!
 
Testing to ensure it's still working for those not using dual WAN (because I can).
1000020930.png
 
Testing to ensure it's still working for those not using dual WAN (because I can).
View attachment 67751

Trust me I have zero issues with the additional testing! Much appreciated actually!

The goal is never to cause any regression issues. However Martinski has proven to me on many occasions in his code reviews, it's easier to be caught off guard than you might expect!
 
if can you please give it a try and share your results and feedback (ideally screenshots if possible)
Yeah that's for sure! All screenshots attached...

1. Just tested it immediately after update, it produced the expected output
2. Unplugged my WAN1 cable to reset the timer and check if output updates correctly, it did show (wan0) only, great!
3. Plugged-in my WAN1 cable again, (wan1) showed up again in the output with 0 minutes, great!

Note 1:
Do you agree with me that it would be cosmetically better to show each WAN status in a separate line instead of seperating both with a " | " sign?
Note 2:
Would you please correct the capitalization of "WAN uptime" in the Web GUI to match the CLI (WAN Uptime)?

Thanks a lot!
 

Attachments

  • 2025-09-04_08-57-38.png
    2025-09-04_08-57-38.png
    27.8 KB · Views: 14
  • 2025-09-04_08-58-00.png
    2025-09-04_08-58-00.png
    28.5 KB · Views: 12
  • 2025-09-04_09-01-02.png
    2025-09-04_09-01-02.png
    23 KB · Views: 13
  • 2025-09-04_09-01-25.png
    2025-09-04_09-01-25.png
    27 KB · Views: 12
  • 2025-09-04_09-03-42.png
    2025-09-04_09-03-42.png
    27.6 KB · Views: 16
As a forum post limitation, I wasn't able to upload the fifth and last attachment, so here it is...
 

Attachments

  • 2025-09-04_09-04-16.png
    2025-09-04_09-04-16.png
    28.4 KB · Views: 14
Yeah that's for sure! All screenshots attached...

1. Just tested it immediately after update, it produced the expected output
2. Unplugged my WAN1 cable to reset the timer and check if output updates correctly, it did show (wan0) only, great!
3. Plugged-in my WAN1 cable again, (wan1) showed up again in the output with 0 minutes, great!

Note 1:
Do you agree with me that it would be cosmetically better to show each WAN status in a separate line instead of seperating both with a " | " sign?
Note 2:
Would you please correct the capitalization of "WAN uptime" in the Web GUI to match the CLI (WAN Uptime)?

Thanks a lot!

I do agree.

Looking at my implemented code now, it's pretty clear that its better to have it on its own separate lines. (Both in SSH and on the webUI page)

I'll start poking at that this evening after work. I'm just happy to see the "nuts and bolts" logic is working behind the scenes.

Tidying up the rest up should be a fairly easy task 😉
 
@Tarek Yag

Please try again after running:

Code:
sh /jffs/scripts/scmerlin develop

As always I would appreciate your detailed documentation along with screenshots if anything appears out of place.
It should now appear like this in the WebUI:

Snag_1bcf16e0.png


This addresses your two reports:
1. Show each interface on it's own row
2. Fix capitalization on the interface rows

I cannot grab a screenshot of how it will display in SSH as I don't have Dual-WAN, but it should also display over two lines now.
Thanks!
 
Please try again after running
I started some experimenting with your code just a few minutes after you posted this reply.

As always I would appreciate your detailed documentation along with screenshots
I'm glad you like my detailed feedback!

It should now appear like this in the WebUI:
Unfortunately, your latest update totally messed up the display at the GUI, you need to make another change to get it to work correctly.
But first please take a look and maybe adopt the suggested CLI look that I made (copied from within the script).
Screenshots for the resulting GUI change and my suggested vs the recent CLI looks are attached.

I cannot grab a screenshot of how it will display in SSH as I don't have Dual-WAN, but it should also display over two lines now.
This was the very first thing I experimented with, then found out that it is actually what is sent to the Webpage later.
 

Attachments

  • 2025-09-05_06-48-21.png
    2025-09-05_06-48-21.png
    37.5 KB · Views: 10
  • 2025-09-05_06-50-53.png
    2025-09-05_06-50-53.png
    30.6 KB · Views: 10
  • 2025-09-05_06-53-32.png
    2025-09-05_06-53-32.png
    31 KB · Views: 16
Last edited:
Hi @Tarek Yag

Thanks for the feedback and the DM message with some look and feel changes for the SSH / CLI view.
I feel obligated to re-enforce the fact that I am running blind on 2 counts.

1. One is that I simply do not have the means to setup a Dual WAN on my end...
2. Your running an older AC router which does not have the regular wan1_uptime nvram values populated like our newer BE routers. As you already mentioned here:
This was the very first thing I experimented with, then found out that it is actually what is sent to the Webpage later.
This is actually the fallback method for the older AC/AX routers since they miss the nvram values and we instead output to /www/ext/scmerlin/wanuptime.js
I happen to know this as I'm the one that originally wrote that fallback method when testing the original solution (which Martinski then cleaned up)

This means it's hard for me to troubleshoot without logs or screenshots and I'm running blind without the setup to test.
All this to say I do appreciate the screenshots and feedback whenever you can provide them, but to please bare with me as this feature is developed in real time.

Let me know how it works after the latest tweaks I've made to correctly split the data up in the AJAX fallback method.
Code:
sh /jffs/scripts/scmerlin develop
 
Last edited:
I feel obligated to re-enforce the fact that I am running blind on 2 counts.
No worries, you did great! And thanks for taking the explanation to public.

All this to say I do appreciate the screenshots and feedback whenever you can provide them, but to please bare with me as this feature is developed in real time.
Anytime! I love good collaboration in a real teamwork.

I just finished testing from scratch (Single WAN 0 and 1 connected sequentially, and Dual WAN connected simultanuously). Everything is working fine and displaying nicely both in CLI and GUI. Great work! Here's your screenshots from the latest "develop" branch update.
 

Attachments

  • 2025-09-05_09-22-44.png
    2025-09-05_09-22-44.png
    71.6 KB · Views: 13
  • 2025-09-05_09-23-00.png
    2025-09-05_09-23-00.png
    30 KB · Views: 12

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