Coder Social home page Coder Social logo

speedport-api's Introduction

This python package is unofficial and is not related in any way to Telekom. It was developed by reversed engineered http requests and can stop working at anytime!

Speedport-API

PyPI - Status PyPI PyPI - Python Version PyPI - License PyPI - Downloads
Control Telekom Speedport routers with Python!

⚠️ Use v0.4.x for cmd interface ⚠️

I'm developing a Speedport Home Assistant integration, currently this breaks the cmd interface functionality. I will fix this soon!

Installation

pip install speedport-api

Supported Devices

  • Speedport Smart 4

Commandline tool

With this shipped commandline tool can a speedport in your network be controlled.

Turn wifi off

$ speedport wifi off
Turn off wifi...

Turn guest wifi on

$ speedport guest-wifi on
Turn on guest wifi...

Reconnect for new ip address

$ speedport reconnect
123.45.67.89 / 5403:f3:35aa:12f:7287:41cf:fb1c:3c83
Reconnect with internet provider...
123.45.67.12 / 5403:f3:35fe:12f:7287:41cf:fb1c:3c83

Enable wps connect

$ speedport wps
Enable wps connect...
wps connect enabled for 113s...

Reboot device

$ speedport reboot
Reboot speedport...

Print devices

$ speedport devices
+-------------+---------------------+-------+-----------+
| ipv4        | name                | type  | connected |
+-------------+---------------------+-------+-----------+
| 10.5.12.32  | Google-Home-Mini-1  | wlan  | 1         |
| 10.5.12.157 | PC10-5-12-157       | lan   | 0         |
| 10.5.12.227 | andre-xps           | wlan5 | 1         |

Library

Reconnect example

import asyncio
from speedport import Speedport

async def reconnect():
    speedport =  Speedport("192.168.1.1")
    await speedport.login("password123")
    await speedport.reconnect()

asyncio.run(reconnect())

Devices example

import asyncio
from speedport import Speedport

devices = asyncio.run(Speedport().devices)
for device in devices:
    print(device.ipv4, device.connected)

speedport-api's People

Contributors

andre0512 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.