Get Fixture Level on webpage.

Questions on Palette and Light Palette operation and features
Post Reply
nseaton
Posts: 3
Joined: Mon Feb 07, 2011 4:31 pm
Primary Venue / Use: Other School
Where I Am: Owensboro, KY

Get Fixture Level on webpage.

Post by nseaton » Mon Feb 07, 2011 4:45 pm

I would like to create a simple web page that displays the intensity of a particular fixture.

I've tried using the /script.mq?/HC.AttributeGetValue but I'm not getting any results on the webpage.

I can post values through script.mq just fine, but I'm clueless as to retrieve information from the desk.

User avatar
MickCrozier
Posts: 288
Joined: Tue Mar 31, 2009 3:10 am
Primary Venue / Use: Professional Theatre
Where I Am: Melbourne, Australia
Location: Melbourne, Australia

Re: Get Fixture Level on webpage.

Post by MickCrozier » Mon Feb 07, 2011 11:14 pm

You can't.
Palette does not have any server side scripting which is the only way to retrieve dynamic data from the server.

The only thing I can think of is to write a lua script that prints out a text file with the values (custom lua scripts can be triggered from the web same as any HC script) - you could then use javascript to read the text file and display the value.
Formerly Durisian (who died peacefully of digital old age)

nseaton
Posts: 3
Joined: Mon Feb 07, 2011 4:31 pm
Primary Venue / Use: Other School
Where I Am: Owensboro, KY

Re: Get Fixture Level on webpage.

Post by nseaton » Tue Feb 08, 2011 3:58 am

THANKS! This works great. Lua calls the HC command and saves the returned value to a file. A simple PHP include then loads that value into the web page.

I then got creative and made light switch graphics for my all of my non-dim fixtures. (If they're off, the switch is off and vise versa)

Thanks again!

User avatar
MickCrozier
Posts: 288
Joined: Tue Mar 31, 2009 3:10 am
Primary Venue / Use: Professional Theatre
Where I Am: Melbourne, Australia
Location: Melbourne, Australia

Re: Get Fixture Level on webpage.

Post by MickCrozier » Tue Feb 08, 2011 8:24 am

... Actually I just thought about this - Java won't be able to read the text file from the server...
You could get lua to re-write the whole html file that gets served though...
...

php?? how did you do it?
Formerly Durisian (who died peacefully of digital old age)

nseaton
Posts: 3
Joined: Mon Feb 07, 2011 4:31 pm
Primary Venue / Use: Other School
Where I Am: Owensboro, KY

Re: Get Fixture Level on webpage.

Post by nseaton » Tue Feb 08, 2011 10:06 am

My webserver and desk happen to be on the same network. Lua outputs the fixture intensity to a txt file in the web folder on the desk. I then have PHP include the file on the ddesk via http.

User avatar
BobbyHarrell
Posts: 2422
Joined: Fri Oct 12, 2007 10:51 am
Location: Livingston, NJ
Contact:

Re: Get Fixture Level on webpage.

Post by BobbyHarrell » Tue Mar 01, 2011 3:03 pm

How about some pictures? I would like to market this if you are interested!
Bobby Harrell - Product Specialist
Philips Entertainment - Strand Lighting

Post Reply