--- Robert Rozman <[EMAIL PROTECTED]> escreveu: 
> Hello,
> 
> I'm now going to put some effort in plugin for connection to
> Misterhouse
> (great home automation programme: www.misterhouse.com). Since I'm
> more or
> less newbie to Freevo and python would kindly ask for some guidance
> in my
> work.

I'm not sure about some answers, so better you confirm them with
Dischi.
Here it goes:

 
> For a start I'd like to discuss few technical things:
> 
> 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) ?

You can just code a plugin that use a thread/process to listen to TCP
ports. Threads share memory with other threads within a process.
Processes doesn't share data, you may have something to exchange data
between parent (freevo) and child (misterhouse listener) process. So,
better you to keep with threads.


>             - I'd like to have:
>                     - special "idlebar like" plugin at the bottom of
> screen to display more important info from Misterhouse
> (probably idlebar plugin is best start....

You want another IdleBar or just show something there?
The first option would require you to rip some code from idlebar and
maybe adapt other freevo parts, since other things, like the skin may
know about idlebar (to resize itself).

The second option is easy, just inherit from the IdlebarPlugin class.
Take a look at other idlebar plugins, like cpustats, clock, ...


>                     - special plugin that should listen/talk to TCP
> port and update some sort of local data structure
> that holds local copy of all data sent by Misterhouse. What are
> possibilities for that and for making global data structure ?

Again, you may use threads.

>                     - separate menu group, that could also have item
> plugins (for instance for light to switch on/off/dim). 
> How to do that as easy as possible ? Where to put item
> plugins if they are possible at all for custom menu groups.

You can create one plugin that inherits from MainMenuPlugin, that will
show in main menu. Then you can use a new feature from Dischi that
enable you to toggle menu options, like "on/off".


> 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 don't know about anyone coding misterhouse related things, but there
a bunch of plugins that does the same thing. Just take a look at code
inside plugins/ dirs (src/plugins, src/audio/plugins/, ... )
   Also, hang on #freevo @ irc.freenode.net  Dischi is always there and
there are other plugin authors that chat there. Mikeruelle, Rshort,
den_RDC are your friends there :)

BTW, my nick is k-s.


Gustavo


Yahoo! Mail - o melhor webmail do Brasil
http://mail.yahoo.com.br


-------------------------------------------------------
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