markus7017
(Markus Michels)
March 4, 2018, 7:26pm
1
This is a binding for the Telekom MegentaTV receiver (aka Entertain ). It supports
controlling the receiver by sending key codes
receive program information and play status from the receiver
Those functions could be used to send commands and visualize the status. OH rules offer more opportunities to trigger events etc.
Check out the repo
You may need to install UPnP support by running
feature:install openhab-transport-upnp
on the openHAB console.
Any feature requests welcome - you could also open an Issue on GitHub or send me a PM.
Looking forward to any feedback.
6 Likes
hmerk
(Hans-Jörg Merk)
March 4, 2018, 9:00pm
2
If you are talking about the 4xx series of receivers, yes, would be interested.
markus7017
(Markus Michels)
March 4, 2018, 10:06pm
3
yep, I have a MR400, series 3 will not be supported
hmerk
(Hans-Jörg Merk)
March 4, 2018, 10:16pm
4
Great, in the meantime, I would be interested in you bash script
markus7017
(Markus Michels)
March 5, 2018, 7:46am
5
this can be found here: https://github.com/markus7017/EntertainTV_Control
make sure to change
remote_ip="192.168.0.1"
remote_mac="AA:BB:CC:DD:EE:FF"
and install the proper packages (nc, md5sum, wakeonlan).
The receiver has to be set to standard standby mode. If it’s off the scripts sends a wakeonlan and then PINGs until it comes up before trying to do a pairing. That’s one thing I want to work on and be able to safely detect the power status, because the Power button is a toggle, which means you have to know the power status, before pressing Power and the receiver goes off even you want to send commands.
1 Like
hmerk
(Hans-Jörg Merk)
March 5, 2018, 10:03pm
6
Thanks Markus, I will give it a try
hmerk
(Hans-Jörg Merk)
March 5, 2018, 10:45pm
7
Hi Markus,
I just get
Pairing request failed: -2
Any idea what could be the reason ? IP and MAC are set properly.
MHerbst
(Martin Herbst)
March 6, 2018, 5:11pm
8
I am definitely interested and can offer to help testing a binding.
markus7017
(Markus Michels)
March 6, 2018, 6:49pm
9
Good to know, give me some time to get up to speed.
First I would like to get the script running with your setup. This might provide some additional information useful for the binding dev. I’ll come back latest at the weekend with some more information.
MHerbst
(Martin Herbst)
March 6, 2018, 6:51pm
10
Sounds good, will try the shell script this weekend.
markus7017
(Markus Michels)
March 6, 2018, 7:24pm
11
soap_pair.xml and request_pair.log should be created while running the script. could you please provide them, what’s about screen output
-2 could be a file not found
Please make sure
curl, nc, wakeonlan, md5sum, awk, grep, tr are installed
to create a tmp sub-folder. Logs and temporary xml files go there.
Try to run
./entertain_control.sh log status
hmerk
(Hans-Jörg Merk)
March 6, 2018, 8:32pm
12
Thanks for your response.
Screen output :
Telekom Entertain Control
:49154 -> 192.168.0.55:49152; local MAC=
nc: Address already in use
Send pairing request (pairingDeviceID='D41D8CD98F00B204E9800998ECF8427E', friendlyName='oh-pi', userID='5903A68E8E31CF7EFC9718C635FC037D')
Result=-2
Pairing request failed: -2
OFFsult>-2</result>
soap_pair.xml
<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">
<pairingDeviceID>D41D8CD98F00B204E9800998ECF8427E</pairingDeviceID>
<friendlyName>oh-pi</friendlyName>
<userID>5903A68E8E31CF7EFC9718C635FC037D</userID>
</u:X-pairingRequest>
</s:Body></s:Envelope>
request_pair.log
<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">
<result>-2</result>
</u:X-pairingRequestResponse>
</s:Body> </s:Envelope>
log status output
Telekom Entertain Control
:49154 -> 192.168.0.55:49152; local MAC=
Receiver is powered ON
ON
markus7017
(Markus Michels)
March 6, 2018, 10:37pm
13
The script is unable to detected the local ip / mac address.
which environment are you using?
Raspbian, macOS…?
Please try
ip link show eth0
and
ifconfig en0
one of them should work.
what does
uname
show?
hmerk
(Hans-Jörg Merk)
March 7, 2018, 6:51pm
14
I am running Ubuntu 16.04 LTS server on an Intel NUC.
This system does not have eth0 but enp3s0 as primary network interface.
markus7017
(Markus Michels)
March 7, 2018, 7:54pm
15
we could fiddel around that later
as a work around:
open the script and search for “function get_mac”
set ip_addr to your local IP address and mac_addr to your local MAC address
at the end of the function:
local_ip="192.168.x.x"
mac_addr=“xx:xx:xx:xx:xx:xx”
run “./entertain_control.sh log status”
please also run the commands above and send the output
hmerk
(Hans-Jörg Merk)
March 7, 2018, 9:02pm
16
ip link show eth0
Device "eth0" does not exist
ifconfig en0
en0: Fehler beim Auslesen der Schnittstelleninformation: Gerät nicht gefunden
uname
Linux
Setting IP and MAC manually like you suggested does not change the result.
entertain_control.sh log status
Telekom Entertain Control
192.168.0.112:49154 -> 192.168.0.58:49152; local MAC=B8:AE:ED:70:16:25
Receiver is powered ON
ON
markus7017
(Markus Michels)
March 7, 2018, 9:10pm
17
ok, now try
./entertain_control.sh log on
./entertain_control.sh log off
and provide output from
ifconfig enp3s0
ip link show enp3s0
hmerk
(Hans-Jörg Merk)
March 8, 2018, 6:32pm
18
./entertain_control.sh log on
Telekom Entertain Control
192.168.0.112:49154 -> 192.168.0.58:49152; local MAC=B8:AE:ED:70:16:25
nc: Address already in use
Send pairing request (pairingDeviceID='ADA7A411BB1FD7A406F0AACE1C840A7E', friendlyName='oh-pi', userID='5903A68E8E31CF7EFC9718C635FC037D')
Result=-2
Pairing request failed: -2
OFFsult>-2</result>
./entertain_control.sh log off
Telekom Entertain Control
192.168.0.112:49154 -> 192.168.0.58:49152; local MAC=B8:AE:ED:70:16:25
nc: Address already in use
Send pairing request (pairingDeviceID='ADA7A411BB1FD7A406F0AACE1C840A7E', friendlyName='oh-pi', userID='5903A68E8E31CF7EFC9718C635FC037D')
Result=-2
Pairing request failed: -2
Press Power/result>
Send key '0x0100'
Result=
OFF
ifconfig enp3s0
enp3s0 Link encap:Ethernet Hardware Adresse b8:ae:ed:70:16:25
inet Adresse:192.168.0.112 Bcast:192.168.0.255 Maske:255.255.255.0
inet6-Adresse: fe80::baae:edff:fe70:1625/64 Gültigkeitsbereich:Verbindung
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX-Pakete:40913666 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
TX-Pakete:28189254 Fehler:0 Verloren:0 Überläufe:0 Träger:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX-Bytes:26962718005 (26.9 GB) TX-Bytes:3224939340 (3.2 GB)
ip link show enp3s0
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:ae:ed:70:16:25 brd ff:ff:ff:ff:ff:ff
markus7017
(Markus Michels)
March 8, 2018, 7:07pm
19
is curl installed?
please post request_pair.log
hmerk
(Hans-Jörg Merk)
March 8, 2018, 7:18pm
20
Hi Markus,
yes, curl is installed and working
request_pair.log
<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">
<result>-2</result>
</u:X-pairingRequestResponse>
</s:Body> </s:Envelope>
Thanks for your support