Coder Social home page Coder Social logo

pydect200's Introduction

PyDect200

Build Status pylint Score Download format Downloads License Latest Version

Control the Fritz-AVM DECT200 (switch a electric socket) and Fritz-AVM PowerLine 546E

Install

pip install PyDect200

Demo

Demo (Github Style)

curl https://raw.githubusercontent.com/mperlet/PyDect200/master/Example/PyDect200_Demo.py | python

Demo (git clone)

git clone [email protected]:mperlet/PyDect200.git

./PyDect200/Example/PyDect200_Demo.py

Example Code

from PyDect200 import PyDect200
f = PyDect200('fitzbox_password')
# or with username PyDect200('fritzbox_password', username='fritzbox_username')

f.get_device_names()
# {'16': 'Beleuchtung', '17': 'Fernseher'}

f.get_info()
# {u'16': u'0', u'17': u'0'}

f.switch_onoff(16,1)
#		{u'DeviceID': u'16',
#		 u'RequestResult': u'1',
#		 u'Value': u'0',
#		 u'ValueToSet': u'1'}

f.get_power()
# {u'16': 68.95, u'17': 0.0}

Tested with

  • Python2.7 / Python3.4
  • Fritzbox 7270
  • FRITZ!OS: 06.05
  • AVM Dect200

  • Python2.7
  • Fritzbox 7490
  • FRITZ!OS: 6.36 Labor
  • Dect200
  • PowerLine 546E

pydect200's People

Contributors

lbenedix avatar mperlet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pydect200's Issues

Groups are not handled correctly

Group Hue is a group with one device in it namely FRITZ!DECT 200 #1

Device ID:           DB:55:D2-900
Device Name:         Hue
Device State:        ON
Device Power:        HTTP/1.0 500 Internal Server ErrorContent-Length: 0Content-Type: text/plain; charset=utf-8W
Device Energy:       HTTP/1.0 500 Internal Server ErrorContent-Length: 0Content-Type: text/plain; charset=utf-8Wh
Device Temperature:  inval degree Celsius  

Device ID:           087610161956
Device Name:         FRITZ!DECT 200 #1
Device State:        ON
Device Power:        0.0W
Device Energy:       775Wh
Device Temperature:  inval degree Celsius  

help extarcting info

Hi, I need to use info like temperature or power usage outside your example.

Please, can you help me to assign all info extracted from PyDect200 to some variables tha can be used outside the cycle "or dev_id in info.keys():"?

I'm trying to assign it to a variable but I catch always "syntax error"...

Thanks

Error in retrieving temperature

Environment:

OS

ProductName:    Mac OS X
ProductVersion: 10.11.6

Python

Python 2.7.10

** FRITZ!OS **



FRITZ!Box Fon WLAN 7390

FRITZ!OS 06.52

Error description

Welcome to PyDect200 v0.0.14, the Python AVM-DECT200 API
Please insert your fritzbox-password: 
Thank you, please wait few seconds...

Device ID:           087610161956
Device Name:         FRITZ!DECT 200 #1
Device State:        ON
Device Power:        0.42W
Device Energy:       772Wh
Device Temperature:  inval degree Celsius  

PyDect200 seems to be broken with Fritz OS7

Hi!

On my recently updated fritz box devices are not found:

f = PyDect200('password')
f.get_device_names()

Expected result: devices dict.
Actual Result:

{u'inval':u'inval'}

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.