What's new

Email notification when switching to secondary WAN?

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

Native watchdog and ping to internet is not working for me at all on latest betas. My router is not switching to secondary wan when primary is down because of weather and other problems. Tried lots of times - nothing happends.
I badly need proper script for dual wan switching. So i am waiting for any news on this very much.
Sadly, this is entirely an Asus problem and really only can be fixed by them.

I doubt that even a better shell script coder than I am can outmanouver the wanduck and other services and hack together a script that works better than what the Taiwanese cobbled together to make this unreliable mess.

@john9527 has put his mind to it recently and I thank him for his efforts, but I see no difference in behaviour.
Dual WAN works best if the wire is pulled from the off-internet device. Then the router is faced with a simple decision.
Wanduck probing, recently introduced by Asus is a joke. What good is probing the microsoft.com server every two seconds if it does not put in motion the right procedure to switch over when probing fails?

Still, I like my routers and they work very well and I am in the comfortable position to have extremely reliable providers here. Internet uptime for both ISP's is very close to 100%.
 
Well.. it' kinda strange. Flashed recent beta. Router tries to switch to secondary wan and sometimes manages. But i don't get email notification about secondary wan from your script because it thinks it is that double-notification you fixed in recent version of the script. I think recent beta handles this information in a different way - thats why i get notofications only about primary wan even when router tries to switch to secondary and sometimes manages.
IMG_2007.PNG
 
I will come back to this script as soon as the next version of AB-Solution is released.
I have ro concentrate on these scripts while I'm working on them, they are a bit complex...
 
I will come back to this script as soon as the next version of AB-Solution is released.
I have ro concentrate on these scripts while I'm working on them, they are a bit complex...
Оk thank you very much. At least dual wan started working for me on latest beta. Didn't flash to final release yet - hope it is ok as well. Saying OK i mean that it switches to secondary via watchdog and then switches back to primary after timeout passes even if primary is down. If i set timeout to 15 minutes - it is almost usable - 15 minutes of secondary with 15 sec break and again 15 min secondary. fkn Asus!!
But when switching to secondary - i don't get notification from your script because it thinks that it is dual notification.
 
While coding on my monster shell script, I had an Idea.
And since AB-Solution 3.9 is released now, I wanted to try it out.
It looks very promising from what I see. Maybe I have more time tomorrow to refine it.

But for now, my main router's WAN port is gone, ironically. A thunderstorm blew over and lighting hit very close by.
I just hope nothing else is damaged.
 
I have started from scratch and made a new thread with a beta version:
Dual WAN helper
 
Hi community. I got a quick question. I used to use the email notification script listed here:

https://github.com/RMerl/asuswrt-merlin/wiki/Sending-Email

Specifically, the one for using google with openssl. This has worked flawlessly for years.

I wanted to try this script instead. I am running the latest with all the defaults except my gmail login information. I tried rebooting and did not get an email, so I tried to run wan_connect_notification manually and it fails with:

curl: (67) Login denied

Here is the section in the script calling curl:

Send with curl
curl --url $SMTP_ENCRYPT://$SMTP:$PORT \
--mail-from "$FROM_ADDRESS" --mail-rcpt "$TO_ADDRESS" \
--upload-file /tmp/wanmail.txt \
--ssl-reqd \
--user "$USERNAME:$PASSWORD" --insecure

Any ideas what could be causing this? In the old script I used a certificate plus port 587 was used. This script used port 465 and no certificate. Could that be why the curl portion of this script is failing?

Thanks in advance.
 
Hi community. I got a quick question. I used to use the email notification script listed here:

https://github.com/RMerl/asuswrt-merlin/wiki/Sending-Email

Specifically, the one for using google with openssl. This has worked flawlessly for years.

I wanted to try this script instead. I am running the latest with all the defaults except my gmail login information. I tried rebooting and did not get an email, so I tried to run wan_connect_notification manually and it fails with:

curl: (67) Login denied

Here is the section in the script calling curl:

Send with curl
curl --url $SMTP_ENCRYPT://$SMTP:$PORT \
--mail-from "$FROM_ADDRESS" --mail-rcpt "$TO_ADDRESS" \
--upload-file /tmp/wanmail.txt \
--ssl-reqd \
--user "$USERNAME:$PASSWORD" --insecure

Any ideas what could be causing this? In the old script I used a certificate plus port 587 was used. This script used port 465 and no certificate. Could that be why the curl portion of this script is failing?

Thanks in advance.

I changed the SMTP_ENCRYPT and smtp variables to support tls and it worked for anyone interested.
 
I changed the SMTP_ENCRYPT and smtp variables to support tls and it worked for anyone interested.
Could you please share how the new script looks like?
Thanks!
 
Running 1.7 of this script. While manual execution works fine whenever I reboot I don't get an email. Here are the settings that I think are related to this based on what has been discussed in this thread:

NTP_TIMEOUT=15
PING_COUNT=50
PING_TIMEOUT=4

I am on a 68U with the very latest Merlin firmware.

Any ideas why this could be happening? Do I need to tweak these or other settings?

Unfortunately, my syslog wraps very quickly (using Skynet) so that does not yield any clues.
 
Apologies to bump this post, but just wondering if anyone using this script have issues with it not triggering on reboot? Would love to see settings for those that have it working on reboot. I am on a 68u with the latest Merlin if that matters. Thanks in advance.
 
Hi @thelonelycoder , I've come across this thread and is exactly what I'm trying to do. Where can I find this script ? I couldnt find the other script section on the Diversion site? Thanks

Asus router with Asuswrt-Merlin
 

Similar threads

Sign Up For SNBForums Daily Digest

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