Modul für aktuelle LG-TVs?

Begonnen von oxident, 09 September 2013, 21:38:33

Vorheriges Thema - Nächstes Thema

Pjg

#165
Ja. Habe ich.
Eigentlich 1:1 vom Blog kopiert. Bis auf die ip und da ich keine fritzbix habe, über lan-Ping.

Mein lan-Ping hat ein Intervall von 3600.
also deshalb gab es noch kein Pairing. Ok.

Aber wenn es noch nicht gepairt ist, es dann aber wie
Im log automatisch durchgeführt wird, warum verabschiedet sich
Dann anschließend fhem?
Ich muss das dann immer per Konsole neu starten.
BananaPI, CUL 433, Somfy RTS, Hue LWL001, Hue LWB004, HM-CFG-LAN, HM-LC-SW2-FM

HolyMoly

Ja, irgendwie seltsam. Eigentlich sind die 2012er anspruchsloser was das pairing angeht als die 2011er. Kann allerdings gut sein dass die 2013er wieder restriktiver geworden sind. Schau mal dass du den loglevel/verbose hochdrehst für gesamt fhem und das log postest
FHEM auf Raspi2 & Radxa Rock

Pjg

#167
Ich bekomme es nicht mehr reproduziert.
Das sind mir die liebsten >:(

Sollte es noch einmal auftreten, versuche ich es mit einem ausführlicheren log erneut zu posten.
Im Moment tut es.  :-[

So nun schon wieder. Leider nicht mehr verbose 5 drin gehabt.
LGTV stand im Status aber auf paired. TV lief den ganzen abend. Nun wollte ich das TV über fhem ausschalten, und schon hängt sich fhem wieder auf.
Hier das log:
Nach Pairing succesful ist Ende und ich muß fhem neu starten.

2014.10.30 21:30:00 2: SOMFY set FI_T on: sA84000B8000013
2014.10.31 00:03:03 2: LGTV2012: Now sending command 1
2014.10.31 00:03:03 2: LGTV2012: HandleInput <?xml version="1.0" encoding="utf-8"?><envelope><api type="command"><name>HandleKeyInput</name><value>1</value></api></envelope>
2014.10.31 00:03:03 2: LGTV2012: HTTP/1.1 401 Unauthorized, a command is sent when a Host and a Controller are not paired.
2014.10.31 00:03:03 2: LGTV2012: Pairing request with key 285887 at http://192.168.178.28:8080/udap/api/pairing
2014.10.31 00:03:03 2: LGTV2012: Pairing Successful
2014.10.31 00:06:15 1: Including fhem.cfg
BananaPI, CUL 433, Somfy RTS, Hue LWL001, Hue LWB004, HM-CFG-LAN, HM-LC-SW2-FM

HolyMoly

Brauche leider mehr loglevel, sonst kann ich dir leider nicht helfen.
FHEM auf Raspi2 & Radxa Rock

Pjg

Ich weiß. Problem ist halt, das es sich nicht einfach reproduzieren lässt und ich nicht die ganze Zeit auf Verdacht mein log volllaufen lassen will.
Sobald ich etwas habe, schreibe ich es nochmal hier rein.
Danke.
BananaPI, CUL 433, Somfy RTS, Hue LWL001, Hue LWB004, HM-CFG-LAN, HM-LC-SW2-FM

yetiman

#170
Hallo,

versuche gerade das 2. Mal meinen neuen LG einzubinden.

Definiert habe ich:
define LGTV LGTV2012 192.168.2.29
attr LGTV pairingcode 255

Leider kommt folgender fehler im Log, wenn ich versuche zu pairen.
Ein automatischer Prompt am Fernseher mit dem Pairing Code kam auch nicht.

Die IP ist mit Sicherheit die richtige...wo der Port 8080 weiss ich nicht. Ist das Standard?

2014.11.16 22:35:21 2: LGTV2012: Pairing request with key 255 at http://192.168.2.29:8080/udap/api/pairing
2014.11.16 22:35:21 2: LGTV2012: An unknown error has occured.
2014.11.16 22:35:21 2: LGTV2012: Could not send pairing request.
2014.11.16 22:35:21 2: LGTV2012: TV Response :Can't connect to 192.168.2.29:8080 (Connection refused)

LWP::Protocol::http::Socket: connect: Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 51.

2014.11.16 22:35:21 2: LGTV2012: Now sending command -1
2014.11.16 22:35:21 2: LGTV2012: HandleInput <?xml version="1.0" encoding="utf-8"?><envelope><api type="command"><name>HandleKeyInput</name><value>-1</value></api></envelope>
2014.11.16 22:35:21 2: LGTV2012: An unknown error has occured
2014.11.16 22:35:21 2: LGTV2012: Could not send command.
2014.11.16 22:35:21 2: LGTV2012: TV Response :Can't connect to 192.168.2.29:8080 (Connection refused)

LWP::Protocol::http::Socket: connect: Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 51.



P.S. Meiner wird auch ein 2014 er sein ;-)

HolyMoly

Er scheint gar keine Verbindung mit dem Fernseher hinzubekommen.
Vielleicht hat LG den Port mit der 2014er Serie verändert.
Mach mal einen Portscan von deinem Fernseher uns poste deine Resultate.
FHEM auf Raspi2 & Radxa Rock

yetiman

Hi HolyMoly,

ja, da bin ich jetzt auch ned gleich drauf gekommen:
Hier der Output:

root@fhem:/home/pi# nmap 192.168.2.29

Starting Nmap 6.00 ( http://nmap.org ) at 2014-11-16 23:22 CET
Nmap scan report for LGSmartTV.fritz.box (192.168.2.29)
Host is up (0.00071s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE
1213/tcp open  mpc-lifenet
1900/tcp open  upnp
1974/tcp open  drp
3000/tcp open  ppp
3001/tcp open  nessus
9998/tcp open  distinct32
MAC Address: 3C:CD:93:58:BE:2D (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 2.01 seconds


Ingo

HolyMoly

Kannst mal probieren alle 8080 im Modul durch 9998 zu ersetzen?
Wenn das nicht geht die anderen Ports durchprobieren ;)
FHEM auf Raspi2 & Radxa Rock

HolyMoly

@Ingo
hast du den korrekten Port finden können?
FHEM auf Raspi2 & Radxa Rock

yetiman

Nein, noch nicht...ich probiere nochmal

yetiman

Hallo HolyMoly,

also habe es gerade eben nochmal mit allen Ports probiert - leider ohne Erfolg....

2014.11.29 13:07:53 2: LGTV2012: Pairing request with key 255 at http://192.168.2.29:9998/udap/api/pairing
2014.11.29 13:07:53 2: LGTV2012: HTTP/1.1 404 Not Found, the POST path of a command is incorrect.
2014.11.29 13:07:53 2: LGTV2012: Could not send pairing request.
2014.11.29 13:07:53 2: LGTV2012: TV Response :
2014.11.29 13:07:53 2: LGTV2012: Now sending command -1
2014.11.29 13:07:53 2: LGTV2012: HandleInput <?xml version="1.0" encoding="utf-8"?><envelope><api type="command"><name>HandleKeyInput</name><value>-1</value></api></envelope>
2014.11.29 13:07:53 2: LGTV2012: HTTP/1.1 404 Not Found, the POST path of a command is incorrect.
2014.11.29 13:07:53 2: LGTV2012: Could not send command.
2014.11.29 13:07:53 2: LGTV2012: TV Response :


Habe gerade keine Ideen mehr ;-(

Ingo

HolyMoly

Hmm vielleicht hat LG bei den 2014ern den Pfad verändert aber der Port schaut gut aus.
was bekommst du auf ein:
curl ipadress:9998
zurück?
FHEM auf Raspi2 & Radxa Rock

yetiman

Das hier:

root@fhem:/home/pi# curl 192.168.2.29:9998
<!DOCTYPE html>
<html><head>
<script type="text/javascript">
function createPageList() {
    var xhr = new XMLHttpRequest;
    xhr.open("GET", "/pagelist.json");
    xhr.onload = function(e) {
        if (xhr.status == 200) {
            var pages = JSON.parse(xhr.responseText);
            if (pages.length)
                document.getElementById("noPageNotice").style.display = "none";

            var pageList = document.createElement("ol");
            for (var i in pages) {
                var link = document.createElement("a");
                var title = pages[i].title ? pages[i].title : ("Page " + (Number(pages[i].id)));
                var url = pages[i].url;
                link.appendChild(document.createTextNode(title + (url ? (" [" + url + "]") : "" )));
                link.setAttribute("href", pages[i].inspectorUrl);
                var pageListItem = document.createElement("li");
                pageListItem.appendChild(link);
                pageList.appendChild(pageListItem);
            }
            document.body.appendChild(pageList);
        }
    };
    xhr.send();
}

document.addEventListener("DOMContentLoaded", createPageList, false);
</script>
</head><body>
<h1>Inspectable web views</h1>
<p id="noPageNotice" style="color:grey">None found, make sure that you have set the developerExtrasEnabled preference property on your WebView.</p>
</body></html>

HolyMoly

und curl 192.168.2.29:9998/pagelist.json
FHEM auf Raspi2 & Radxa Rock