Giter Club home page Giter Club logo

smartfritz's Introduction

smartfritz

Node module to communicate with a AVM FritzBox and FRITZ!DECT 200 (smart home hardware) providing the following functions:

  • Get the session ID (getSessionID)
  • Get the switch (FRITZ!DECT 200) State (getSwitchState)
  • Set the switch (FRITZ!DECT 200) ON (setSwitchOn)
  • Set the switch (FRITZ!DECT 200) OFF (setSwitchOff)
  • Get the switch (FRITZ!DECT 200) Power (getSwitchPower)
  • Get the switch (FRITZ!DECT 200) Energy (getSwitchEnergy)
  • Get the switch (FRITZ!DECT 200) List (getSwitchList)
  • Get the DeviceListInfos (FRITZ!DECT 200) as XML (getDeviceListInfos) >FritzOS 6.10
  • Set the guest wlan (setGuestWLan)
  • Get the guest wlan settings (getGuestWLan)

All functions have been tested on FritzOS 6.20 / FritzBox 7390. The WLAN functions may be less stable.

For AVM FRITZ!DECT 200 control you need to know your Actuator identification number (AIN)

Install

npm install smartfritz-promise

How to use

Get the session ID default: as URL "fritz.box" is used as default paramter

var fritz = require('smartfritz-promise');

fritz.getSessionID("user", "password").then(function(sid) {
    console.log(sid);
});

Get the session ID with own URL: use your Fritz!Box IP when "fritz.box" is not working.

var moreParam = { url:"192.168.178.1" };
fritz.getSessionID("user", "password", moreParam).then(function(sid) {
    console.log(sid);
});

Get the Switch AID List:

fritz.getSessionID("user", "password").then(function(sid) {
  console.log(sid);

  fritz.getSwitchList(sid).then(function(ains){
    console.log("Switches AINs: "+ains);
  });
});

AHA-HTTP Interface

AHA - AVM Home Interface

https://fritz.box/webservices/homeautoswitch.lua?ain=&switchcmd=&sid=

AHA-HTTP-Interface document http://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf

Thanks to // Code base from:

  • nischelwitzer for the basic js implementation (https://github.com/nischelwitzer/smartfritz)
  • steffen.timm for the basic communication function
  • thk4711 for the FRITZ!DECT 200 codes
  • AVM for providing the good AHA-HTTP interface document

smartfritz's People

Contributors

andig avatar nischelwitzer avatar

Watchers

James Cloos avatar Marcus Wittig 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.