Created
October 10, 2024 15:18
-
-
Save chrisboyle/c2c14b13f5da47fa58972a122d7b6669 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
from pyvelop.mesh import Mesh | |
async def setEnabled(mesh, enabled): | |
await mesh._async_make_request(action="http://linksys.com/jnap/routerupnp/SetUPnPSettings", payload={"isUPnPEnabled": enabled,"canUsersConfigure": False, "canUsersDisableWANAccess": False}) | |
async def main(): | |
async with Mesh(node="192.168.1.1", password="INSERT_PASSWORD_HERE") as mesh: | |
#await mesh.async_gather_details() | |
#print(mesh.nodes) | |
await setEnabled(mesh, False) | |
await setEnabled(mesh, True) | |
if __name__ == "__main__": | |
loop = asyncio.get_event_loop() | |
loop.run_until_complete(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment