Robert Rozman wrote:

...

About connection:
    Misterhouse has already built in remote client functionality. It
basically goes like this: connection is done throught TCP port. At the start
Misterhouse sends all its commands organized in menus. Later Misterhouse can
report on events/receive commands through this port.

Freevo side:
  I wonder what would be best to do:
            - how can I easily implement tcp port client (maybe through
twisted) ?

...


I kindly ask if anyone has any similar code to this and is willing to share
his work. Also any other advice will be more than helpful...

I'll let Aubin and the others help you out with the menu and Idlebar questions. But I can at least answer the remote control question:


The Python code for TCP clients is very straightforward, and there is a good example here:

http://www.python.org/doc/current/lib/socket-example.html


Now, if you want to do it the other way around (send remote control events *from* Misterhouse *to* Freevo), you can do it like this:


There is functionality already in Freevo to receive remote control events over the network. Add this line to your "local_conf.py":

ENABLE_NETWORK_REMOTE = 1

This will make Freevo listen on UDP port 16310 for events besides trying the regular lirc stuff.

I just added an example application in freevo/contrib/examples/rc_send.py that you can run from the Linux shell to send any event to Freevo:

linux> python contrib/examples/rc_send.py SELECT

You can also add arguments to send events to a different computer.

This application is completely standalone from the rest of freevo, and it can run using any (?) version of Python that comes with your system. You could call it from a Perl app, a shell script etc.

After you've used it for initial testing it should be trivial to port the functions to native Perl if that fits Misterhouse better.

/ Krister



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to