Coder Social home page Coder Social logo

fritzbox-smarthome's Introduction

fritzbox-smarthome

(DE) Bitte beachten: Diese Bibliothek wird nicht aktiv vom Autor weiterentwickelt, Pull Requests werden jedoch geprüft und eingepflegt.

(EN) Please note: This library is not in active development by the author, yet pull requests are reviewed and merged.

Python-Bibliothek um FRITZ!Box SmartHome-Geräte (DECT 200, PowerLine 546E, ...) zu steuern und die Energiewerte auszulesen.

Getestet mit:

  • FRITZ!Box 7390 (Firmware 06.23, 06.50+)
  • FRITZ!DECT 200
  • FRITZ!Powerline 546E

Installation

Es ist empfehlenswert, ein eigenes virtualenv zur Verwendung anzulegen. Unter macOS kann dieses Tool vorher mit brew install virtualenv installiert werden, unter Linux-Systemen hängt dies von der Distribution ab. Windows wird nicht offiziell unterstützt.

virtualenv ~/fritzenv
. ~/fritzenv/bin/activate
git clone https://github.com/DerMitch/fritzbox-smarthome.git
cd fritzbox-smarthome
pip install .

Hinweis: Das PyPi-Paket fritzhome wird nur selten aktualisiert, daher ist die Verwendung des git-Masters zu bevorzugen.

SmartHome-Benutzer

Aus Sicherheisgründen ist es empfehlenswert, einen eigenen Benutzer zum SmartHome-Zugriff zu verwenden. Dazu in der FRITZ!Box:

  1. Die Benutzer-basierte Anmeldung aktivieren (unter "System" -> "FRITZ!Box Benutzer")
  2. Und einen neuen Benutzer Benutzer "smarthome" erstellen. Dieser braucht nur Rechte auf den Bereich "Smart Home".

Verwendung

Beispiele zur Verwendung der API befindet sich in der Datei __main__.py.

Nach der Installation steht das fritzhome Tool zur Verfügung, mit dem die Energiedaten auf der CLI angezeigt und nach Graphite exportiert werden können.

Befehle:

$ fritzhome [--server fritz.box] energy

PowerEingang (087600000000): 35.76 Watt current, 91.500 wH total
SmartHome Wohnzimmer (24:65:11:00:00:00): 56.21 Watt current, 1122.840 wH total
$ fritzhome [--server fritz.box] [switch-on|switch-off] 24:65:11:00:00:00
Switching SmartHome Wohnzimmer on
$ fritzhome [--server ip] graphite localhost [--port 2003] [--interval 10] [--prefix smarthome]

Aufruf außerhalb des virtualenv

Das fritzhome kann mit Hilfe seines absoluten Pfades innerhalb des virtualenv ausgeführt werden:

~/fritzenv/bin/fritzhome --help

Referenzen

fritzbox-smarthome's People

Contributors

dermitch avatar jandechent avatar marukuru avatar mweimerskirch avatar pascalbru 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.