MagentaTV Binding for Deutsche Telekom MR 4xx

OK. Only the MR200 is online. Have been with the remote control some commands.

2018-11-01 19:39:36.657 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ’ s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body>
2018-11-01 19:39:36.690 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:45839/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:39:36.691 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: Pairing code ‘B773A113’ received for deviceID ‘C31289A920EB3FB5A22FD2CB6C5CF4AD’
2018-11-01 19:39:37.962 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Synology - DS213j
2018-11-01 19:39:37.963 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Synology - DS213j
2018-11-01 19:39:38.268 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Royal Philips Electronics - Philips hue bridge 2015
2018-11-01 19:39:38.489 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Samsung Electronics - UE40F6400
2018-11-01 19:39:38.533 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Samsung Electronics - UE40F6400
2018-11-01 19:39:38.597 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Samsung Electronics - UE40F6400
2018-11-01 19:39:38.904 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Samsung Electronics - UE40F6400
2018-11-01 19:39:39.130 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: AVM Berlin - FRITZ!Box Fon WLAN 7390
2018-11-01 19:39:39.131 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: AVM Berlin - FRITZ!Box Fon WLAN 7390
2018-11-01 19:39:39.844 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Sonos, Inc. - Sonos Play:5
2018-11-01 19:39:40.072 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Sonos, Inc. - Sonos Play:5
2018-11-01 19:39:40.154 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Huawei Technologies Co.,Ltd - dmr_tpb
2018-11-01 19:39:40.207 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Sonos, Inc. - Sonos Play:5
2018-11-01 19:39:40.573 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Huawei Technologies Co.,Ltd - dmr_tpb
2018-11-01 19:39:40.629 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Sonos, Inc. - Sonos Play:5
2018-11-01 19:39:40.635 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Huawei Technologies Co.,Ltd - dms_tpb
2018-11-01 19:39:40.970 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: Huawei Technologies Co.,Ltd - dms_tpb
2018-11-01 19:39:41.033 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: AVM Berlin - FRITZ!Box Fon WLAN 7390
2018-11-01 19:39:41.081 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: AVM Berlin - FRITZ!Box Fon WLAN 7390
2018-11-01 19:39:41.087 [TRACE] [very.EntertainTVDiscoveryParticipant] - EntertainTV: Device discovered: AVM Berlin - FRITZ!Box Fon WLAN 7390

018-11-01 19:48:09.129 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47284/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:09.130 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
2018-11-01 19:48:09.931 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47286/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:09.932 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
2018-11-01 19:48:10.013 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47289/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:10.014 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
2018-11-01 19:48:13.223 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47301/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:13.224 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
2018-11-01 19:48:13.248 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47304/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:13.248 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
2018-11-01 19:48:31.413 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47350/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:31.414 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
2018-11-01 19:48:31.517 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.153:47353/entertaintv/notify (172.17.2.153, HTTP/1.1)
2018-11-01 19:48:31.519 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:

018-11-01 19:43:18.079 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘VOLDOWN’ (keyCode=‘0x0104’)
2018-11-01 19:43:18.079 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0104’, terminalid=‘C31289A920EB3FB5A22FD2CB6C5CF4AD’, pairingCode=‘B773A113’, verificationCode=‘56015BE7F069DE67A54626F4C6ABFB99’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-01 19:43:18.943 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘VOLDOWN’ (keyCode=‘0x0104’)
2018-11-01 19:43:18.944 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0104’, terminalid=‘C31289A920EB3FB5A22FD2CB6C5CF4AD’, pairingCode=‘B773A113’, verificationCode=‘56015BE7F069DE67A54626F4C6ABFB99’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-01 19:43:23.352 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘EPG’ (keyCode=‘0x0111’)
2018-11-01 19:43:23.352 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0111’, terminalid=‘C31289A920EB3FB5A22FD2CB6C5CF4AD’, pairingCode=‘B773A113’, verificationCode=‘56015BE7F069DE67A54626F4C6ABFB99’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-01 19:45:36.570 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: Sending data to ‘172.17.2.153:49152’: 'SUBSCRIBE /upnp/service/X-CTC_RemotePairing/Event HTTP/1.1
2018-11-01 19:50:37.070 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: Sending data to ‘172.17.2.153:49152’: 'SUBSCRIBE /upnp/service/X-CTC_RemotePairing/Event HTTP/1.1
2018-11-01 19:50:37.580 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Pairing Request (firendlyName=‘PAD:openHAB’, deviceID=‘C31289A920EB3FB5A22FD2CB6C5CF4AD’, userID=‘F596BE6D59771930308A9F5D4879DB85’)

an updated build is online
https://github.com/markus7017/org.openhab.binding.entertaintv/blob/beta1/target/org.openhab.binding.entertaintv-2.4.0-SNAPSHOT.jar

  • json fix for mr201
  • set User-Agent on http POSTs

As mentioned in my previous post under What I tried so far I already cleared the openHAB cache.

Any other idea? :frowning:

As I wrote earlier, you can not use this Binding with Media Receivers other than 4xx series. Communication protocol with the old receiver is completely different.
AFAIK, EntertainRC app does not support MR4xx series.

Great, looks a lot better.
Unfortunately, I still can not switch anything.

We still have a problem with the MR400 and I also think MR200. From the trace the pairing looks good, but we noticed that the MR400 doesn’t display a connected message when the binding was started, whereas it does when the App connects. So something must be wrong at the end of pairing. Therefore the subsequent SendKey are sent, but not executed,

Ahhh got it, ok, thank you.

Unfortunately it looks worse now. Now there is no more info in openhab

Please don’t post logs as pictures. Copy them out of the logfile and post them in code fences here.
It is very hard to read your screenshot.

agree

@weralthoff just copy&paste the text information or send me the log as personal message to markus7017

worse is reletive, because now I know what’s getting wrong

  • the discovery reports a unique device id for the MR
  • the pairing response has a unique pairingDeviceID
  • and the event comes in with the MAC address of the receiver

currently the binding compares the MAC with the pairingDeviceID, which doesn’t work and due to a “bug” it always took entry 1 in the device list.

I could fix it by getting the MAC from the UDN (last 12 digits) and us this with the MAC in the event.

Thanks for testing and feedback.

Last, but not least we need to work on the MR400/MR200 compatibility, see post above EntertainTV / MagentaTV Binding
@ibot1989 is supporting here, so I expect a solution next week.

ok here is the log file

I updated the build and I’m optimistic that this fixes the problem. At least with one MR it worked as expected (correct device lockup back MAC address).

https://github.com/markus7017/org.openhab.binding.entertaintv/blob/beta1/target/org.openhab.binding.entertaintv-2.4.0-SNAPSHOT.jar

1 Like

Now only the MR400 active. Now get back info in OH displayed. Can not switch anything.

2018-11-02 19:34:46.885 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: SUBSCRIBE returned Server OS: ‘Linux/ UPnP/1.0 HUAWEI_iCOS/iCOS V1R1C00’
2018-11-02 19:34:46.885 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: SUBSCRIBE returned User-Agent: ’ redsonic’
2018-11-02 19:34:46.886 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: SUBSCRIBE returned SID ‘f9185ac0-1dd1-11b2-bb06-8964e25cba05’
2018-11-02 19:35:43.896 [WARN ] [arketplace.internal.MarketplaceProxy] - Failed downloading Marketplace entries: : Received fatal alert: handshake_failure
2018-11-02 19:35:43.896 [WARN ] [arketplace.internal.MarketplaceProxy] - Retrying again in a minute
2018-11-02 19:36:44.170 [WARN ] [arketplace.internal.MarketplaceProxy] - Failed downloading Marketplace entries: : Received fatal alert: handshake_failure
2018-11-02 19:36:44.171 [WARN ] [arketplace.internal.MarketplaceProxy] - Retrying again in a minute
2018-11-02 19:36:46.374 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: Renew pairing
2018-11-02 19:36:46.374 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Pairing Request (firendlyName=‘PAD:openHAB’, deviceID=‘B2C675A6EBF2FA4C48BE377829A6981F’, userID=‘F596BE6D59771930308A9F5D4879DB85’)
2018-11-02 19:36:46.375 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemotePairing/Control’ - SoapAction=’<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:X-pairingRequest xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemotePairing:1”>B2C675A6EBF2FA4C48BE377829A6981FPAD:openHABF596BE6D59771930308A9F5D4879DB85</u:X-pairingRequest></s:Body></s:Envelope>’, Data = ‘“urn:schemas-upnp-org:service:X-CTC_RemotePairing:1#X-pairingRequest”’
2018-11-02 19:36:46.385 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemotePairing/Control’ - Response = ‘<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body>
<u:X-pairingRequestResponse xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemotePairing:1”>
0
</u:X-pairingRequestResponse>
</s:Body> </s:Envelope>’
2018-11-02 19:36:46.385 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: Pairing initiated.
2018-11-02 19:36:46.395 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.152:48525/entertaintv/notify (172.17.2.152, HTTP/1.1)
2018-11-02 19:36:46.396 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: Pairing code ‘0C674818’ received for deviceID ‘B2C675A6EBF2FA4C48BE377829A6981F’
2018-11-02 19:36:46.397 [DEBUG] [ertaintv.internal.EntertainTVControl] - verificationCode: Input=‘0C674818B2C675A6EBF2FA4C48BE377829A6981FF596BE6D59771930308A9F5D4879DB85’, code=‘203CD544EAB5BA179BD1C6C9C852CDD2’
2018-11-02 19:36:46.397 [INFO ] [.internal.handler.EntertainTVHandler] - EntertainTV: Pairing complete for ‘DMS_172.17.2.152’ (UDN ‘BB5E21CE-2222-11B2-F918-AC6FBB3E1151’, terminalID ‘B2C675A6EBF2FA4C48BE377829A6981F’, pairingCode=‘0C674818’, verificationCode=‘203CD544EAB5BA179BD1C6C9C852CDD2’, userID=‘F596BE6D59771930308A9F5D4879DB85’)
2018-11-02 19:37:44.453 [WARN ] [arketplace.internal.MarketplaceProxy] - Failed downloading Marketplace entries: : Received fatal alert: handshake_failure
2018-11-02 19:37:44.454 [WARN ] [arketplace.internal.MarketplaceProxy] - Retrying again in a minute
2018-11-02 19:38:37.863 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.152:48808/entertaintv/notify (172.17.2.152, HTTP/1.1)
2018-11-02 19:38:37.864 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
<e:propertyset xmlns:e=“urn:schemas-upnp-org:event-1-0”>
<e:property>
<STB_playContent>{“new_play_mode”:4,“playBackState”:1,“mediaType”:1,“trickPlayMode”:0,“mediaCode”:“3665”}</STB_playContent>
</e:property>
<e:property>
<STB_Mac>AC6FBB3E1151</STB_Mac>
</e:property>
</e:propertyset>

2018-11-02 19:38:37.864 [TRACE] [v.internal.EntertainTVHandlerFactory] - EntertainTV.Event: Event for MAC ‘AC6FBB3E1151’, JSON=’{“new_play_mode”:4,“playBackState”:1,“mediaType”:1,“trickPlayMode”:0,“mediaCode”:“3665”}’
2018-11-02 19:38:37.864 [TRACE] [.internal.handler.EntertainTVHandler] - EntertainTV: process event, json=’{“new_play_mode”:4,“playBackState”:1,“mediaType”:1,“trickPlayMode”:0,“mediaCode”:“3665”}’
2018-11-02 19:38:37.865 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: STB event playContent: playMode=playing (MC), duration=-1, playPosition=-1
2018-11-02 19:38:37.922 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTVServlet: Reqeust from 172.17.2.152:48810/entertaintv/notify (172.17.2.152, HTTP/1.1)
2018-11-02 19:38:37.922 [TRACE] [tv.internal.EntertainTVNotifyServlet] - EntertainTV.Notify: STB status:
<e:propertyset xmlns:e=“urn:schemas-upnp-org:event-1-0”>
<e:property>
<STB_EitChanged>{“type”:“EVENT_EIT_CHANGE”,“instance_id”:3,“channel_code”:“374”,“channel_num”:5,“mediaId”:“3665”,“program_info”:[{“event_id”:20379,“start_time”:“2018/11/02 18:04:07”,“duration”:“01:10:08”,“running_status”:4,“free_CA_mode”:0,“short_event”:[{“language_code”:“DEU”,“event_name”:“Galileo”,“text_char”:“Thema u. a.: Airbag fürs Handy, Information, D 2018”}]},{“event_id”:20380,“start_time”:“2018/11/02 19:14:15”,“duration”:“02:47:33”,“running_status”:1,“free_CA_mode”:0,“short_event”:[{“language_code”:“DEU”,“event_name”:“Jack Reacher”,“text_char”:“Action, USA 2012”}]}]}</STB_EitChanged>
</e:property>
<e:property>
<STB_Mac>AC6FBB3E1151</STB_Mac>
</e:property>
</e:propertyset>

2018-11-02 19:38:37.922 [TRACE] [v.internal.EntertainTVHandlerFactory] - EntertainTV.Event: Event for MAC ‘AC6FBB3E1151’, JSON=’{“type”:“EVENT_EIT_CHANGE”,“instance_id”:3,“channel_code”:“374”,“channel_num”:5,“mediaId”:“3665”,“program_info”:[{“event_id”:20379,“start_time”:“2018/11/02 18:04:07”,“duration”:“01:10:08”,“running_status”:4,“free_CA_mode”:0,“short_event”:[{“language_code”:“DEU”,“event_name”:“Galileo”,“text_char”:“Thema u. a.: Airbag fürs Handy, Information, D 2018”}]},{“event_id”:20380,“start_time”:“2018/11/02 19:14:15”,“duration”:“02:47:33”,“running_status”:1,“free_CA_mode”:0,“short_event”:[{“language_code”:“DEU”,“event_name”:“Jack Reacher”,“text_char”:“Action, USA 2012”}]}]}’
2018-11-02 19:38:37.923 [TRACE] [.internal.handler.EntertainTVHandler] - EntertainTV: process event, json=’{“type”:“EVENT_EIT_CHANGE”,“instance_id”:3,“channel_code”:“374”,“channel_num”:5,“mediaId”:“3665”,“program_info”:[{“event_id”:20379,“start_time”:“2018/11/02 18:04:07”,“duration”:“01:10:08”,“running_status”:4,“free_CA_mode”:0,“short_event”:[{“language_code”:“DEU”,“event_name”:“Galileo”,“text_char”:“Thema u. a.: Airbag fürs Handy, Information, D 2018”}]},{“event_id”:20380,“start_time”:“2018/11/02 19:14:15”,“duration”:“02:47:33”,“running_status”:1,“free_CA_mode”:0,“short_event”:[{“language_code”:“DEU”,“event_name”:“Jack Reacher”,“text_char”:“Action, USA 2012”}]}]}’
2018-11-02 19:38:37.923 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: EVENT_EIT_CHANGE for channel 5/374
2018-11-02 19:38:37.924 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: Info for channel 5 / 374 - running ‘Galileo’.‘Thema u. a.: Airbag fürs Handy, Information, D 2018’, start time=2018/11/02 18:04:07, duration=01:10:08
2018-11-02 19:38:37.925 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: Info for channel 5 / 374 - stopped ‘Jack Reacher’.‘Action, USA 2012’, start time=2018/11/02 19:14:15, duration=02:47:33
2018-11-02 19:38:44.735 [WARN ] [arketplace.internal.MarketplaceProxy] - Failed downloading Marketplace entries: : Received fatal alert: handshake_failure
2018-11-02 19:38:44.736 [WARN ] [arketplace.internal.MarketplaceProxy] - Retrying again in a minute
2018-11-02 19:39:23.541 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘CHUP’ (keyCode=‘0x0101’)
2018-11-02 19:39:23.542 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0101’
2018-11-02 19:39:23.543 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey terminalid=‘B2C675A6EBF2FA4C48BE377829A6981F’, pairingCode=‘0C674818’, verificationCode=‘203CD544EAB5BA179BD1C6C9C852CDD2’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-02 19:39:23.543 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - SoapAction=’<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:X_CTC_RemoteKey xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”>0keyCode=0x0101^B2C675A6EBF2FA4C48BE377829A6981F:203CD544EAB5BA179BD1C6C9C852CDD2^userID:F596BE6D59771930308A9F5D4879DB85</u:X_CTC_RemoteKey></s:Body></s:Envelope>’, Data = ‘“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1#X_CTC_RemoteKey”’
2018-11-02 19:39:23.672 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - Response = ‘<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body>
<u:X_CTC_RemoteKeyResponse xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”></u:X_CTC_RemoteKeyResponse>
</s:Body> </s:Envelope>’
2018-11-02 19:39:24.482 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘CHUP’ (keyCode=‘0x0101’)
2018-11-02 19:39:24.483 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0101’
2018-11-02 19:39:24.483 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey terminalid=‘B2C675A6EBF2FA4C48BE377829A6981F’, pairingCode=‘0C674818’, verificationCode=‘203CD544EAB5BA179BD1C6C9C852CDD2’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-02 19:39:24.483 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - SoapAction=’<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:X_CTC_RemoteKey xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”>0keyCode=0x0101^B2C675A6EBF2FA4C48BE377829A6981F:203CD544EAB5BA179BD1C6C9C852CDD2^userID:F596BE6D59771930308A9F5D4879DB85</u:X_CTC_RemoteKey></s:Body></s:Envelope>’, Data = ‘“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1#X_CTC_RemoteKey”’
2018-11-02 19:39:24.491 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - Response = ‘<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body>
<u:X_CTC_RemoteKeyResponse xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”></u:X_CTC_RemoteKeyResponse>
</s:Body> </s:Envelope>’
2018-11-02 19:39:26.250 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘CHUP’ (keyCode=‘0x0101’)
2018-11-02 19:39:26.251 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0101’
2018-11-02 19:39:26.251 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey terminalid=‘B2C675A6EBF2FA4C48BE377829A6981F’, pairingCode=‘0C674818’, verificationCode=‘203CD544EAB5BA179BD1C6C9C852CDD2’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-02 19:39:26.252 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - SoapAction=’<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:X_CTC_RemoteKey xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”>0keyCode=0x0101^B2C675A6EBF2FA4C48BE377829A6981F:203CD544EAB5BA179BD1C6C9C852CDD2^userID:F596BE6D59771930308A9F5D4879DB85</u:X_CTC_RemoteKey></s:Body></s:Envelope>’, Data = ‘“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1#X_CTC_RemoteKey”’
2018-11-02 19:39:26.261 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - Response = ‘<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body>
<u:X_CTC_RemoteKeyResponse xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”></u:X_CTC_RemoteKeyResponse>
</s:Body> </s:Envelope>’
2018-11-02 19:39:45.013 [WARN ] [arketplace.internal.MarketplaceProxy] - Failed downloading Marketplace entries: : Received fatal alert: handshake_failure
2018-11-02 19:39:45.014 [WARN ] [arketplace.internal.MarketplaceProxy] - Retrying again in a minute
2018-11-02 19:39:46.877 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: Check receiver status
2018-11-02 19:39:46.878 [DEBUG] [.internal.handler.EntertainTVHandler] - EntertainTV: Renew MR event subscription
2018-11-02 19:39:46.878 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: Subscribe Paring Channel (172.17.2.152:49152)
2018-11-02 19:39:46.879 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: Sending data to ‘172.17.2.152:49152’: 'SUBSCRIBE /upnp/service/X-CTC_RemotePairing/Event HTTP/1.1
HOST: 172.17.2.152:49152
CALLBACK: http://172.17.2.100:8080/entertaintv/notify
NT: upnp:event
TIMEOUT: Second-300
CONNECTION: close


2018-11-02 19:39:47.387 [TRACE] [ertaintv.internal.EntertainTVNetwork] - receiver response='HTTP/1.1 200 OK
DATE: Fri, 02 Nov 2018 18:39:46 GMT
SERVER: Linux/ UPnP/1.0 HUAWEI_iCOS/iCOS V1R1C00
CONTENT-LENGTH: 0
X-User-Agent: redsonic
SID: uuid:ac346e28-1dd1-11b2-bb07-8964e25cba05
TIMEOUT: Second-300
CONNECTION: close


2018-11-02 19:39:47.388 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: SUBSCRIBE returned Server OS: ‘Linux/ UPnP/1.0 HUAWEI_iCOS/iCOS V1R1C00’
2018-11-02 19:39:47.388 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: SUBSCRIBE returned User-Agent: ’ redsonic’
2018-11-02 19:39:47.389 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: SUBSCRIBE returned SID ‘ac346e28-1dd1-11b2-bb07-8964e25cba05’
2018-11-02 19:40:32.695 [INFO ] [ertaintv.internal.EntertainTVControl] - EntertainTVControl: Send Key ‘CHUP’ (keyCode=‘0x0101’)
2018-11-02 19:40:32.696 [DEBUG] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey keyCode=‘0x0101’
2018-11-02 19:40:32.697 [TRACE] [ertaintv.internal.EntertainTVControl] - EntertainTV: sendKey terminalid=‘B2C675A6EBF2FA4C48BE377829A6981F’, pairingCode=‘0C674818’, verificationCode=‘203CD544EAB5BA179BD1C6C9C852CDD2’, userId=F596BE6D59771930308A9F5D4879DB85’
2018-11-02 19:40:32.697 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - SoapAction=’<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body><u:X_CTC_RemoteKey xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”>0keyCode=0x0101^B2C675A6EBF2FA4C48BE377829A6981F:203CD544EAB5BA179BD1C6C9C852CDD2^userID:F596BE6D59771930308A9F5D4879DB85</u:X_CTC_RemoteKey></s:Body></s:Envelope>’, Data = ‘“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1#X_CTC_RemoteKey”’
2018-11-02 19:40:32.705 [TRACE] [ertaintv.internal.EntertainTVNetwork] - EntertainTVNetwork: POST ‘http://172.17.2.152:49152/upnp/service/X-CTC_RemoteControl/Control’ - Response = ‘<s:Envelope xmlns:s=“http://schemas.xmlsoap.org/soap/envelope/” s:encodingStyle=“http://schemas.xmlsoap.org/soap/encoding/”><s:Body>
<u:X_CTC_RemoteKeyResponse xmlns:u=“urn:schemas-upnp-org:service:X-CTC_RemoteControl:1”></u:X_CTC_RemoteKeyResponse>
</s:Body> </s:Envelope>’
2018-11-02 19:40:45.292 [WARN ] [arketplace.internal.MarketplaceProxy] - Failed downloading Marketplace entries: : Received fatal alert: handshake_failure
2018-11-02 19:40:45.293 [WARN ] [arketplace.internal.MarketplaceProxy] - Retrying again in a minute

what I see:

  • pairing works
  • play event works
  • proram event works

as states send-key is not yet working with mr400 and mr200, that’s on the list for next week

MR401 and MR201 should now work including event processing and sending keys

Here to view the current state. Incidentally, I noticed that not the current program info is displayed, but the follow-up broadcast. Currently the 172.17.2.153 shows no current information after a certain time. So about 2 miniutes.


I’m optimistic that I found the SendKey problem with MR400/MR200. While reviewing the original bash script and the binding implementation I notice that there was one call missing to verify the pairing result. It seems that MR401/MR201 don’t require that, but has a good chance that the MR400/200 sees that as "pairing successfully completed“.

org.openhab.binding.entertaintv-2.4.0-SNAPSHOT.jar.pdf (174.4 KB)

I also reworked the device dispatcher for pairing and events. This should now support multiple MRs.

I also reworked the recovery handling.

  • Periodically renew the event channel subscription and re-connect if necessary
  • Periodically verify the pairing and re-pair if necessary
  • Re-connect on SendKey if thing is offline

You noted “re-worked”, so I need more time for testing to catch the various scenarios and make it robust. However, I’m very interested to hear if we beat the MR400/MR200.

  • Add the MR400, check for initialization, SendKey, events
  • than add another MR
  • change channels on both MRs and check if the event information is displayed properly
1 Like

SUPER. I first activated the MR400 alone, and it can be controlled. Great job.
Have then added the MR200. This is displayed.
Unfortunately, I can not continue testing with the MR200 at the moment. My wife uses that right now.

I know those handicaps😎 That‘s good news!!
to magen expectation: that is an as-is build, I need to do some more work on ehe recovery handling to make it consistent

The on/off topic is still open: Currently I didn‘t found a way to identify the power on/off status if the receiver is connected to the network. In this situation it accepts the requests even when in suspend mode or off. PING doesn‘t work at all with 401/201, http request will be answered, but I found nothing so far giving me the disllay status. So when you send a power button from a rule/scene you could turn if off while you want to start watching and vice versa.
Any idea welcome.

One note on MagentaTV.

  • They made the portal the default start screen, which means that you need to go to the TV icon and press OK. The TV button on rhe remote doesn‘t do that job nor dis I saw ankey code for a TV button in the Huawei spec. This also means you need the physical remote ro start watching TV even you like to use only the mobile with a HABpanel oder the OH App - Telekom: that‘s bad!
  • If the UI displa a system dialog the OH doesn‘t work either. You need the physical remote to close those dialogs before the OH remote continues to work. Not nice, but is’s not a drama