Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#79006 - 09/03/2002 14:00 charcoalgray99's xsl stylesheet v1.1
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
These files provide a web interface to control your empeg via hijack's khttp server.

Requirements are hijack v234+, IE6 or IE5.5 + XML Parser 3.0

To install, simply ftp the contents of this zip to your empeg root directory. Then use your web browser and point it to your empeg’s ip address or hostname.

New features in v1.1
Improved Mozilla support
Incorporates new ?NODATA command
Included new VolAdj commands

You can download v1.1 here.

Hijack Bug: ?NODATA&RO will cause a 403 Access Not Permitted if the drives are already RO, same for RW.

Tom

Top
#79007 - 09/03/2002 14:06 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
While I’ve made a lot of progress with Mozilla support, it is still not 100%. This request is going out to anyone who would like to help. I have a couple things I just can’t figure out.

The flyout rio remote now works in Mozilla (and NS4!), but ONLY in the index.html, not in the stylesheet.

The fascia display looks slightly broken in the stylesheet view, but not in the index.html.

All JavaScript seems flakey in Mozilla. Button presses sometimes stick, or don’t go through. Also the JavaScript image refresh doesn’t work.

Display background color doesn’t work at all. I don’t think Mozilla supports changing table background images from JavaScript.

If you have a work around or just code that works better, feel free to post here or PM me.

Tom

Top
#79008 - 09/03/2002 14:08 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
>?NODATA&RO will cause a 403 Access Not Permitted if the drives
>are already RO, same for RW.

I'll fix that in v236 later today (compiling now, but on my slow notebook computer).

Cheers

Top
#79009 - 10/03/2002 22:52 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Hey Mark,

What do you think about implementing something like this so I can easily grab the /proc information?

/proc/empeg_notify?EXT=.js

var empeg_notify = new Array(7)

empeg_notify[0] = "#3b60 0:02:33";
empeg_notify[1] = "AAdema";
empeg_notify[2] = "F0x3b60";
empeg_notify[3] = "GHard Rock";
empeg_notify[4] = "N5";
empeg_notify[5] = "S1";
empeg_notify[6] = "TThe Way You Like It";
empeg_notify[7] = "V90";

/proc/empeg_therm?EXT=.js

var empeg_therm = "44";

With that, I could just use this command:

<script language="JavaScript" type="text/javascript" src="/proc/empeg_therm?EXT=.js"></script>

And load up all the variables. What do you guys think? Or is there a better/easier way of doing this?

Tom

Top
#79010 - 11/03/2002 06:15 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
crocklobster
member

Registered: 19/12/2001
Posts: 108
I'm going to have to install Mozilla to take a look at what's lacking. Is the attachment in this post still the latest (maybe with the exception of &#xa0?

One guess I had... It seems like maybe the XSLT parser is working at the same time as the XHTML parser in Mozilla. I'm wondering if the js include statement is working in the stylesheet. One thing you might try, and I'll try to test this myself, is making sure the javascript is valid XML / XHTML, that might require wrapping it in (let's see, what's the syntax)
[!CDATA (don't quote me on that, it's something similar that kind of makes the XML parser skip over it)

The other thing, is once that works (no errors, but it's wrapped in CDATA), but if the js still doesn't work right in the stylesheet. Try including it in a different way, like
<xsl:include/> Instead of the typical HTML include directive.

Just looking at the list of things that didn't work, it looks like a lot of the js isn't being included somehow into the stylesheet rendered xml.

Like I said, I'll try to test this later, but it won't be until tonight (EST)

Chris

Top
#79011 - 13/03/2002 07:57 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
This looks like a reasonable thing. But perhaps instead of an array it might be better to use descriptive names for each line? Note that there is no guarantee on the ordering of the lines in this file.

Suggestions?

Top
#79012 - 13/03/2002 07:59 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Oh, I take part of that back: Hijack currently provides ordering for those lines. But would we rather have something like

Title = "Midnight Cowbody";

instead of

empeg_notify[4] = "TMidnight Cowbody" ;


Edited by mlord (13/03/2002 08:00)

Top
#79013 - 13/03/2002 10:43 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Mark, Yes. I was trying to make it less work for you. ANY extra parsing you could do would be helpful.

Thanks.

Tom

Top
#79014 - 13/03/2002 11:47 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Well, ordinarily I'd also vote for the least amount of code possible, but this information (empeg_notify) has potential to find a LOT of uses, and so for this case I'd be happy to have it be a little more descriptive and easy-to-use.

With that in mind, please post exactly how it should appear.

Thanks.

Top
#79015 - 13/03/2002 17:50 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
I'm not going to reinvent the wheel, most of these var names were already used by displayserver. Should work here too!


/proc/empeg_therm?EXT=.js
// Temperature
empeg_temperature = "44";

/proc/empeg_id?EXT=.js
// Hardware revision
empeg_id_hwrev = "07";
// Unit serial number
empeg_id_serial = "90001003";
// Build ID
empeg_id_build = "3a38c0ec";
// ID
empeg_id_id = "2b6f1685-63434051-01be58af-ed7d32ed";
// Installed RAM
empeg_id_ram = "12288K";
// Installed Flash
empeg_id_flash = "1024K";
// Drives
empeg_id_drives = "7";
// Image
empeg_id_image = "67706d65";

/proc/empeg_power?EXT=.js
// AC Power?
empeg_power_ac = "1";
// Powerfail enabled?
empeg_power_fail = "1";
// Accessory line high?
empeg_power_acc = "1";
// First Boot?
empeg_power_firstb = "1";
// Telephone mute on?
empeg_power_mute = "0";
// Lights sense on?
empeg_power_lights = "0";
// Display on?
empeg_power_display = "1";

/proc/loadavg?EXT=.js
// Load average 1 minute
empeg_loadavg1 = "0.05";
// Load average 5 minutes
empeg_loadavg5 = "0.15";
// Load average 15 minutes
empeg_loadavg15 = "0.15";

/proc/meminfo?EXT=.js
// Total Memory
empeg_mem_total = "11108352";
// Used Memory
empeg_mem_used = "10825728";
// Free Memory
empeg_mem_free = "282624";
// Shared Memory
empeg_mem_shared = "1224704";
// Memory in use for buffers
empeg_mem_buffers = "253952";
// Memory in use for cache
empeg_mem_cached = "2375680";



I'll do notify, the proctable and netstat -an later tonight.

Tom

Top
#79016 - 13/03/2002 19:36 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Whoa.. were were talkin' about /proc/empeg_notify, not all of the other stuff. If I change those, the player may break.

-ml

Top
#79017 - 13/03/2002 20:01 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Ah, ok. I guess I don't see the difference? Here's nofity, there are a couple fields I'm not sure about.


/proc/empeg_notify?EXT=.js
// Fid
empeg_notify_fid = "5010";
// Position
empeg_nofity_position = "0:01:12";
// Artist
empeg_notify_artist = "Incubus";
// Flags ???
empeg_notify_flags = "F0x5010";
// Genre
empeg_notify_genre = "Rock";
// Number ???
empeg_notify_number = "12";
// Status (Paused?)
empeg_notify_status = "1";
// Title
empeg_notify_title = "Nice To Know You";



Tom

Top
#79018 - 17/03/2002 20:06 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Hey Mark,

Is this something you’re still interested in pursuing? Is there anything else you need from me?

I’d settle for just the empeg_notify info and the current hijack version.

Tom

Top
#79019 - 17/03/2002 20:17 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Remind me about it in a week or so.

I don't think about the XML stuff much, since I cannot use it myself.

Cheers


Edited by mlord (17/03/2002 20:18)

Top
#79020 - 18/03/2002 07:23 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
foxtrot_xray
addict

Registered: 03/03/2002
Posts: 687
Loc: Atlanta, Georgia
Oooh... I like this idea. At first, I didn't know why he would want it. NOW I do. I foud out I was able to click on any of the files in /proc/ and get info regarding them, like the current temp, current song playing, even a current snapshot of the screen! With what he's looking for, you can set up your 'home page' to pull this info, and display it (i.e.: Now Playing:)
I modified the original html sheet for 'quick' buttons (ff and rw, play/pause) and was thinging of a way to do this. Right now I'm just 'including' the 'notify' file, and writing it to screen. But with VAR's, you can do alot more...
_________________________
Mike 'Fox' Morrey 128BPM@124MPH. Love it! 2002 BRG Mini Cooper

Top
#79021 - 18/03/2002 07:30 Re: charcoalgray99's xsl stylesheet v1.1 [Re: foxtrot_xray]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Do you know of a way to take the "Notify" file and get it into a Javascript string?

That's the problem Charcoal is running into. You can open the file in a web page, but you can't get your Javascript code to grab its text into a string for parsing. I think this is a security limitation of Javascript.
_________________________
Tony Fabris

Top
#79022 - 18/03/2002 08:32 Re: charcoalgray99's xsl stylesheet v1.1 [Re: tfabris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Should be a piece-o-cake for full Java, though.

Top
#79023 - 18/03/2002 13:19 Re: charcoalgray99's xsl stylesheet v1.1 [Re: charcoalgray99]
NiCKEL
journeyman

Registered: 27/02/2002
Posts: 59
Loc: Vancouver, BC, Canada
The screen colorization modifies the images opacity which will only work under IE.

I don't make a hobby of implementing non-standard features but the opacity on the screen shouldn't hurt browsers that don't support it so I didn't see any harm in using it.

Top
#79024 - 18/03/2002 15:18 Re: charcoalgray99's xsl stylesheet v1.1 [Re: NiCKEL]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Actually, I found a way to get the opacity setting working in both. Mozilla just uses it's own way of doing it.
img.display

{
filter:alpha(opacity=70); -moz-opacity: 70%
}

Feel free to use this in lojack too, if you want. I'm still having a problem with the color in Mozilla. I'm using javascript to set the cell background image from a cookie, and I don't believe it is possible to set a cell background image from javascript in Mozilla. I use (doucment.all) which is IE only.

Tom

Top
#79025 - 25/03/2002 20:34 Re: charcoalgray99's xsl stylesheet v1.1 [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Remind me about it in a week or so.

It's been a week, here's your reminder!

Tom

Top
#79026 - 26/03/2002 14:09 Hijack v250: new format in /proc/empeg_notify [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Hijack v250 (out shortly) has a new format for /proc/empeg_notify

Some of the settings there may not be reliable after boot-up, until the user modifies them once with the remote. The problem here is with the player software, not Hijack.

I have "fixed" the "Volume" and "MixerInput" settings in that regard, but not the "Sound" ("playing/unmuted") entry, for example.

-ml


Edited by mlord (26/03/2002 14:10)

Top
#79027 - 26/03/2002 19:29 Re: Hijack v250: new format in /proc/empeg_notify [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Hijack v250 (out shortly) has a new format for /proc/empeg_notify

Thank you!

Tom

Top
#79028 - 26/03/2002 19:46 Re: Hijack v250: new format in /proc/empeg_notify [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
Mark,

Something seems to have changed with v247 and higher, the button-up commands on my stylesheet don’t seem to get through to hijack. As a result, the buttons “stick”.

I’m using ?buttonraw= to send commands, did you change the format or is this a bug?

Tom

Top
#79029 - 26/03/2002 20:56 Hijack v251: bugfix? [Re: charcoalgray99]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Mmm.. must be something I did.

Kinda easy to break that sort of thing, and since I cannot use it myself under Linux, it does not (and will not) get tested here very often.

But I think I know what it might have been. Watch for v251.

Cheers

Top
#79030 - 26/03/2002 21:29 Re: Hijack v251: bugfix? [Re: mlord]
charcoalgray99
enthusiast

Registered: 14/05/2001
Posts: 279
But I think I know what it might have been. Watch for v251.

Yep, fixed. Thanks.

Tom

Top
#79031 - 29/03/2002 18:27 Re: Hijack v251: bugfix? [Re: mlord]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
But I think I know what it might have been. Watch for v251.

This seem to have been the same thing I complained about here. 251 fixed it. Thanks, Mark!
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top