Protocol is described here: https://www.domoticz.com/wiki/LG_2012_smart_tv however the 2011 tv must use 'hdcp' iso 'roap' See: https://community.home-assistant.io/t/w ... ote/188/10
I create a connection:
Code: Select all
self.connection = Domoticz.Connection(Name="LG_TCP", Transport="TCP/IP", Protocol="HTTP", Address=Parameters["Address"], Port=Parameters["Port"])
Code: Select all
self.headers = {"Content-Type": "application/atom+xml"}
reqKey = "<auth><type>AuthKeyReq</type></auth>"
self.connection.Send(Message=reqKey, URL="/hdcp/api/auth", Verb="POST", Headers=self.headers)
When using a script (python 2.7) with following code:
Code: Select all
headers = {"Content-Type": "application/atom+xml"}
conn = httplib.HTTPConnection( "192.168.13.15", port=8080)
reqKey = "<auth><type>AuthKeyReq</type></auth>"
conn.request("POST", "/hdcp/api/auth", reqKey, headers=headers)
httpResponse = conn.getresponse()
if httpResponse.reason != "OK" :
print 'Failed'
It shows the pairing key. I don't see any differences between the two. What am I doing wrong?
When starting it in debug mode logging report:
Code: Select all
2017-07-02 21:55:56.874 Error: CPlugin:CConnection_init, unable to find module for current interpreter.
2017-07-02 21:55:56.874 Error: CConnection_connect:, illegal operation, Plugin has not started yet.