Issues with the new OH3 TR-064 Binding

  • Platform information:
    • Hardware: Openhab 3 Docker Image [snapshot-debian] or openhab/openhab:latest-debian (548f9768ba0a) configured to use the host interface
      Same on Windows 10 with zulu 11 and latest snapshot build
      openHAB 3.1.0
      Build #2135

    • docker run command:
      docker run
      –name openhab-latest-fresh
      –net=host
      -v /etc/localtime:/etc/localtime:ro
      -v /etc/timezone:/etc/timezone:ro
      -v /opt/openhab-fresh/conf:/openhab/conf
      -v /opt/openhab-fresh/userdata:/openhab/userdata
      -v /opt/openhab-fresh/addons:/openhab/addons
      -e TZ=Europe/Berlin
      -e “EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin”
      -d
      -e OPENHAB_HTTP_PORT=7070
      -e OPENHAB_HTTPS_PORT=7443
      -e USER_ID=9999
      -e GROUP_ID=9999
      openhab/openhab:snapshot-debian

    • OS: Linux Mint 20 amd64
      uname -a
      Linux labor 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

    • Java Runtime Environment: Docker

    • openHAB version: 3.0.0 or openHAB 3.1.0 Build #2135

  • Issue of the topic: I configured a Fritzbox thing for my Fritzbox 7490 (OS V7.21) with the GUI and the V3 TR-064 Binding.
    The thing is going online as expected and communicating with the fritzbox, as you can see in the trace log below. But I’m not be able to get the subdevice UIDs for subdevice or subdeviceLan.
    The documention does not describes how to determine those value. Autodiscovery does not find anything (subdevices). Or if I look at a wrong place. Where I have to look for it?

Is there a tutorial on how to handle these new tr064 subdevices in detail?

I want to use the macOnline feature which works in Openhab2. The user tr064user is the same as I use in my Openhab 2 environment, in openhab2 (with the V1 tr064 binding) all runs as expected.

  • Please post configurations (if applicable):
    openhab> openhab:things show tr064:fritzbox:77942222a0
    UID: tr064:fritzbox:77942222a0
    Type: tr064:fritzbox
    Label: FritzBox
    Status: ONLINE

Properties:
deviceType : urn:dslforum-org:device:InternetGatewayDevice:1
SoftwareVersion : 113.07.21
ModelName : FRITZ!Box 7490
SerialNumber : 38xxxxxxD9

Configuration parameters:
host : 192.168.178.1
phonebookInterval : 600
refresh : 60
password : SecurePW
user : tr064user

Channels:
ID: securityPort
Label: null
Type: tr064:securityPort

ID: uptime
Label: null
Type: tr064:uptime

ID: deviceLog
Label: null
Type: tr064:deviceLog

ID: reboot
Label: null
Type: tr064:reboot

Begin of the trace log

2021-01-12 14:08:44.061 [TRACE] [hab.binding.tr064.internal.util.Util] - Refreshing cache for ‘http://192.168.178.1:49000/tr64desc.xml
<root xmlns=“urn:dslforum-org:device-1-0”>
<specVersion>
<major>1
<minor>0
</specVersion>

<HW>185
<Major>113
<Minor>7
<Patch>21
<Buildnumber>81779
<Display>113.07.21
</systemVersion>
<device>
<deviceType>urn:dslforum-org:device:InternetGatewayDevice:1

2021-01-12 14:08:44.191 [TRACE] [hab.binding.tr064.internal.util.Util] - Storing in cache org.openhab.binding.tr064.internal.dto.scpd.root.SCPDRootType@51ba6428
2021-01-12 14:08:44.192 [TRACE] [hab.binding.tr064.internal.util.Util] - Returning from cache: org.openhab.binding.tr064.internal.dto.scpd.root.SCPDRootType@51ba6428
2021-01-12 14:08:44.197 [TRACE] [hab.binding.tr064.internal.util.Util] - Refreshing cache for ‘http://192.168.178.1:49000/deviceinfoSCPD.xml
2021-01-12 14:08:44.211 [TRACE] [hab.binding.tr064.internal.util.Util] - XML = <?xml version="1.0"?>

Did you search for devices after you configured the bridge thing?

No, how can I trigger such a discover? With the GUI? karaf console?

Is this the correct procedure:

openhab> list -s | grep tr064
214 x Active x 80 x 3.1.0.202101120342 x org.openhab.binding.tr064
openhab> openhab:discovery 214

There is nothing found after that…

I’ve got it running using the textual way but this is nothing for the folk…

Sorry. No support for textual from me.

As I said. The Textual way works, I can describe the steps.

The config over the GUI is not working for me.

Here the steps for the textual config. Not quite difficult.
Get the uids. On linux use wget or curl. On windows open the URL “http://192.168.178.1:49000/tr64desc.xml” (192.168.178.1 is the IP Address of your fritzbox)
in a browser like chrom or firefox and search for the uuids in the browser window.

wget -O - http://192.168.178.1:49000/tr64desc.xml | grep uuid -B 4 | egrep 'uid|modelD' 2> /dev/null

This return something like this

<modelDescription>FRITZ!Box 7490</modelDescription>
<UDN>uuid:739f2409-bccb-52e7-8e6c-3810C56619D9</UDN>

<modelDescription>LANDevice - FRITZ!Box 7490</modelDescription>
<UDN>uuid:75792219-bccb-52e7-8e6b-3810C56619D9</UDN>

<modelDescription>WANDevice - FRITZ!Box 7490</modelDescription>
<UDN>uuid:75792219-bccb-52e7-8e6a-3810C56619D9</UDN>

<modelDescription>WANConnectionDevice - FRITZ!Box 7490</modelDescription>
<UDN>uuid:75792219-bccb-52e7-8e69-3810C56619D9</UDN>

and the textual config based on this UUIDs

Bridge tr064:fritzbox:FritzboxInternet "Fritzbox" @ "location" [ host="192.168.178.1", user="tr064user", password="SecurePW",
                                                         phonebookInterval="0"]{
    Thing subdeviceLan LAN "label LAN"   [ uuid="uuid:75792219-bccb-52e7-8e6b-3810C56619D9",
                                                macOnline="12:34:56:78:90:12"]
    Thing subdeviceLan WAN "label WAN"               [ uuid="uuid:75792219-bccb-52e7-8e6a-3810C56619D9"]
    Thing subdeviceLan WANCon "label WANConnection"  [ uuid="uuid:75792219-bccb-52e7-8e69-3810C56619D9"]
    }

Maybe that’s the config in UI what you are looking for?!

@thefechner
Yes that is what I’m looking for :slight_smile: !! thank you !!

I had the same problem. Took me an entire evening. I total missed that big blue button!
I can’t believe it, it is so obvious. Maybe it’s because I a new to OH3. Maybe to documentation could be approved.
Best regards, Waterman

1 Like

@waterman I agree with you. Nevertheless. I found the new UI is a step forward :slight_smile:

Are the channels dslDownstreamCurrRate and dslUpstreamCurrRate also available if the FritzBox is only connected via WAN and a fiber optic modem is connected upstream? Or what option do I have to integrate the upload and download speeds in OH3?

thanks