MagentaTV Binding for Deutsche Telekom MR 4xx

Tags: #<Tag:0x00007f174a4b74a0>

Not really, as I have other priorities at the moment.
Implementation is not easy…

There probably isn’t anything new about how to get the pairing ID either, is there? I’d like to use the script to control my MR400. Will I have to wait for the binding or is there any way to calculate the IDs?

Unfortunately, we have no clue how to calculate the userID, pairingID is not the issue.
ATM, we are experimenting with sniffed user ID…

I restarted to work on the binding. A first build that supports the pairing process is available here:

However, we still have no clue how the userID is computed (mostly a MD5 of some credentials). For the moment you need to Wireshark the userID once and then put it in into the thing config. If anyone wants to test let me know and I could provide some hints how to take the snapshot.

1 Like

Hi Markus,
i might be interested on your hint as i run two of them in my environment. But i currently be not that often able to play around with my smarthome.

One additional question: What use-cases do you have set up with the receiver?? Just to get an idea what other do :wink:


BTW: I have an 401 and an 201, are they also supported??

Hi Andreas,

the use case is simple: Control the Entertain receiver from openHAB, e.g. include it into scenes, switch channel etc.

Currently I’m developing using model MR400. I ordered a MR401, so pretty sure this will be supported. I’m not sure about the 201, but that might be tested by you.

Are you familiar with Wireshark - currently that’s the only way to sniff the userID, which is required to configure the OH things.

are you familiar with Wireshark? I need to find the time and could create a how-to sniff the userID

Thanks Markus,
will perhaps try this on the next weekend, currently on a business-trip.

I´m a bit used with wireshark, but not sure, WHERE in my network i should sniff, as the receiver has it´s own port on the same router, which is doing the WLAN, where the mobile is connected. the router can´t run wireshark and a assume, nowhere else in the network this traffic can be seen…

The 201 is, as far as i know, just a 401 without a HD… So if the 401 is running, the 201 should do it also.

and, btw: The usecase you are refering: I do this currently with a Logitec Harmony-Hub, which has the advantage to support millions of devices. I currently to not see another reason of trying this than “Because i`m curious” :slight_smile:
The Harmony is worth a tip, works pretty well, can even support openHAB-Devices via the HUE-Emulation and can be adressed via a ALEXA-Skill… The only disadvantage i currently see, is, that everything they do is going into the Logitec-Cloud…

Cheers, a.

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

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… 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
  • 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:

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:

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.