2010-06-28, 00:22
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.
/***********************************************************************
Compiler Directives
(Uncomment and declare compiler directives as needed)
***********************************************************************/
#SYMBOL_NAME "XBMC Processor 1.0"
#HINT "XBMC Processor 1.0"
/***********************************************************************
DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS
(Uncomment and declare inputs and outputs as needed)
***********************************************************************/
DIGITAL_INPUT Key[100];
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];
/***********************************************************************
Functions
(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) {}
/***********************************************************************
Main()
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();
//...
tzya Wrote:I developed a full Crestron interface.
If you interested I can share it.
The code in this module is a combination of tzya's code from
http://forum.xbmc.org/showthread.php?tid=59445, the Crestron_boxee module found
at http://tech.groups.yahoo.com/group/Crestron/ 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:
http://xbmc_ip_address:8080/xbmcCmds/xbmcHttp?command=SetBroadcast¶meter=1;8278
Check that this is working by viewing:
http://xbmc_ip_address:8080/xbmcCmds/xbmcHttp?command=GetBroadcast
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