Active Topics

 



Notices


Reply
Thread Tools
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#11
Originally Posted by xes View Post
Do you think that this tool could be used to control an LG smart tv?

Example of commands:
https://github.com/ubaransel/lgcommander

http://harizanov.com/2013/12/control...-raspberry-pi/
I've written a test remote for the LG smart TV: https://github.com/marxoft/multimote...otes/lgsmarttv

It requires MultiMote 0.0.2 (in autobuilder queue). The test remote allows you to perform the steps in the Python script (get IP address, display pairing key, get session id, send command to TV). I don't have access to a TV, so I cannot test. If it works, I can provide a proper UI to implement the full command list.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 5 Users Say Thank You to marxian For This Useful Post:
Posts: 638 | Thanked: 1,692 times | Joined on Aug 2009
#12
Originally Posted by marxian View Post
I've written a test remote for the LG smart TV: https://github.com/marxoft/multimote...otes/lgsmarttv

It requires MultiMote 0.0.2 (in autobuilder queue). The test remote allows you to perform the steps in the Python script (get IP address, display pairing key, get session id, send command to TV). I don't have access to a TV, so I cannot test. If it works, I can provide a proper UI to implement the full command list.
Hey!! Thank you!
..i have just tried the lg remote but the ip detection returns "Network unreachable".
Do you think it could be possible to have a verbose output?
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#13
Originally Posted by xes View Post
Hey!! Thank you!
..i have just tried the lg remote but the ip detection returns "Network unreachable".
Do you think it could be possible to have a verbose output?
I didn't RTFM about discovering UPnP services. I need to use a UDP socket to get the IP address. I'm testing now, and I'll report back when I have something working.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 2 Users Say Thank You to marxian For This Useful Post:
Posts: 638 | Thanked: 1,692 times | Joined on Aug 2009
#14
 

The Following User Says Thank You to xes For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#15
Originally Posted by xes View Post
i have found some interesting example for the Roku player:

https://gist.github.com/onaclov2000/4749011
http://www.remotecentral.com/cgi-bin...hread.cgi?4900
Yeah, that is the pretty much what I'm doing now, but in C++:

Code:
Socket::Socket(QObject *parent) :
    QObject(parent),
    m_retries(0)
{
    this->setObjectName("socket");
    this->connect(&m_socket, SIGNAL(connected()), this, SLOT(onConnected()));
    this->connect(&m_socket, SIGNAL(disconnected()), this, SLOT(onDisconnected()));
    this->connect(&m_socket, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
    this->connect(&m_socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(onStateChanged(QAbstractSocket::SocketState)));
    this->connect(&m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onError(QAbstractSocket::SocketError)));
}

Socket::~Socket() {}

void Socket::getIPAddress() {
    QByteArray data = "M-SEARCH * HTTP/1.1\r\n" \
            "HOST: 239.255.255.250\r\n" \
            "MAN: ssdp:discover\r\n" \
            "MX: 4\r\n" \
            "ST: urn:schemas-upnp-org:device:MediaRenderer:1\r\n\r\n";

    QHostAddress address("239.255.255.250");

    qDebug() << "Binding: " << m_socket.bind(address, 1900);
    qDebug() << "Bytes sent:" << m_socket.writeDatagram(data, address, 1900);
}

void Socket::onConnected() {
    qDebug() << "Connected";
}

void Socket::onDisconnected() {
    qDebug() << "Disconnected";
}

void Socket::onReadyRead() {
    qDebug() << m_socket.readAll();
}

void Socket::onStateChanged(QAbstractSocket::SocketState state) {
    qDebug() << state;
}

void Socket::onError(QAbstractSocket::SocketError error) {
    qDebug() << error;
    qDebug() << m_socket.errorString();
}
So this should work, once I clean up the code.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post:
Posts: 638 | Thanked: 1,692 times | Joined on Aug 2009
#16
@marxian
Do you have any news about the lg remote plugin?
Have you some new draft of code to test?
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#17
Originally Posted by xes View Post
@marxian
Do you have any news about the lg remote plugin?
Have you some new draft of code to test?
I haven't had any time to work on it since I last posted, due to other projects. I'll try to get back to it as soon as I can.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 2 Users Say Thank You to marxian For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#18
This idea is awesome! almost everything today uses rest api calls.

Thanks.
 

The Following User Says Thank You to impeham For This Useful Post:
Posts: 669 | Thanked: 433 times | Joined on May 2010
#19
it would be great if it could also run python scripts!
 
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#20
I presume this would be capable of controlling a GoPro using it's URL commands?
If so has anybody made a plugin or remote for this yet?
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 
Reply

Tags
maemo5, not sailfish, remote control


 
Forum Jump


All times are GMT. The time now is 07:16.