Making a Crestron Module for HTTP API Control
I tried compiling the code tzya provided and seem to always run into compiler errors, if anyone has the module working would be greatly appreciated if you could private message it to me.
Dear tzya

Please could you post the whole usp file. Its very hard to get the code running.

Hey Tzya, would you mind posting the rest of the code? It seems to be missing the IOs and global variables. Or perhaps just PM me the USP?

get some chops guys. consider yourself lucky to get what he gave you.
Did anyone get this to compile?


"Statement outside of function scope" on this line- MAKESTRING(Sbuffer,"GET /xbmcCmds/xbmcHttp?command=%s\x0D\x0A\x0D\x0A", CommandToSend);

Any help would be appreciated. Thanks in advance.
Hi guys, first message on this board!
I found this thread some days ago and tried to complete the missing parts.
The hard thing is to understand difference between internal variables and input/output signal just from the error log...
Anyway this is a "draft" of what is needed to compile (of course, the result can't work without the proper code):

  Compiler Directives
  (Uncomment and declare compiler directives as needed)
#SYMBOL_NAME "XBMC Processor 1.0"
#HINT "XBMC Processor 1.0"

  (Uncomment and declare inputs and outputs as needed)

DIGITAL_OUTPUT VideoNavHighlightFb, PauseFb, StopFb, PlayFb;
ANALOG_OUTPUT PlaySpeed, TransportIcon, Status;
STRING_OUTPUT PlayingSpeed$, CurrPlay$[16];

  Global Variables
  (Uncomment and declare global variables as needed)

INTEGER CommBusy, CurrentSckStatus, Enable, CurrCmdSeq, BusyTcp, ActiveWindow, CurrXbmcWindow, CurrType, ControlId, LyricsNumOfLines, LyricsIndex, LyricsXbmcIndex, HaltSelect;
INTEGER PcPowerOffWaitFlag, CurrFolder;
STRING CommandToSend[512], Info[32][256], Lyrics[16][128], WolPacket[64], CurrFolderPath[20][256], MacId[32];

  (Add any additional functions here)
  Note:  Functions must be physically placed before the location in
         the code that calls them.

Function ClearCurrPlay() {}
Function SendLyrics(integer var1) {}
String_Function RepleaceSpace(string var2) {}

  Uncomment and place one-time startup code here
  (This code will get called when the system starts up)
//Function Main() {
    integer i, ValCount, Val[8], UdpPort;
    string Temp[64];
//    WaitForInitializationComplete();


Any further adds will be apreciated!!!

Take a look also to this project (born to control boxee):

I get this works on my testbed (XBMC 9.11 for Windows & Dharma r31977 for Windows), but with some disconnection issues and with only the functions mapped on the provided xpanel (ver 0.1). Under "sources" there is a newer version (0.12), but seems to be a draft for new features.
Thanks! Errors are gone, I will have to test it when I get a chance.
Would love to see this? Is it available for download?
tzya Wrote:I developed a full Crestron interface.
If you interested I can share it.

I'm interested. Where can I see or download this?
Unfortunately Tyza's "full Crestron Module" is only half a module, it only provides one way control over IP to the XBMC box, it in no way gives any 2 way feedback to allow touchpanels and Xpanels to see metadata and cover art. PM me your email and I can give you the module so far...

If anyone has time and can assist with two-way feedback (metadata and cover art etc..) for Boxee or XBMC I would be very interested and I am a crestron dealer so I can get access to Crestron's technical support and crestron programmers.
My mistake, it does give you currently playing text feedback and playback speed, and it generates play/ pause/ stop feedback.
I have just uploaded a Crestron XBMC module with metadata feedback to the Yahoo Crestron programming group:

Here are the usage notes from the source code:
The code in this module is a combination of tzya's code from, the Crestron_boxee module found
at and my own work.

XBMC are gradually phasing out the use of the HTTP API and replacing it with
a new API based on JSON. I don't know if it is still present in the latest
stable release. I am using nightly build 31432 (end June 2010) without a problem.

In order for metadata feedback to work you must switch on the XBMC broadcast
messages using:
Check that this is working by viewing:
A note on thumbnails:
The XBMC thumbnail images are files ending in the extension ".tbn". Crestron
touchpanels cannot display these images because they need to end in "jpg" or "png".
Furthermore these thumbnails are often large (400x400 pixels) and they will
take a very long time to load on a Wireless touchpanel. I wrote a small C#
program that copies every thumbnail, resizes it smaller and saves it in the
same directory as a JPEG with the extension ".jpg". I then schedule this
script to run once a day. The script is called CopyThumbnails.exe

Some notes on usage:
-Set the Connect input HIGH before doing anything else.
-The progress percentage needs to be scaled to 0-FFFF in order to present
    it on a TouchPanel slider. Use an Analog Scaler.
-I use a Timer to pulse the CheckCurrentlyPlaying every few seconds to
    update the metadata strings
Next up I'm going to code a module that deals with the new JSON interface. It'll take a few weeks to do.

Some commands (Up/Down,Left,Right,OK, OSD and a few others ) will be handled by the xbmc EventServer API. The metadata and other commands will be done via JSON-RPC.
thank you!! I will test it out.
I'm trying to get the CopyThumbnails script work: it needs 2 parameters in the command line, but I've no idea about what to use; I've tryied with thubnails folder path without success. Any help?
Where CopyThumbails.exe should be placed?

[edit] I've found the instructions in the source code! Didn't see before, sorry!
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Making a Crestron Module for HTTP API Control00