Socket
Socket
Sign inDemoInstall

iobroker.fritzdect

Package Overview
Dependencies
23
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    iobroker.fritzdect

ioBroker fritzbox DECT Adapter


Version published
Weekly downloads
309
increased by5.46%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

Logo

ioBroker.fritzdect

NPM version Downloads Number of Installations (latest) Number of Installations (stable) Known Vulnerabilities

Tests: Test and Release

Fritzbox DECT adapter for ioBroker

Installation:

released version on npm with

 npm install iobroker.fritzdect

or the actual version from github with

npm install https://github.com/foxthefox/ioBroker.fritzdect/tarball/master --production

Setup

IP-address and password of Fritzbox should be defined via admin page, before the first start of the instance. The IP-address must be written with leading 'http://'

The devices are detected automatically during startup of fritzdect instance. If devices are added to the fritzbox during a running adapter instance, then please restart the adapter for object creation.

Several permissions have to be set in the fritzbox in order to interact with the adapter!

A german explanatory doc is available here: install_de

The widget requires that also vis-metro and vis-jqui-mfd are installed

Common Issues / Frequently Asked Questions

  1. Fritzbox returned '00000000' no login possible. possible reasons:

    The fritzbox allows only a limited number of logins in a timeframe. There are no appropriate user rights set in the fritzbox. There is a time elapsing in the fritzbox blocking the logins. A german doc is available here: troubleshooting

  2. using https would result in:

      { error: { [Error: self signed certificate] code: 'DEPTH_ZERO_SELF_SIGNED_CERT' }
    

    to overcome this, the option "rejectUnauthorized: false" is used in the https.request.

Thermostat

Fritzbox AHA API

The API of fritzbox has the following access:

  • sethkrtsoll
    • 8-28°C for automatic control
    • greater 28°C (254=ON)
    • greater 28°C (253=OFF)

These settings are covered by the hkrmode and the 3 buttons. The activation lasts as long there is no other command or programmed sequence.

Additionally there is the access to:

  • windowopenactiv
  • boostactive

These are indications as well as commands (sethkrwindowopen,sethkrboost) and when commanded they act with the provided time limit (max. 24h). For activation of boost/windowopen the following sequence applies:

  • set the activetime to the desired value in minutes
  • activate the activ (from false -> true)
  • the acteendtime changes to the target For deactivation of boost/windowopen the following sequence applies:
  • deactivate the activ (from true -> false)
  • the acteendtime changes to unixtime=0

fritzdect implementation

From the above API possibilities the thermostat has different modes in point of view of iobroker.adapter:

  • auto (temperature control), to be set by hkrmode (0) or button "setmodeauto" -> the tsoll value will be used!
  • night if tsoll = absenk
  • comfort if tsoll = komfort
  • on (full open), to be set by hkrmode (1) or button "setmodeon"
  • off (full close), to be set by hkrmode (2) or button "setmodeoff"
  • boost (full open for limited time), detected by feedback boostactive, can be set by boostactive (false->true)
  • windowopen (full closed for defined time), detected by feedback windowopenactiv, can be set be windowopenactiv (false->true)
  • holiday (temp control), detected by holidayactive
  • summer (temp control), detected by summeractive

ioBroker objects

objects in italic are not part of all fritz.box configurations objects in bold are datapoints from the adapter

The datapoints are created on the basis of the returned values of the Fritz AHA API. All groups or devices start wirth "DECT_".

devices or groups

ObjectValuesettableDescriptionDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
idtext-internal id of deviceDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
nametext-name of deviceDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
productnametext-product nameDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
manufacturertext-product manufacturerDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
fwversiontext-product FW versionDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
modetext-mode, manuell or autoDECT2x0DECT3x0
presentboolean-true/false -> connected/not availableDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
txbusyboolean-true/false -> cmd sending active/not activeDECT2x0DECT3x0DECT400DECT440DECT500BlindsContact
batterylowboolean-battery statusDECT3x0DECT400DECT440Contact
batterynumber-actual capacity in %DECT3x0DECT400DECT440Contact
stateboolean-/xtrue/falseDECT2x0DECT500BlindsContact
powernumber-actual power in WDECT2x0
energynumber-actual energy consumption in WhDECT2x0
voltagenumber-actual voltage in VDECT2x0
lockboolean-UI/API lockDECT2x0DECT3x0
devicelockboolean-Button lockDECT2x0DECT3x0
celsiusnumber-actual temperature in °CDECT2x0DECT3x0DECT440
offsetnumber-offset temperature in °CDECT2x0DECT3x0DECT440
rel_humiditynumber-relative humidity %DECT440
tistnumber-actual temperature in °CDECT3x0
tsollnumberxtarget temperature in °CDECT3x0
komfortnumber-comfort temperature in °CDECT3x0
absenknumber-night temperature in °CDECT3x0
hkrmodearrayx0=AUTO/1=OFF/2=ON state of thermostatDECT3x0
lasttargetnumber-last target temperature in °CDECT3x0
errorcodenumber-errorcodeDECT3x0
operationListnumber-list of possible modesDECT3x0
operationModenumber-actual modeDECT3x0
windowopenendtimetime-time when open window status endsDECT3x0
windowopenactivbooleanxstatus and cmd of window open detectionDECT3x0
windowopenactivtimenumberxtime (minutes) when activation of window openDECT3x0
boostactivebooleanxboost mode active status and cmdDECT3x0
boostactiveendtimetime-time when boost status endsDECT3x0
boostactivtimenumberxtime (minutes) when activation of boostDECT3x0
adaptiveHeatingRunningboolean-adaptive heating statusDECT3x0
adaptiveHeatingActivebooleanxadaptive heating cmdDECT3x0
setmodeautonumberxset AutoDECT3x0
setmodeonnumberxset OnDECT3x0
setmodeoffnumberxset OffDECT3x0
summeractiveboolean-summer program statusDECT3x0
holidayactiveboolean-holiday program statusDECT3x0
tchangenumber-temp with next change in °CDECT3x0
endperiodtime-time when next change is activeDECT3x0
supported_modesnumber-supported colormodesDECT500
fullcolorsupportboolean-fullcolorsupportDECT500
mappedboolean-indication mappedDECT500
unmapped_huenumber-unmapped hue valueDECT500
unmapped_saturationnumber-unmapped saturation valueDECT500
current_modenumber-actual colormodeDECT500
levelnumberxlevel 0-255DECT500Blinds
levelpercentagenumberxlevel 0-100 %DECT500Blinds
huenumberxcolor 0-359DECT500
saturationnumberxsaturation 0-100DECT500
temperaturenumberxcolor temperature (white mode)DECT500
lastpressedtimestamptime-timestampDECT400DECT440Contact
blindsopenbooelanxtarget openBlinds
blindsclosebooleanxtarget closeBlinds
blindsstopbooleanxtarget stopBlinds
lastalertchgtimestamptime-timestampBlinds
enpositionssetboolean-status configurationBlinds
modetext-modusBlinds

stats (part of device)

ObjectValuesettableDescription
countnumber-count of the values in array
gridnumber-time between values in array in s
datatimenumber-reference timestamp for array
statsarray-array of values

Above is available for power and voltage. Additional the energy has monthly and daily array and their belonging descriptive data. Furthermore for energy the array values are summed up for:

  • today
  • last 31 days
  • month to date
  • last 12 month
  • year to date

groups

ObjectValuesettableDescription
masterdeviceidtext-internal id of group
memberstext-member id's of group
masterdeviceidboolean-cmd sending active
synchronizedboolean-devices of group are synchron

templates

ObjectValuesettableDescription
togglebooleanxtoggle switch for template activation
lasttemplatetext-last confirmed template

routines

ObjectValuesettableDescription
activebooleanxtoggle switch for routine activation

API limitations

  • Boost and WindowOpen can only be set for the next 24h. time=0 is cancelling the command
  • updates to the thermostat are within a 15min range, depending on the previous communication of thermostat with fritzbox the next cycle is sooner or later, but definitely not imediately after an ioBroker intervention
  • if a windowopenactiv is set on a thermostat, which is part of a group, then the whole group and its thermostats is set to windowopenactiv (function inside the FB)
  • only a few color temperatures are accepted (mapped already be the API to valid ones)
  • only the predefined colors are valid combinations (getcolordefaults)

Write only on changes to the objects

This is a new feature to write only the changes to the objects. It reduces the logging and might be useful. If it is activated, a different feedback must be present to the actual state. Introducing a hysteresis makes not really practicable:

  • if temperatures have a change, it is a change and the 0.5° step does not need a threshold
  • values which are increasing over time would need an absolut threshold and not in %
  • values scaled to 100 are transmitted in steps of 1, so a threshold of 1% is capturing the same steps otherwise it is more complex and individually to be parametrized.

Known Adapter Limitations:

  • Not all FW-versions of fritz.box support all objects.

TODO:

  • map of data input from user to valid predefined colors (nearest match)
  • blind alert state -> decode bit array

Changelog

2.5.9 (npm)

  • correction for statistics,
  • new message box password needs to be reentered in versions >=2.5.4
  • xml output for buttons "my ..."

2.5.8 (npm)

  • more error checking processing statistics

2.5.7 (npm)

  • only for the hint that password needs to be reentered

2.5.6 (npm)

  • change in jsonUIconfig

2.5.5 (npm)

  • implementation of jsonUIconfig

2.5.4 (npm)

  • correction for excluding routines

2.5.3 (npm)

  • correction for updating komfort, absenk
  • corrections for the statistics polling when device is not plugged in
  • correction for year to date energy value (not recognizing two digit month)
  • new possibility in admin page to exclude templates/routines/statistics for compatibility with older FB

2.5.2 (npm)

  • correction for komfort, absenk if receiving 253/254 for OFF/ON it will be NaN see issue #164

2.5.1

  • correction for energy today value

2.5.0

  • getbasicdevicestats for powermeter (voltage, power, energy)
  • derived values from energy stats -> year to date, month to date, last 12 month, last 31 days, todays accumulation

2.4.1 (npm)

  • corrections reported by adapter-checker

2.4.0

  • new function for routines which activatetrigger
  • correction for templates and scenario (all templates are buttons, no need to check functionbitmask)

2.3.1

  • new function gettriggerlist in admin
  • corrected xml2json-light (included drirectly in repo until PR#8 is merged in repo), caused problems with templates in newer FB-firmware

2.3.0

  • option to set for logging only when a difference to the old value is detected
  • fritzdect-aha-nodejs as dependency

2.2.6

  • new objects for thermostat adaptiveHeatingRunning, adaptiveHeatingActive

2.2.5

  • several improvements for error handling
  • handling of invalid xml-answer for check user rights

2.2.4

  • correction: number format from admin page for times and tsoll

2.2.3 (npm)

  • buttons setmodeon/off/auto have now initial value false, and when triggered with true get false again (for next trigger)
  • buttons blindsclose/stop/open have now initial value false, and when triggered with true get false again (for next trigger)
  • boostactivetime and windowopenactivetime can now be set to a default value in the adapter config
  • new default temperature target in admin config (used if tsoll is not available e.g. object tree deleted and thermostat off/on)
  • corrections for handling the initial value for tsoll/lasttarget when thermostat is off/on

2.2.2 (npm)

  • license update
  • corrected doc/de

2.2.1

  • correction of "My colors" FB is not answering with valid xml
  • added test script (fritz.js) for login check in doc/de

2.2.0 (npm)

  • refactoring of API to FB, single instance with relogin after experied session
  • refactoring main.js
  • using http.request instead of deprecated @root/request
  • log the user permissions
  • remove fasthack for OFF/ON, upper range tchange, absenk, komfort = 32
  • limitation of boost/windowopen activation to 24h
  • correction of "present" (issue #224)

2.1.16

  • temperature range in sockets 0..32°C -> -20..50°C
  • fast hack for OFF/ON feedback via temperature 253/254*0,5 -> upper range tchange, absenk, komfort = 128
  • fast mod for fwversion for HAN-FUN
  • present message correction

2.1.15 (npm)

  • correction in timestamp as date/string
  • several version bumps

2.1.14

  • operationmode and hkrmode tracking also after commands
  • extended datapoints for blinds from Rollotron
  • presence=0 was detected but not written to the datapoint, now corrected (skipping the updated is not affected)

2.1.13

  • correction at group of switches (switchtype not recognized -> simpleonoff)
  • functionbitmask 32768 moved to role: switches

2.1.12 (npm)

  • new values for DECT500
  • back to full unit testing

2.1.11 (npm)

  • template for fritzfon

2.1.10

  • comfort/night is AUTO but reintroduced as operationmode

2.1.9

  • info to user after start of adapter

2.1.8

  • simpleonoff plug as device/group/template (telekom)

2.1.7 (npm)

  • boostactivetime/windowactivetime only value

2.1.6

  • pbkdf2 hash correction in calculation

2.1.5

  • pbkdf2 hash correction in output to fritzbox

2.1.4

  • removed the dependency to vis

2.1.3

  • presence=0 continue

2.1.2

  • withoit info.connection

2.1.1

  • error handling in msgbox

2.1.0

  • more refactoring => adapter based on class, gitCI instead of travisCI
  • new thromastat buttons (setmodeauto, setmodeon,setmodeoff)

2.0.0 Breaking Changes in datapoints and structures (npm)

  • refactoring of the code
  • new fritzapi to either used md5 or pbkf2 decryption, needed for fritzbox FW >7.24
  • usage of AHA API returned values as datapoint identifier
  • grouping of buttons under the DECT440
  • DECT500 groups
  • accepting blocktime from fritzbox
  • announcing new detected datapoints delivered by fritzbox
  • option strictSSL (experimental)

1.1.4 (npm)

  • blinds control
  • update testing

1.1.3 (npm)

  • setcolor cmd correction
  • only valid color temperatures for white

1.1.2

  • merge boost and boost active
  • merge windowopen and windowopenactive
  • DECT440 test

1.1.1 (npm)

  • getColorDefaults in Admin, prepared but format of xml can no

1.1.0

  • new features of AVM API 1.33
    • setblind
    • sethkrboost
    • setwindowopen
    • txbusy, windowopenactiveendtime, boostactiveendtime, boostactive
  • fade duration
  • DECT440
  • DECT500

1.0.1 (npm)

  • bugfixes in fritz API calls
  • error code 303 (but unknown what it means)
  • (Black-Thunder) targetTemp=null
  • (PascalBru) datapoint nextchange in hkr

1.0.0 Breaking Change for non-native API objects

  • merge of fritzapi into repo directly including added DECT500 commands
  • no longer support of non-native API calls (scraping of website)
    • GuestWLAN
    • BatteryCharge
    • OS version
  • correction of timestamp to date conversion for DECT400

0.3.2 (npm)

  • new states in heater group, operationList and operationMode

0.3.1 (npm)

  • (scrounger) new states in COMET, operationList and operationMode

0.3.0 (npm)

  • new DECT500 supported (without commands)

0.2.5 (npm)

  • fixed testing
  • correction for indication of actualtemp in heater groups
  • connection type and datasource added in io-package.json
  • correction pf switch and alert state (boolean in update routine)

0.2.4 (npm)

  • (Scrounger) correction of type mismatch (string boolean)

0.2.3 (npm)

  • skip updating values, when device not present

0.2.2 (npm)

  • added FritzDECT400 incl. testing
  • removed offset in temp value
  • new datapoint offset
  • added template for switches
  • added template testing

0.2.1 (npm)

  • gulp added
  • correction for DECT100 without temperature (caused a stop in creation of objects)
  • template creation corrected
  • my templates added in admin page

0.2.0

  • compact mode

0.1.5 (npm)

  • reading and activation of templates added
  • correction of actual temperature in DECT200 and COMET (now offset recognized)
  • password now hidden typed and encrypted
  • new datapoint actualtemp for Comet
  • fritzapi 0.10.5

0.1.4 (npm)

  • button added, only send the timestamp of last click
  • fritzapi 0.10.4

0.1.3 (npm)

  • windowopenactiv added to thermostat

0.1.2 (npm)

  • errorcode string->number
  • batterylow -> boolean
  • switch in admin for non native API call for battery charge in % (shall prevent 403 message logs)

0.1.1 (npm)

  • switch for GuestWLAN when no access is granted and polling creates an error
  • check for devices in admin page for better access to the xml/json stream from fritzbox
  • admin v3 implemented

0.1.0 (npm)

  • major code change to use the xml stream instead the dedicated API-commands for the dedicated values
  • creation of objects according the feedback from fritzbox
  • support of groups
  • still usage of non-universal object names
  • more objects

0.0.14 (npm)

  • correction of temp offset influence

0.0.13 (npm)

  • DECT200 voltage new object
  • DECT200 mode/lock value polling
  • Comet mode as number and not array
  • ADMIN v3

0.0.12 (npm)

  • changed state to mode AUTO/OFF/ON for thermostat (including datapoint lasttarget when going back to AUTO)
  • added name state for thermostat
  • DECT100 temperature reading
  • Contact reading

0.0.11 (npm)

  • added state OFF/ON for thermostat

0.0.10 (npm)

  • change to object oriented interface
  • getOSversion when starting for log

0.0.9 (npm)

  • values '1' accepted for ON
  • values '0' accepted for OFF

0.0.8 (npm)

  • messages info-> debug
  • values 1/true/on/ON accepted for ON
  • values 0/false/off/OFF accepted for OFF

0.0.7 (npm)

  • current temp of Comet/DECT300
  • cyclic polling GuestWLAN

0.0.6 (npm)

  • correction targettemp in DECT200 section

0.0.5 (npm)

  • setTemp on COMET
  • GuestWlan corrected

0.0.4 (npm)

  • cyclic status polling

0.0.3 (npm)

  • user now configurable

0.0.2 (npm)

  • metro widget for Dect200
  • smartfritz-promise->fritzapi
  • running version, tested with 1x DECT200 and Fritzbox FW=6.51 on Win10 with 4.5.0 and raspberry 4.7.0

0.0.1

  • running version, tested with 1x DECT200 and Fritzbox FW=6.30

License

The MIT License (MIT)

Copyright (c) 2018 - 2023 foxthefox foxthefox@wysiwis.net

Keywords

FAQs

Last updated on 22 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc