MagentaTV Binding for Deutsche Telekom MR 4xx

Updated to the latest snapshot and also your latest version of the binding, but it stopped still with the status “initializing”.

The properties looks good for me:

Could it be the missing serial number?

For the log i use tail -F /var/log/openhab2/openhab.log /var/log/openhab2/events.log with filter on “Telekom”.

I think it’s time to find the console on openHABian :wink:

send you a PM - lets connect directly rather than playing ping pong :slight_smile:

S/N has no impact on the communication it’s just for information (same as HW version etc.)

For me, the new Binding works.
However, I will not let go of the old Binding. Find no entries in the jsondb.

maybe you need to clear the cache

openhab-cli stop
openhab-cli clean-cache
openhab-cli start

Thanks for that binding. Was a little bit difficult to find the repo, but than it worked immediately.

Thomas

Did you guys find out what is going on in this case? I am facing the same situation, the binding gets stuck
while “Initializing”, but from what I can see there are no upstream problems. The binding is loaded, the MediaReceiver thing gets detected, the “login” was done and there is a username reported in the thing.

Hi Markus,

first of all, thanks for your cool work. Excellent !

I have tested the binding (org.openhab.binding.entertaintv-2.4.0-SNAPSHOT) on two different platforms .

  1. Synology DS 218+ , DSM 6.2.1, Java 8.0.161 (my regular openhab server)
  2. Mac OS 10.14.1, Java 8 Update 201

On the Mac it worked immediately but on my Synology the binding suddenly stucks
while “Initializing”. Strange. Is it Java ?

Dieter

it‘s pure Java so should run. There might be a problem with detecting the local ip address. Did you selected the default ip interface in the OH system settings?

Please provide a log with TRACE level.

Hi Markus,
part of my log file including error messages:

2019-02-03 20:25:41.646 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model '08-Telekom_Receiver.items'
2019-02-03 20:30:31.533 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/volume1/homes/openhab/addons/org.openhab.binding.telekomtv.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.telekomtv [198]
2019-02-03 20:30:31.554 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/volume1/homes/openhab/addons/org.openhab.binding.telekomtv.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.telekomtv [198]
2019-02-03 20:36:06.668 [INFO ] [ernal.handler.TelekomTVNotifyServlet] - TelekomTV: NotifyServlet started at '/telekomtv/notify'
2019-02-03 20:36:15.744 [ERROR] [mtv.internal.TelekomTVHandlerFactory] - TelekomTV.Factory: Unable to process discovered device, UDN='xxxx': null (class java.lang.NullPointerException)
2019-02-03 20:36:15.746 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'telekomtv:receiver:xxxx' to inbox.
2019-02-03 21:41:45.183 [ERROR] [mtv.internal.TelekomTVHandlerFactory] - TelekomTV.Factory: Unable to process discovered device, UDN='xxxxx': null (class java.lang.NullPointerException)
2019-02-03 21:41:53.928 [ERROR] [mtv.internal.TelekomTVHandlerFactory] - TelekomTV.Factory: Unable to process discovered device, UDN='xxxx': null (class java.lang.NullPointerException)
2019-02-03 22:24:30.375 [INFO ] [ernal.handler.TelekomTVNotifyServlet] - TelekomTV: NotifyServlet stopped

Perhaps this helps a bit.
All the best
Dieter

I’m missing the TRACE entries. Please make sure that Debug Level is set to TRACE:

open oh console and enter
log set TRACE org.openhab.binding.telekomtv

There might be a problem with detecting the local ip address. Did you selected the default ip interface in the OH system settings?

What exactly do you mean by that? What setting are you talking about and why would that be important?

Open PaperUI -> Configuration. Under Network Settings you’ll find the option to select the default network interface. The binding needs to detect the local IP address to reach the receiver to generate a callback link receiving the Pairing response.

Depending von the environment this may fail (Java is a little bit inconsistent how this works on different platforms and nobody verified the Synology environment so far. The preferred handling is to get the local IP from the OH system setting. If this is not successful the binding will try to different ways.
If you see a message like

TelekomTV.Network: Local IP address=‘x.x.x.x’, Local MAC address = ‘xx:xx:xx:xx:xx:xx

it’s all good and couldn’t be the problem,

Dieter send me another log and it might be a timing issue, because I see that the pairing request is send first before the Notification handler gets startet.

22:28:22.398 [DEBUG] [g.telekomtv.internal.TelekomTVControl] - TelekomTV.Control: Pairing initiated for device ‘DMS’ (deviceID=xxxxxxxxxxxx).
22:28:22.413 [DEBUG] [ternal.network.TelekomTVNotifyServlet] - TelekomTV.Notify: TelekomTV: HandlerFactory bound to NotifyServlet

This would be tricky to solve, because I have no control which service is started when, but maybe this the log entries are out-of-sync.

Thanks for your help.

But I do not see a message that looks like the one you mentioned, “…Local IP address=‘x.x.x.x’, ….”.

Nevertheless the device gets discovered (“TelekomTV: Discovered an Telekom Media Receiver…” followed by
TelekomTV: Create Thing for device…”) and then almost immediately “TelekomTV.Factory: Unable to process discovered device,…, null (class java.lang.NullPointerException)

Looks like a different problem?

Regards

Dieter (don’t get confused, I am another Dieter :slight_smile: )

Could you please provider a TRACE log.
open OH console and enter

log:set TRACE org.openhab.binding.telekomtv

restart OH and copy the telekomtv initialization here.

This is from a trace log. I only removed irrelevant lines (discovery of other devices found), to make life easier for you.

I just wanted to prepare the log again for you but while doing that I saw something that could be causing the problem:

The log message saying that the thing got created

2019-02-11 11:06:01.769 [DEBUG] [covery.TelekomTVDiscoveryParticipant] - TelekomTV: Create Thing for device ‘xxxx’ with UDN '3e607617

is different from the next message

2019-02-11 11:06:01.775 [ERROR] [mtv.internal.TelekomTVHandlerFactory] - TelekomTV.Factory: Unable to process discovered device, UDN='3E607617

regarding the UDNs. The letters in the hex numbers in the name of the UDN are lowercase in the first, but uppercase in the latter.

The initial part of the log is like this:

2019-02-11 11:06:01.319 [DEBUG] [org.openhab.binding.telekomtv ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.openhab.binding.telekomtv.internal.TelekomTVHandlerFactory}={s
ervice.id=511, service.bundleid=246, service.scope=bundle, component.name=org.openhab.binding.telekomtv.internal.TelekomTVHandlerFactory, component.id=337} - org.openhab.binding.telekomtv
2019-02-11 11:06:01.468 [DEBUG] [org.openhab.binding.telekomtv ] - ServiceEvent REGISTERED - {javax.servlet.http.HttpServlet}={service.id=512, service.bundleid=246, service.scope=bundle, component.name=org.openhab.binding.
telekomtv.internal.handler.TelekomTVNotifyServlet, component.id=338} - org.openhab.binding.telekomtv
2019-02-11 11:06:01.500 [DEBUG] [ernal.handler.TelekomTVNotifyServlet] - TelekomTV: HandlerFactory bound to NotifyServlet
2019-02-11 11:06:01.710 [INFO ] [ernal.handler.TelekomTVNotifyServlet] - TelekomTV: NotifyServlet started at ‘/telekomtv/notify’
2019-02-11 11:06:01.723 [DEBUG] [org.openhab.binding.telekomtv ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.upnp.UpnpDiscoveryParticipant}={service.id=514, service.bundleid=246, service.scope=bundl
e, component.name=org.openhab.binding.telekomtv.internal.discovery.TelekomTVDiscoveryParticipant, component.id=339} - org.openhab.binding.telekomtv
2019-02-11 11:06:01.737 [DEBUG] [covery.TelekomTVDiscoveryParticipant] - TelekomTV: HandlerFactory bound to TelekomTVDiscoveryParticipant
2019-02-11 11:06:01.760 [TRACE] [covery.TelekomTVDiscoveryParticipant] - TelekomTV: Device discovered: Huawei Technologies Co.,Ltd - MR401B
2019-02-11 11:06:01.765 [DEBUG] [covery.TelekomTVDiscoveryParticipant] - TelekomTV: Discovered an Telekom Media Receiver …

nope, upper/lower case will be handled correctl
there should be more lines in the log

I’m afraid I don’t see anything else … Please give me a hint what I should look out for.

"*Unable to process discovered device, UDN=’ means that an exception happened
I see the message in your post, but not in the log, so it can’t be the complete log

  • stop OH and remove the bundle from the addon folder
  • start OH, wait until is fully initialized
  • empty the openhab.log (not deleting it)
  • copy the bundle to the addons folder -> this will cause the bundle to load
  • wait 5 min
  • cut out relevant section from the logfile and post it here

If we are able to reproduce it, I could add some additional debug messages to narrow the problem.

This is how this log was generated. I only put the two lines that I thought to be interesting on top. So the log at the end plus the two lines that I highlighted are the full log.

Maybe we switch to more direct conversation.

I had a look at the code as well. There should really be some more debugging statements in order to identify which part of information could not be dectected during the initialisation. I would be more than happy if I could help finding the problem and support my local open source developer :slight_smile:.