Your Digital Media Has Never Looked So Good

 
ankan
Topic Author
Posts: 11
Joined: Wed Jan 02, 2008 10:43 am

Add menus and use SB to control server

Wed Jan 02, 2008 11:02 am

I have found lot of apps that let you control your SB from your computer but I would like to do the opposit. Use the SB to controll server (my linux server).
I would like to be able to control my heyu (homeautomation program for linux) so I can turn on/off lights. I would like to get information from my PBX and so on.

How should I setup this kind of script/program on my linux server?
To start with, how do I add an extra menu? I guess I have to have a script running that in some kind of way are waiting for say 3x push on HOME-button (got the idee from rokuseer)
Do I have to open an new session that are showing the information on the SB when the first session is waiting for next keypress or how does it work?

As it is now I have made an script sending CallerId to SB (telnet port 4444 not via RCP) I guess I have to use the RCP to do above features.

All help are welcome!!
 
ankan
Topic Author
Posts: 11
Joined: Wed Jan 02, 2008 10:43 am

Wed Jan 02, 2008 2:32 pm

Am I right when I guess the menu thing is just an script that set the SB in IrDemodSubscribe - mode and use IrDispatchCommand to send all commands to the cpu until the script gets that magic command like CK_HOME CK_HOME CK_HOME and then stops forward all commands to the cpu and shows own messages on display instead.

My question is how to write and draw on the display at the same time as the script are ready to capture keypress? I can't find any command in the RCP-list. Is it as I guessed an other session that manage the display by using sketch and the first session capture keypresses?
 
mcfh
Posts: 678
Joined: Wed Dec 15, 2004 8:39 am
Location: London, UK
Contact:

Wed Jan 02, 2008 3:10 pm

Version 3 firmware enhanced the script commands so that you can handle IR or not. As you surmise the way to do all of this is to use 2 sesisons. My app may speed you up as I provide a COM/.NET wrapper to access it all.
M2000, M1000 & R1000 on iTunes and XP SP2
Integrate your Soundbridge with Windows
 
ankan
Topic Author
Posts: 11
Joined: Wed Jan 02, 2008 10:43 am

Thu Jan 03, 2008 2:14 am

Thanks for your answare but I'am afraid it didn't help me much more than I now know that I have to play with two sessions.
However I didn't realy understand what you wanted to say with
Version 3 firmware enhanced the script commands so that you can handle IR or not

I can handle IR via both port 4444 and 5555 but I don't know wich one to use.

As I can't find any source code at your site or when I have installed your app, it don't helps me much. To start with I just need to know how apps talking to the SB are working. What interface (port 4444/5555) they are using and maybe some tips of what methods to use.
As I'am going to make the script/apps for my linuxserver, I guess an COM/.NET wouldn't help me much.

I havn't made programs talking to devices via telnet before so some tips about that would be nice to.
When I searched around I found out that expect in TCL is a good tool to use but I havn't worked with TCL before so it's kind of hard to start without any examples.

How ever, I want to thank mcfh for his fast answare.
 
mcfh
Posts: 678
Joined: Wed Dec 15, 2004 8:39 am
Location: London, UK
Contact:

Thu Jan 03, 2008 4:47 am

OK 4444 and issuing the command rcp is equivalent to 5555. However sketch is only accessible via 4444.

you need 2 sockets to do both IR and sketching.

the sketch marquee command uses -start and -stop options to allow IR to pass through as required.

I can't offer much advice on doing this on Unix I am afraid.
Regards
Mark
M2000, M1000 & R1000 on iTunes and XP SP2

Integrate your Soundbridge with Windows
 
ankan
Topic Author
Posts: 11
Joined: Wed Jan 02, 2008 10:43 am

Thu Jan 03, 2008 5:13 am

Ókey the two socket thing I understand. Why I questioned about port 4444 or 5555 was in what way I should take care about IR. port 4444 have irman that can do the stuff as IrDemodSubscribe and IrDispatchCommand can do at port 5555. I guess port 5555 is prefered for apps talking with the device.

mcfh wrote something about start and stop with the sketch marquee. Do I have to stop sketch marquee to recive IR or what about it?
Doesn't IrDemodSubscribe send data even when the second session is in sketch mode? Or do I have to use stop to be able to use IrDispatchCommand?
At port 4444 with irman it's possible to just echo all commands and when you want, you can stop auto-farwarding them to the cpu and just recive them. Is that possible in RCP (port 5555).
If it's not possible I think it's kind of unsafe to use IrDemodSubscribe and forward IR to cpu by using IrDispatchCommand. What would happen if the farwarding would crach?

By the way, is port 4444 call CLI and port 5555 RCP or what should I call them instead of port 4444 and port 5555?

Is it possible to write on display as bitmap? Use hex instead of point x y ?

About the unix programming I think I can take care about it, if I only know how to setup the program the programming will be the small part I hope. I just have to learn TCL first.
 
mcfh
Posts: 678
Joined: Wed Dec 15, 2004 8:39 am
Location: London, UK
Contact:

Thu Jan 03, 2008 6:59 am

The RCP commands are the best to use as the others may well be deprecated in the future (no evidence for this but it is where everyone is encouraging Roku to go (e.g. by hopefully bringing sketch into RCP).

I had no issues using the IrDispatch commands to do the forwarding as you describe.

There are no commands at the moment for blitting bitmaps (it's on the feature request list) - you have to do it pixel by pixel (I wrote some code to do it line fragment by line fragment which was a bit faster but not much.

Mark
M2000, M1000 & R1000 on iTunes and XP SP2

Integrate your Soundbridge with Windows
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Control Server via ROKU (Perl)

Sun Jan 27, 2008 12:35 pm

Hello,

I am working on something similar, so far I use it to display weather when in stand by and on request (also the magic 3 x home key ;) ). Not yet posted but I have written some more perl code to display a menu after the 3xhome with the options to show the (1) weather (2) shut down the server, (3) acess the hidden Alarm and (4) Sleep function.
It works but I am thinking about a way to change event handling as the roku becomes unresponsive sometimes.

Image

Also in another post here I present some lines of perl for printing images (weather icons) to the Roku. ANd yes its SLOWWWWW!!! Sending it as lines instead of single pixels improved speed, but it is still slower than I want it.

Edit: If you read above thread you will see that a user changed my script to fit also the 280x16 display. I like this community here :D

regards
Goemon
Last edited by Goemon on Mon Jan 28, 2008 11:03 am, edited 1 time in total.
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku
Image
[/url]
 
S80_UK
Posts: 1035
Joined: Wed Oct 25, 2006 3:11 am
Location: Cambridgeshire, UK

Re: Control Server via ROKU (Perl)

Sun Jan 27, 2008 1:16 pm

Goemon wrote:
Hello,

I am working on something similar, so far I use it to display weather when in stand by and on request (also the magic 3 x home key ;) ).

Hello Goemon,

Wow! This is amazing stuff. I also like very much the presentation and clear description on the linked web page (from your sig.)

Many thanks for sharing this.

Les.
Roku M1000, M1001, M2000, R1000, Roberts WM-201, Stream 83i
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Mon Jan 28, 2008 2:58 pm

Hello,

I just posted this message in another thread. I put the t4roku version with the menu online. The procedure is really simple - as a newbee in perl the code may look far from perfect but is easy to read, maybe you can reuse something for your menu project.

Goemon

(PS: I will stop double-posting on my t4roku software here, so I only discuss it in the original thread in future.)
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku

Image

[/url]

Who is online

Users browsing this forum: No registered users and 1 guest