MagentaTV Binding for Deutsche Telekom MR 4xx

Hey Markus,
How can I test or install the EntertainTV binding?
bye

Do you have sthg like a FritzBox or a router with ssh access? In this case you could run the packet dump on the router. This usually create a file which could be displayed with Wireshark.

the binding is in development state, for now it implements audo-discovery of receivers and the pairing request (which includes a callback to receive the verificationCode). I’m currently working on the function to send keys, but need to find some time to complete this. If you want to run a basic test you need to sniff you user id as described above and then could set this as a thing property.

I‘ve a fritzbox, but im not aware how to get this dump. Have to make me informed about… Unfortunally not much time this Weekend…

fritz.box/html/capture.html is the link you are looking for.

Using a FritzBox you could find the user id by sniffing the appropriate eth/wlan interface

Enable packet capture on the FritzBox

  • Older Fritz!OS versions: Lauch your browser and open fritz.box/html/capture.html
  • Latest Fritz!IS versions: Follow the instructions on the AVM support page
  • Login with your FritzBox password
  • You should see a list of interfaces like this:
  • Select the interface (in my case wlan) and press [Start]
  • after a moment the FritzBox starts recording the packet stream
  • Power up your Entertain receiver and wait until the program is shown
  • Launch the EntertainTV App from Google/Apple store
  • For first time users you need to login with your t-online credentials
  • Select Buger Menu->Fernbedienung (remote control)
  • press a button on the virtual remote

Find the userID in Wireshark:

  • go back to your browser showing the Fritz!Box interfaces and click [Stop]
  • an .eth file should be automatically saved to your downloads folder
  • launch Wireshark, select File->Open
  • select the .eth from your browser’s download directory
  • you’ll see a packet list
  • click in the filter bar and set a filter “ip.addr == <your_receiver_ip> && http” (without <>)
  • you should the packet stream to/from the receiver
  • Press Cmd-F / Ctrl-F to open the search bar
  • Select “Packet Details” (Paketdetials) In the left drop down box and “String” (Zeichenkette)
  • enter “userID” in the search field and press [Enter]
  • you should found/see a XML structure with a tag “<userID>”
  • The hex string is your user id, copy everything between and to the clipboard

Make sure that UPnP support for OH is installed:
open openHAB console and run

bundle:list | grep *.upnp

if you don’t see the UPnP support issue the following command:

feature:install openhab-transport-upnp

Configure the binging

  • copy the org.openhab.entertaintv.jar to your OH device (usr/share/openhab2/openhab2/addons)
  • open the openHAB console and enable binding debug:
log:set DEBUG org.openhab.binding.entertaintv
  • open PaperUI, go to the Inbox and click on the scan button
  • select the EntertainTV binding
  • immediately you should see one or more EntertainTV things in the inbox
  • confirm to add the thing
  • you should get the config parameters, because the userId is a mandatory config option
  • go to the field User ID and paste the hex string from the clipboard
  • click the checkmark to add the thing
  • now the thing should become online, otherwise check openhab.log for errors
1 Like

Here we are, the first build to test: https://github.com/markus7017/org.openhab.binding.entertaintv/blob/master/target/org.openhab.binding.entertaintv-2.4.0-SNAPSHOT.jar

Please remember: This is not fully functional. The current status allows to test discovery (esp. if models other than MR401 are working) and running the pairing process. Support for control functions (on / off) and sending keys is in progress.

Awesome Markus and Hans-Jörg!
Great support, MANY THANKS!

The only hint maybe, that on newer versions of Fritz!OS the /html/capture is not working anymore but replaced by a not hidden feature, see here: https://avm.de/service/fritzbox/fritzbox-7490/wissensdatenbank/publication/show/1387_Paketmitschnitt-Internet-Support-Daten-erstellen/

Anyhow, will try if i find a calm minute!

Found some time to test, unfortunally it´s not working but maybe explainable:

  • It looks like i have a MR401B and not an MR401 (do not know, whether this makes a difference)

  • I also have in the same network an MR201 (No idea, wheter an “A”, “B” or whatever)

  • Found the UserID and copied it :wink:

  • Installed the .jar you mentioned (maybe worth to mention in your doku above that you occasionally have to chance the owner and group to openhab)

  • The binding appeared at the paperUI and i was able to start the scan. BUT it does not find anyone of my receivers.

  • Did a “manual add” for the 401B according to your screenshot above:

  • Got a “communication error”

  • The discrepancy i can see: I´ve configured Port 49153 in the receiver-settings but the error refered to 49152.

  • exactly the same happened to the MR201, btw.

Let me know, if i can deliver more information to help!

Cheers, andreas

Please ckeck if UPnP is disabled on your router.

The capture page is still valid on my 7590 with actual firmware.

UPnP is enabled, does it have to be disabled?
BTW, i own a 7490 and a 7270, which also do not have the /html/capture.

But anyhow, with the doku on the avm-page you also get the info how to run the packet-captures, so no issue at all.

Thanks HJ

PS: Looks like the “B”-version of the MR401 is just the actual software-release…

PPS: That´s what the openhab.log say:

Questions:

  • Should there been anything at HOST= ???
  • Does the UDN have to match anything? If s, where can i find it?

The UDN field has to be left empty, once the Binding discovers your receiver, it will set the correct value.
UPnP has to be enabled…

It does not let me to let the UDN empty at “manual add” :frowning:

I see, in that case, we have to wait for Makus, he is actually trying to do a new build for 2.3 …

Found another issue:
Both of my entertain-receivers do not listen to port 49153 nor 49152 (tested with Angry-Scan and telnet). They even do not react on a “ping”, (no matter if they switched on or off) although they are shown up on my fritz-box (and certainly work well).
Do i have to configure something at the receivers itself??

ok some points from my side

  • open the OH console and make sure that bundle:list shows the entertaintv binding with state Active
  • you need to have the upnp transport installed, e.g. by installing the HUE binding or any other from the standard distro, otherwhise starting the bundle will fail
  • if the state is not active try “bundle:list” to get the bundle id and then "bundle:start " and check if errors are displayed
  • Port 49152 was dfiscovered from the iOS App, 49153 doesn’t work in my setup
  • UDN and MAC address are discovered automatically when the UPnP discovery is completed successful
  • How did you get your thing into the inbox when the discovery didn’t worked? Did you created this manually?
  • There is no need to empty the UDN, this will be filled by the binding and should not be modified (that’s the reasons why it is a mandatory field)

I your screenshot I see “HTTP GET” failed…connect timed out. This is a clear indicator that the IP address is incorrect or the discoery was not completed. Again: did you manually created the thing?

the procedure should be

  • copy the jar to the addon folder
  • do NOT create a thing manually / don’t create a .things file or entry
  • turn on the receiver
  • a thing should come up in the Inbox when initially discovered, otherwise do a manual scan from the Inbox

This thing has to be discovered automatically! This fills the receiver’s IP address, MAC address, UDN. The port is currently hard coded in the binding (see above) so don’t worry if a different number is displayed.

By the way: /htm/capture.html also works for the 7490 (that’s my setup) or you could do a tcpdump on the raspberry to get the data.

did you verfied the network setup on the receiver? the receiver must be running, the network connected and the ip address accessible from the raspberry. if you use wifi this should run in bridge mode to clients could reach each other

here is a 2.3 build, but I won’t expect a difference in general
org.openhab.binding.entertaintv-2.3.0-SNAPSHOT.jar.pdf (39.6 KB)
(rename xxx.jar.pdf to .jar before copying to the addon folder)

Yes, you have to enable remote connection at every receiver. I‘m not home atm, so cannot exactly point to where to find this setting.

Check Einstellungen->Dieses Gerät->Systemeinstellungen->Netzwerk
you see the IP address and MAC address