OH3 does not find any devices but when I use the http://192.168.0.1:49000/tr64desc.xml I get the following list with some devices. Because the bridge is offline I cannot add the sub devices manually.
My goal is to use the TR-064-Binding in Openhab 3 as I have done it with Openhab 2.
My Environment is Debian Buster with openjdk version “11.0.9.1” 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Debian-1deb10u2, mixed mode)
I use Openhab 3.0.1 stable installed with apt install.
The TR-064-Binding does not find any devices but when I use the http-equivalent I see my devices.
The Bridge-Thing-State is
Status: OFFLINE COMMUNICATION_ERROR
could not get device definitions from http://192.168.0.1
is the correct IP address for your FritzBox? You configured the binding using this IP address and it matches the way you composed the query when testing with the http-equivalent?
I did not use this binding yet, but installed it now for checking this out as I have a FB 6490. From what I can tell right now, the DNS seems to play a vital role: I configured my FB not with a name but with its IP address. The reason for the communication error I get is “java.util.concurrent.ExecutionException: java.net.UnknownHostException: fritz.box: the name or the service is not known.”. As I did not configure the name “fritz.box” anywhere this can only be something from outside the OH system, most likely the DNS.
I was not successfull to circumvent this right now and need to look into it more deeply when I have more time.
Yes, 192.168.0.1 is the correct IP address because with http://192.168.0.1:49000/tr64desc.xml I’ll get the information the binding should read (see my first post).
If I use “192.168.0.1:49000” in the config of the binding I’ll see an error in the openhab.log-file “192.168.0.1:49000:49000” so it should be ok to only put in the ip-address without the port.
Michael, sorry for the delay. I only found time to look into my DNS issues today.
After ensuring my DNS was back to normal I created a TR-064 thing, using the IP address of my FritzBox and it went online immediately:
I thought about the OS user you used that ran the request: as you have an installation based on apt your OH most likely runs with the user “openhab”. Did you test with that user or with another one?
Why do I ask: trying to reproduce the situation in my setup I initially had difficulties to bring the created TR-064 thing online. The reason were DNS issues. Root cause found and eliminated, issue solved. In addition that verified that the binding basically works in OH3.
In your case we are still looking for the root cause of your issue. Now I want to make sure, that we work on the real issue in your case and do not try to find something that is not really what we are looking for. And as the OH system runs with “openhab”, it seems logical to make a manual request within the same settings as the ones that the OH system is running under, eliminating issues that may be caused by different settings that another OS user might introduce.
I took a raspi and installed openhabian, put the network cable direct into the FritzBox and OH3 found the box without any user or password. After I put in the password the FritzBox was online in OH3.
It might be the same as the Sonos binding does also not found my Sonos boxes or the Sonos boxes are only found if I connect the network cable direct to my FritzBox.
Can you put the new RasPi in the same network/subnet as the one you are struggling with?
My RasPi is on another subnet than the FritzBox. The two are separated by a switch and my RasPi is in a VLAN this switch manages. Still no issues for the binding to contact the FritzBox and bringing the TR-064 thing online.
There are two things you can check in addition to bringing the new RasPi into the same subnet as the other one:
There might be something in the configuration/setup of the binding in your struggling OH installation. You can uninstall the binding, shutdown OH, clean the cache, reboot the RasPi, install the binding again and see whether it brings your thing online.
Maybe there is an interference with another binding. I assume on the new RasPi you only installed the TR-064 binding? Or is the set of bindings identical to the OH installation that has issues connecting your FritzBox? IF there is really an interference with another binding, it will be tedious work to narrow that down. The only way to do that - as far as I know - would be to uninstall one binding after the other until TR-064 works properly. I would do that on a copy of your live system if possible.
Because my Osram Lightify Bridge is not supported in OH3 I setup my Raspi with Raspian and OH2. When I try to get the TR-064 binding in OH 2.5 running it finds my FritzBox and my Powerline 1260E. If I try to sign in to https://192.168.0.1:49443 I find nothing in the logs and have Status “unknown”. Same with “http:192.168.0.1:49000”.
I am surprised because in former days with an older FritzOS (now with 7.21 from Vodafone) it worked.
With OH3 and Port 80
2021-04-12 07:36:37.973 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalArgumentException: Invalid URI host: null (authority: 192.168.0.1:80:49000)
at org.eclipse.jetty.client.HttpClient.checkHost(HttpClient.java:510) ~[?:?]
at org.eclipse.jetty.client.HttpClient.newHttpRequest(HttpClient.java:495) ~[?:?]
at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:453) ~[?:?]
at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:442) ~[?:?]
at org.openhab.binding.tr064.internal.util.Util.getAndUnmarshalXML(Util.java:326) ~[?:?]
at org.openhab.binding.tr064.internal.util.SCPDUtil.<init>(SCPDUtil.java:44) ~[?:?]
at org.openhab.binding.tr064.internal.Tr064RootHandler.internalInitialize(Tr064RootHandler.java:141) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
In OH3 without a Port Number I find nothing in the logs and only in the browser
With the used user in OH3 I get with the Kodi FritzBox Connect-Monitor-Plugin a Connection to the FritzBox. In Kodi I don’t know the used port but I works fine. Every time someone calls me the Kodi FritzBox Callmonitor stops the playing and shows me who is calling. So in general the FritzBox Setup should be ok.
That points to an issue with secured connections: I assume the certificate the FritzBox offers needs to be made known to the JAVA installation somehow.
With the Vodafone firmware I cannot assist, I have an original FritzBox with plain AVM firmware.
As long as both communication partners do not enforce a secured connection you are fine with an unsecured one, at least within your own LAN.
I mentioned it in case one of the two participants does enforce encryption. Sonner or later that will happen as some browser vendors already think about disabling plain http connections (I’m not looking forward to that as it makes life more complicated within my own systems without gaining any additional security locally.)
My Vodafone-Fritzbox was not able to create a certificate. It took endless time so I’ve created a certificate on my pc and uploaded it. After that the TR064- and Fritzbox-Binding worked immediately.
Maybe someone can update the docs and put this information in.
Thank you for your support.
2021-08-25 14:02:10.253 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tr064:fritzbox:e1a611b727' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): could not get device definitions from 192.168.179.1
It used to work before so I wonder what it might be.