JGrana
Very Senior Member
Before I'm flamed for this post - let me explain. Also, long post. If you don't know MS Powershell - stop here and go to the next thread.
I moved to an area of California that has "so-so" internet access. Like 10Mbit DSL and Hughesnet. I tried DSL - no-go. But T-Mobile has reasonable LTE and a little 5G in my area. So, I am using a Sagemcom T-Mobile Gateway. Most of the time I get 120+Mbits. But, at times like early morning, a little while in the evening - the speeds either degrade to less than 15Mbit or the Gateway goes offline and wants a power cycle.
The reason for posting here? By using Asuswrt-merlin I'm able to use spdMerlin (with a little added code) and a separate ping script to monitor speed/off-line and power cycle the Gateway with a Smart Plug (TP-Link) using a script I ported (github hs100.sh).
It bothers the engineer in me that I power cycle this Gateway 2-4 times a day. I need a way to issue a "reboot" command to the Gateway - in a script.
The best I could find was a PowerShell script that should/might work.
The problem is that I can grok Linux, bash and even curl - but this PowerShell stuff is over my head.
Googling PowerShell to curl resulted in little help...Lots of Linux curl to PowerShell (sadly).
So - anyone that knows how to migrate a PowerShell script to Linux/bash/curl (or even wget), PM me.
I moved to an area of California that has "so-so" internet access. Like 10Mbit DSL and Hughesnet. I tried DSL - no-go. But T-Mobile has reasonable LTE and a little 5G in my area. So, I am using a Sagemcom T-Mobile Gateway. Most of the time I get 120+Mbits. But, at times like early morning, a little while in the evening - the speeds either degrade to less than 15Mbit or the Gateway goes offline and wants a power cycle.
The reason for posting here? By using Asuswrt-merlin I'm able to use spdMerlin (with a little added code) and a separate ping script to monitor speed/off-line and power cycle the Gateway with a Smart Plug (TP-Link) using a script I ported (github hs100.sh).
It bothers the engineer in me that I power cycle this Gateway 2-4 times a day. I need a way to issue a "reboot" command to the Gateway - in a script.
The best I could find was a PowerShell script that should/might work.
The problem is that I can grok Linux, bash and even curl - but this PowerShell stuff is over my head.
Googling PowerShell to curl resulted in little help...Lots of Linux curl to PowerShell (sadly).
So - anyone that knows how to migrate a PowerShell script to Linux/bash/curl (or even wget), PM me.