maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] MultiMote - A plugin-based remote control application (https://talk.maemo.org/showthread.php?t=92995)

marxian 2014-04-10 16:24

Re: [Announce] MultiMote - A plugin-based remote control application
 
Quote:

Originally Posted by xes (Post 1420602)
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. :)

xes 2014-04-11 19:45

Re: [Announce] MultiMote - A plugin-based remote control application
 
Quote:

Originally Posted by marxian (Post 1420716)
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 2014-04-11 21:40

Re: [Announce] MultiMote - A plugin-based remote control application
 
Quote:

Originally Posted by xes (Post 1420989)
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. :o 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.

xes 2014-04-12 21:39

Re: [Announce] MultiMote - A plugin-based remote control application
 
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

marxian 2014-04-12 22:44

Re: [Announce] MultiMote - A plugin-based remote control application
 
Quote:

Originally Posted by xes (Post 1421154)

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. :)

xes 2014-06-16 21:34

Re: [Announce] MultiMote - A plugin-based remote control application
 
@marxian
Do you have any news about the lg remote plugin?
Have you some new draft of code to test?

marxian 2014-06-16 23:29

Re: [Announce] MultiMote - A plugin-based remote control application
 
Quote:

Originally Posted by xes (Post 1429839)
@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.

impeham 2014-07-10 20:08

Re: [Announce] MultiMote - A plugin-based remote control application
 
This idea is awesome! almost everything today uses rest api calls.

Thanks.

impeham 2014-07-11 13:41

Re: [Announce] MultiMote - A plugin-based remote control application
 
it would be great if it could also run python scripts! :)

sixwheeledbeast 2014-07-13 22:25

Re: [Announce] MultiMote - A plugin-based remote control application
 
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?


All times are GMT. The time now is 10:25.

vBulletin® Version 3.8.8