Restart tmobile modem using Rest API

Hi,

I'd like to schedule nightly restarts of my tmobile 5g gateway. i've identified the rest API commands needed. I can port them over from powershell but am looking for a Restapi interface that can handle a sequence of commands. Any suggestions on how to build this? should I create an app or a device or is there a way to use Maker API?

Thank you in advance!

  1. $body = @"

  2. {

  3. "username": "admin",

  4. "password": "natertaterchannel.com"

  5. }

  6. "@

  1. $token = $reponse.auth.token
  • $header = @{Authorization="Bearer $token"}
  1. $response = Invoke-RestMethod -Method POST -Uri "http://192.168.12.1/TMI/v1/gateway/reset?set=reboot" -headers $header

  2. $response

1 Like

I do not.

Might be easier to schedule a power cut and restore. I expect the gateway is engineered to survive it.

nightly reboot seems like overkill. Why not on demand? I guess you could lose remote access which is somewhat impaired by 5g TMHI anyway. Still I think a watchdog app/routine, if it fails to ping for 20-40 minutes whatever, then cycle the gateway power, if it fails again, then try again in 1-2 hours.

I was very proud when I whipped this up in X10! about 20 minutes before I left for vacation, Comcast cablemodem? about 15 years ago. The Comcast neighborhood amp was bad or something, and we could read our worsening signal levels at the modem, and rebooting usually helped. All automatic... just read the logs about the problems later.

The gateway has a built in battery back up. I chose nightly to avoid interruption during the day that would impact VPNs. I suppose I could include both a watcher and a scheduled restart. either way will need to get around the integrated battery back up

I just unplug my Arcadyan KVD21, looks like a restart from the display, original client connection issue usually goes away. I would not have guessed that it has a battery.