Coder Social home page Coder Social logo

fritzbox-smarthome's People

Contributors

dermitch avatar jandechent avatar marukuru avatar mweimerskirch avatar pascalbru avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fritzbox-smarthome's Issues

Benutzung

Hi,

ist das tool schon nutzbar? wie bekomme ich es installiert? Über pip findet er entweder kein paket oder keine setup.py

Actor not found

Hallo

Irgendwie scheint bei den Schaltbefehlen was nicht richtig hinzuhauen. Wenn ich mir die Steckdosen anzeigen lasse werden diese zwar gefunden und auch der Energieverbrauch angezeigt,aber sobald ich die Steckdose schalten will bekomme ich immer "Actor not found: 087*********" ausgegeben.

Actors
(fritzenv) kodi@TV-Box:~$ fritzhome --password ****** actors

Steckdose Sat-Ip (AVM FRITZ!DECT 200; AIN 087** ********)

(fritzenv) kodi@TV-Box:~$

Schalten
(fritzenv) kodi@TV-Box:~$ fritzhome --password ******** switch-on 087*********
Actor not found: 087***********
(fritzenv) kodi@TV-Box:~$

UniCode utf8 problem

Hallo,

if the smarthome device "Fritz Dect 200" is named "Stromzähler-1" there will be an error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 187: ordinal not in range(128)

clearance: rename "Stromzähler-1" to "Stroemzaehler"

Danke fürs tool, gruß hp

Library nutzen um Aktoren zu schalten

Hallo,

ich würde gern mit dieser library meine Aktoren aus meinem Python script auf einem RaspberryPi zu schalten. Leider bin ich noch nicht so erfahren und finde gerade nicht heraus wie ich die nutzen kann.
Mein Gedanke war hier:
import fritzhome
FBox = fritzhome("192.168.178.1","SmartHome","SmartHome")
FBox.set_switch_on("880088008800")
bzw.
FBox.set_switch_off("880088008800")
Der Import geht noch, das andere nicht. Ich bin wie gesagt ganz neu in dem Thema. Daher war meine Vorstellung so, das man ein Objekt für die FritzBox erstellt und dann darüber den Aktor mit der AIM schaltet.
Gibt es sowas wie eine Anleitung wie ich die Befehle nutzen kann/muss?
Danke für die Hilfe.

Mario

Adding temperature readout

Dear Mitch,
is it easy to add a readout for temperature? This would be aweseome to monitor in addition to the power consumption.

Listing actors results in Internal Server Error Response

As the title says: Running the actors command results in a 500 Internal Sever Error Response when trying to get the temperature? Note that the temperature displays ok in the Webinterface. FritzOS is on version 7.20. Stacktrace:

> python -m fritzhome --host fritz.box --username xyz --password xyz actors
Keller (AVM FRITZ!DECT 200; AIN 11630 0205972 )
Temp: act 26 target 0.0; battery (low): True
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/stephan/projects/fritzbox-smarthome/fritzhome/__main__.py", line 242, in <module>
    cli()
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/stephan/projects/fritzbox-smarthome/fritzhome/__main__.py", line 61, in actors
    actor.get_target_temperature(),
  File "fritzhome/actor.py", line 130, in get_target_temperature
    value = self.box.homeautoswitch("gethkrtsoll", self.actor_id)
  File "fritzhome/fritz.py", line 137, in homeautoswitch
    response.raise_for_status()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://fritz.box/webservices/homeautoswitch.lua?ain=11630+0205972&switchcmd=gethkrtsoll&sid=af7f0e2f8b01cc6c

Exception if Actor Offline

2017-12-10 20_46_05-root lnx_ _fritzbox-smarthome

I have 2 Actors. One of them is sometimes offline.
When the Actor is offline, the Script returns the Error in the Screenshot..

README

"Unser macOS"
meinst du "unter macOS" ?

Martin
(Ich hoffe, dass ist der richtige Weg in GitHub. ich mache mich gerade erst vertraut damit)

get_present always returns True

I found that get_present() always returned True
An additional cast too int() in the current implementation fixed my issue:

def get_present(self):
    """
    Check if the registered actor is currently present (reachable).
    """      
    return bool(
        int (
            self.box.homeautoswitch("getswitchpresent", self.actor_id)
        )
    )

This method is also used in get_state.

Update of PyPi Package

The current package on PyPi unfortunately does not install on Raspbian GNU/Linux 8 (jessie) with Python 3:

$ pip3 install fritzhome
Collecting fritzhome
  Using cached fritzhome-1.0.0b1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-_w7yyo_n/fritzhome/setup.py", line 9, in <module>
        with open(path.join(here, "README.md"), encoding="utf-8") as f:
      File "/usr/lib/python3.4/codecs.py", line 896, in open
        file = builtins.open(filename, mode, buffering)
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-_w7yyo_n/fritzhome/README.md'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_w7yyo_n/fritzhome/

The latest code on Github installs without a problem. Could you please update the package?

Background: I am working on a component for https://home-assistant.io based on your library. I want to automate the installation of the dependency and hence need the fixed package.

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.