openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

[FritzBox TR-064] Enhancement: Add options to change Call Deflection On/Off #5290

Open bredmich opened 7 years ago

bredmich commented 7 years ago

Hi all,

i would like to have an additional feature for the FritzBox TR-064 binding. The current binding is pretty limited when compared to the capabilites of the TR-064 interface.

One of the bigger improvements is the setting for Call Deflections. The TR-064 offers the interface to change this Call Deflections On and Off or even set the Deflection destination. It would be enough the change the already existing Deflections On and Off. This could be an simple Switch on the sitemap or even an rule to change this setting based on other parameters like presence detection.

Expected Behavior

Configuration:

Working:

Current Behavior

Not implemented

Possible Solution

Settings:

Informations

AVM TR-064 informations: https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AVM_TR-064_first_steps.pdf TR-064 informations for Call Deflection: http://docplayer.net/23969514-Tr-064-support-x_avm-de_ontel.html

Bounty: https://www.bountysource.com/issues/48723856-fritzbox-tr-064-enhancement-add-options-to-change-call-deflection-on-off

Cheers Michael

tensberg commented 7 years ago

I'll have a look at it. It looks pretty straightforward, but the binding needs a few changes in the part which writes values to the FritzBox. This is why I wait for the outcome of my pull request for issue #5221 first, otherwise there would be conflicts between the changes.

BTW, the "official" link to the Call Deflection API description is https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/X_contactSCPD.pdf

bredmich commented 6 years ago

Any news @tensberg?

tensberg commented 6 years ago

Huh, time flies... I completely lost track of this, but will look into it again this week and see if I can create a pull request.

tensberg commented 6 years ago

I've finally taken the time to complete the change and submit a pull request. The good news is that if the pull request is accepted it should be easier to add similar switches for other functions in the future.

Unfortunately configuring call deflection items in the item map will be a bit more complicated than I expected. The API to read and set the call deflections is also used to toggle the call blocks. So to get the ID of a call deflection for the item map you also have to count the call blocks which you have configured.