FritzBox TR064 Binding an FB 7270 - only fboxName working

Hi all,
I am on OH2b5. I recently added the fritzbox-tr064 binding. In the first step it worked well and I got values for 2.4 GHz wifi, fbox name, guest wifi and others. I of course got an err value for 5 GHz wifi because the FB 7270 has no 5GHz and I got an err value for WAN IP because my FB is connected to my cable modem through LAN1 port. Therefore I removed those two items from the fritzbox.items file. This is where the trouble started. After removeing the two items the only item that still works and is present in OH2 is fboxName. All others are gone. I tried several things which all did not help:

  • Added the both items again and restartet the bundle as well as restartet OH2. As it did not help I removed them again
  • Uninstalled and installed the binding, including restart of OH2
  • removed the coresponding itemNNN-tables and entries in the items table from my persitance DB (MariaDB)
  • removed the fritzbox.items file, restartet OH2, added the file again

I do not see any errors in the log. The log only shows the one item fboxName is activated and it appears in Paper UI. The other items from the items-file do not appear in the log nor in Paper UI.

In addition I am running jAnrufmonitor on my laptop which also uses TR064 with a different fritzbox user and which works fine. It signals all incoming and outgoing calls, syncs the list of calls, can read the address book incl pictures.

Any help is appreciated to get this binding working again

Hello Rene,

sorry for my broken english.

I had the same problems. I could solve them with the following changes.

the important thing first :

NEVER try to edit the files with another Editor as openhab designer (OH1). or eclipse smarthome designer (OH2)

I have always copied the code from the posts and then paste to the files with with notepad ++ and edited. The mistakes became more and more. When I opened the files, it the openhab designer saw this as strange as the behavior of OH2 .

first, i try openhab 2_10, never works, more and more mistakes.
Then I downloaded the Version oh1.8.3. latest stable Version of OH1. (not my favourite, old Version, for test only)

I configured only with the files openhab.cfg, fbtr064.items file and sitemap test.sitemap. then i started the openhab with start.bat (windows10) and choose in
internetbrowser http://localhost:8080/start/index: the BASIC UI ,other UI i´ve not tried.

The filecontents are as follows:

openhab.cfg: (in the section fritzbox binding)

fritzboxtr064:url=https://192.168.2.1:49443

fritzboxtr064:refresh=60000

fritzboxtr064:user=openhab

fritzboxtr064:pass=PW_of_user=openhab

test.sitemap (only test for functionality, double entries etc… without sense)

------Begins here (dont copy this line)

sitemap demo label=“Main Menu”
{
Frame label=fritzbox {
Text item=fboxName
Text item=fboxWanIP
Switch item=fboxGuestWifi
Switch item=fboxWifi24
// Text item=fboxIncomingCall
Text item=fboxMissedCalls label=“verpasste Anrufe [%s]” icon="network"
Text item=fboxIncomingCall label="Anruf von: [%1$s]"
Text item=fboxIncomingCall label=“Anruf an: [%2$s]”
// Text item=fboxIncomingCallResolved label=“Incoming call: [%1$s to %2$s]” icon=“network”
}
Frame label=“Telefon/Internet” {
Group item=Phone label=“Telefon/Internet”
}

}

// vim: syntax=Xtend

Ends here (dont copy this line)

fritzbox.items _as follows (or another free Name of .items file, e.g. fb.items or fbtr64.items…) in openhab_dir/conf/items (OH2)

begin *.items -------------- (not copy this line !!)

Group Phone

String fboxName “FBox Model [%s]” (Phone) {fritzboxtr064=“modelName”}
String fboxWanIP “FBox WAN IP [%s]” (Phone) {fritzboxtr064=“wanip”}
Switch fboxWifi24 “2,4GHz Wifi” (Phone) {fritzboxtr064=“wifi24Switch”}
// Switch fboxWifi50 “5,0GHz Wifi” (Phone) {fritzboxtr064=“wifi50Switch”}
Switch fboxGuestWifi “Guest Wifi” (Phone) {fritzboxtr064=“wifiGuestSwitch”}
Contact cFboxMacOnline “Presence (WiFi) [%s]” (Phone) {fritzboxtr064=“maconline:11-11-11-11-11-11” }

// only when using call monitor
Switch fboxRinging “Es ruft jemand an [%s]” (Phone) {fritzboxtr064=“callmonitor_ringing” }
Switch fboxRinging_Out “Anruf wird getätigt [%s]” (Phone) {fritzboxtr064=“callmonitor_outgoing” }
Call fboxIncomingCall “Incoming call: [%1$s to %2$s]” (Phone) {fritzboxtr064=“callmonitor_ringing” }
Call fboxOutgoingCall “Outgoing call: [%1$s to %2$s]” (Phone) {fritzboxtr064=“callmonitor_outgoing” }

// resolve numbers to names according phonebook
Call fboxIncomingCallResolved “Incoming call: [%1$s to %2$s]” (Phone) {fritzboxtr064=“callmonitor_ringing:resolveName” }

// Telephone answering machine (TAM) items
// Number after tamSwitch is ID of configured TAM, start with 0
Switch fboxTAM0Switch “Answering machine ID 0” (Phone) {fritzboxtr064=“tamSwitch:0”}
Number fboxTAM0NewMsg “New Messages TAM 0 [%s]” (Phone) {fritzboxtr064=“tamNewMessages:0”}

// Missed calls: specify the number of last days which should be searched for missed calls
Number fboxMissedCalls “Missed Calls [%s]” (Phone) {fritzboxtr064=“missedCallsInDays:5”}

end *.items------------------- (not copy this line !!)

i put the file

org.openhab.binding.fritzboxtr064-1.9.0.jar

from the offline all-addon-zip file into the subdir openhab_install_dir\addons
(i.e. C:\Users\myName\Documents\openhab-2.1.0-SNAPSHOT\addons

also the newest file
org.openhab.binding.fritzboxtr064_1.9.0.201609212013.jar
from github works fine.

i dont understand what the Funktion “Call” in the *.items file does. I know only the functions number, string etc… like here: http://docs.openhab.org/concepts/items.html
but it works…

Now, calls and other function (presence over MAC not yet tested) works fine on OH2_10 (newest)

Now i can try output the caller-id or Name (i test now the rules for Name Response) with voicerss oder MaryTTS (works manuell very well, but i wait for the text-to-speech binding of alexa, great stuff :slight_smile:
The voiceinput versus echo always works very well, MY NICE SMARTHOME :slight_smile:

I wish you success

JanL

i wrote:


i dont understand what the Funktion “Call” in the *.items file does. I know only the functions number, string etc… like here: http://docs.openhab.org/concepts/items.html
but it works…

and the answer is here and not in the public documentation, day by day more knowings :wink:

too many pages with Information, i am confused :smile:

Corrections:

(it is not only an answer for Rene, it is also a Report of my experience with the FritzboxTR04 Modul on OH2 as WINDOWS-Installation)

I started again with a clean Installation of OH2 (zip Archive simply unpacked on the desktop)
choose “Standard” as next
choose PaperUI, go section “Add Ons”, add "Fritzbox TR04 Binding"
configure it under configuration/Bindings with the “CONFIGURE” Button , replace the part “fritz.box” with the StaticIP of the fritzbox, configure user (for example User=openhab PW=secretPW)
(through that - i dont need to configure the fritzboxtr064.conf file in the Service Directory, - opposite the documentation in the Binding wiki - , Readme)

create openhab2_home_dir\conf\items\fritzboxtr064.items (or another free Name with Extension .items)

edit the file for example as follows :

-------- dont copy this line — start copy under this line -------------

Group Phone

String fboxName “FBox Model [%s]” (Phone) {fritzboxtr064=“modelName”}
String fboxWanIP “FBox WAN IP [%s]” (Phone) {fritzboxtr064=“wanip”}
Switch fboxWifi24 “2,4GHz Wifi” (Phone) {fritzboxtr064=“wifi24Switch”}
// Switch fboxWifi50 “5,0GHz Wifi” (Phone) {fritzboxtr064=“wifi50Switch”}
Switch fboxGuestWifi “Guest Wifi” (Phone) {fritzboxtr064=“wifiGuestSwitch”}
Contact cFboxMacOnline “Presence (WiFi) [%s]” (Phone) {fritzboxtr064=“maconline:11-11-11-11-11-11” }

// only when using call monitor
Switch fboxRinging “Es ruft jemand an [%s]” (Phone) {fritzboxtr064=“callmonitor_ringing” }
Switch fboxRinging_Out “Anruf wird getätigt [%s]” (Phone) {fritzboxtr064=“callmonitor_outgoing” }
Call fboxIncomingCall “Incoming call: [%1$s to %2$s]” (Phone) {fritzboxtr064=“callmonitor_ringing” }
Call fboxOutgoingCall “Outgoing call: [%1$s to %2$s]” (Phone) {fritzboxtr064=“callmonitor_outgoing” }

// resolve numbers to names according phonebook
Call fboxIncomingCallResolved “Incoming call: [%1$s to %2$s]” (Phone) {fritzboxtr064=“callmonitor_ringing:resolveName” }

// Telephone answering machine (TAM) items
// Number after tamSwitch is ID of configured TAM, start with 0
Switch fboxTAM0Switch “Answering machine ID 0” (Phone) {fritzboxtr064=“tamSwitch:0”}
Number fboxTAM0NewMsg “New Messages TAM 0 [%s]” (Phone) {fritzboxtr064=“tamNewMessages:0”}

// Missed calls: specify the number of last days which should be searched for missed calls
Number fboxMissedCalls “Missed Calls [%s]” (Phone) {fritzboxtr064=“missedCallsInDays:5”}

-------- end - dont copy this line ---------

create _openhab2_home_dir\conf\sitemaps_default.sitemap and copy this for first Tests

-------- dont copy this line — start copy under this line -------------

sitemap demo label="…die ffg. Einträge stehen in der Datei oh2_home_dir\conf\sitemaps\_default.sitemap"
{
Frame label=fritzbox {
Text item=fboxName
Text item=fboxWanIP
Switch item=fboxGuestWifi
Switch item=fboxWifi24
// Text item=fboxIncomingCall
Text item=fboxMissedCalls label=“verpasste Anrufe [%s]” icon="network"
Text item=fboxIncomingCall label="Anruf von: [%1$s]"
Text item=fboxIncomingCall label=“Anruf an: [%2$s]”
// Text item=fboxIncomingCallResolved label=“Incoming call: [%1$s to %2$s]” icon=“network”
}
Frame label=“Telefon/Internet” {
Group item=Phone label=“Telefon/Internet”
}

}

// vim: syntax=Xtend

-------- end - dont copy this line ---------

thats all, it works

In this clean installation i dont need a specially jar-File and no openhab.cfg configuration (was a failure from me - correct: see fritzboxtr064 wiki from the author) , but also no fritzboxtr064.conf in Directory “services” etc… only the Download of the “OH2 Runtime Distribution” and the configuration in the “Configuration->Binding” Section on the PaperUI, the sitemap-file (only for testing, i dont need to display the items in the future) and the “your_own.items” file

One of my first mistakes at the begin was the Codecopy from the Websites and editing with an external Editor. The results was damaged entries. In external Editor (Notepad++, one of the best) it shows normal, but when i opened the configurationfiles in smarthome eclipse designer the lines showed hearts and other Symbols. With the copy from the Websites direct in the opened files in OH2-designer the lines showed no Errors. Perhaps a Problem of Codepageconversion, not important now… Workaround was : Never use not another Editor as OH2 Designer.(The OH2 Designer has syntax checking … which is perhaps safer for the beginning …:slight_smile: )

mfg JanL

I’ve just looked into this. Thanks very much for your guide on windows. The tr064 binding has been much easier for me to get working in OH2.2 than the OH2 telnet-based one.

Config as above through paper ui, but for the items and sitemap files, its another example of curly speech marks creeping in from copy and paste.

Remove all curly speech marks and replace with straight ones.