25-02-2024 03:55 PM
How do i automatically set my router to reset with timer please.
25-02-2024 07:12 PM
@Mikey1963 : Which router do you have?
What do you mean by "reset"? Turn itself off & on? Why would you want to do that? Switching routers on & off frequently is not a good idea.
25-02-2024 07:41 PM - edited 25-02-2024 07:42 PM
You could easily create a python script using something like Selenium that spins up a headless chrome browser which would navigate to the router page and restart it every x hours, but the question is why and what are you trying to accomplish by doing that?
25-02-2024 11:31 PM
25-02-2024 11:37 PM
Hi pal, to clear cache & stop the router from freezing/crashing because every now & then i have to switch it off & back on again to update.
Kindest regards
Mike...
26-02-2024 01:11 AM
I just wrote this in Python that will open the router page using Selenium 4, spin up a chrome browser and restart the router for you if you can get the script up and running on a task scheduler it should work just fine:
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
ROUTER_URL = "http://192.168.0.254/DashboardScreen"
ADMIN_PASSWORD = "enter-your-router-password"
service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service)
driver.get(ROUTER_URL)
# wait max 60 seconds for router page to be visible.
restart_hub_button = WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.ID, "RestartHub"))
)
restart_hub_button.click() # click on restart router button
# find input field for password in popup modal and enter the password
admin_pass = driver.find_element(By.ID,"pwd_field")
admin_pass.send_keys(ADMIN_PASSWORD)
time.sleep(1)
ok_button = driver.find_element(By.ID,"admin_password_popup_ok_button")
ok_button.click()
# on the next page wait until there is the 2nd restart button and click on in to restart the actual router
restart_hub_button2 = WebDriverWait(driver, 60).until(
EC.visibility_of_element_located((By.ID, "restart"))
)
restart_hub_button2.click()
time.sleep(60)
driver.close()
driver.quit()
27-02-2024 01:59 AM
Is the above script even targeting the right local IP for EE routers? Question stands: why are you wanting to do this? What router do you have and what problems are you suffering?
27-02-2024 01:54 PM - edited 27-02-2024 02:13 PM
I changed the default subnet on my router to end in 0.254 rather than the default 1.254
It's too late to edit that post now, so i'll just add the following:
ROUTER_URL = "http://192.168.0.254/DashboardScreen" # the default EE Hub Smart Hub router IP address is 192.168.1.254