Web PHP Updates (Ajax, Dates, Variables)

Posted on
Thu Sep 08, 2005 7:01 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

Web PHP Updates (Ajax, Dates, Variables)

I spiffed up the Indigo PHP web interface a little bit. I've added the following functionality:
<ul><li> Change the date/time format displayed. This is done by editing the indigoInclude.php file at the top. Comment & uncomment the lines that you want or mix & match for your own desired format.</li>
<li> Variables and their states are now displayed in their own table at the bottom of the page.</li>
<li> Asynchronous command (similar to Ajax, without the XML part). Instead of each on/off command causing an entire page refresh, the command is sent to Indigo in the background and the webpage is updated when the command is finished. This has the result of making the interface much smoother. No more whole page reload when you turn a device on or off. </li></ul>
To install it, just drop the files in your current IndigoWeb (or appropriately named) folder in /Library/WebServer/Documents where your current setup resides.

Until the scripts are uploaded to the Perceptive Automation support page, I've posted the zip file on my website, available at:
http://highearthorbit.com/projects/Indi ... igoWeb.zip

Please let me know in this thread of via email (ajturner@highearthorbit.com) if you have any questions or problems.

Andy

Posted on
Sun Oct 02, 2005 7:55 pm
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

Hmm.. I had the other version working, but I can't get this updated one to work. Any Idea what I should be looking for?

Denny

Posted on
Sun Oct 02, 2005 8:23 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

Updated version not fully-prime-time

I'm working on an update of the PHP Web interface. for the time being, I sugest you should probably roll back to the previous version. I will post up the bug fixes & new version once I have it all working for all browsers. ;)

Andy

Posted on
Mon Oct 03, 2005 6:16 am
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

Cool !

Thanks for your work !


:D

Posted on
Wed Nov 16, 2005 6:45 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

(No subject)

Ok - the web interface has been fixed up and should work for Firefox, Internet Explorer 6+, Opera, Safari, Camino.

The package is available is at:
http://highearthorbit.com/projects/IndigoWeb/IndigoWeb.zip

Please let me know if you run into any situations. Also, as is the case with the widget right now, your devices and action groups shouldn't have quotation marks (' or "), as there is an underlying problem with communicating via Applescript to Javascript.

Hope you find it useful.

Posted on
Thu Nov 17, 2005 4:28 pm
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

Great!

I hacked my way around your last script just to get one of my variables to show up...not very elegant, but it worked. Can't wait to get yours in place.

Denny

Posted on
Thu Nov 17, 2005 8:38 pm
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

weird...I still can't get it to work. I get the first row in each table without any information.

Posted on
Thu Nov 17, 2005 10:55 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

(No subject)

Tmaxx - there was a misnaming in the release of the IndigoWeb that you have. Grab the version now.

Specifically, indigoInclude.php had
$INDIGO_APP_NAME = "IndigoServer";

which should be:

$INDIGO_APP_NAME = "Indigo";

So you can either change this, or grab the new zip file.

Posted on
Fri Nov 18, 2005 9:25 am
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

Cool !

I'll try it when I get home this evening.

Denny

Posted on
Sun Nov 20, 2005 6:40 pm
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

So close.........The tables are now drawn and the devices can be activated and the variables are listed corectly. My problem now is the action groups. They are not executing and this is being logged:

Code: Select all
 Error              FindElem() failed to find action group elem


Your hard work is very appreciated

:)


Denny

Posted on
Mon Nov 21, 2005 9:45 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

(No subject)

Mwuahaha - solved

Feel free to try IndigoWeb - Ajaxed the third:
http://highearthorbit.com/projects/Indi ... igoWeb.zip

This should cure 99% of your problems while leaving your whites staying whiter & your colors shining brighter.

Feel free to email me with any particular issues that crop up for you.
Andrew

Control Indigo from anywhere in the world:
http://highearthorbit.com/software/indigowidget

Posted on
Thu Nov 24, 2005 8:05 am
Tmaxx offline
Posts: 80
Joined: Jul 15, 2005

(No subject)

You are amazing......Although the first time I loaded the script, it really did some nasty thing to Safari. It corrupted the prefs and crashed it; even resetting the homepage to Apples site.

Before it quit thought, I noticed it just drew the tables like it did early last week. I did a search and replace in the IndigoInclude file to see if that may have been the old one. Sure enough, the error was in there. You may want to check your download file again.

Thank you so much for the great work.

Denny

Posted on
Fri Dec 09, 2005 12:04 pm
martinc offline
Posts: 83
Joined: Oct 27, 2005

(No subject)

Hello,

Love the script and works well via a web browsers and computer. I was wondering if you could make a smaller version so I can log in using my cell phone (Moto E815 none Java)? I currently doing this using the version we have but the text is big, lots of scrolling etc.. I am no web whizz so cant do it myself!

Thanks and please keep up the great work.

Posted on
Fri Dec 09, 2005 12:32 pm
ajturner offline
Posts: 160
Joined: Jul 10, 2005
Location: Washington, DC

(No subject)

I've been meaning to add this to the standard setup. I made a new stylesheet that uses "relative" sizing of all the elements. It should show up fine on your Moto now. What happens is the page should detect that you're using a handheld and apply the smaller font-size.

However, if it doesn't, just open the indigoSmall.css file and change the font-size of the "table" to a smaller font. And the "updating..." won't be smaller. I'll fix that in the next rev.

To use this new stylesheet, open "index.php" and replace:
Code: Select all
@import "indigoDefault.css";

with
Code: Select all
   @import "indigoSmall.css";
   @media handheld {
       table {
          font-size: 8px;
       }
    }


Download indigoSmall.css.

Let me know how it works for you.

Andy

Control Indigo from anywhere in the world:
http://highearthorbit.com/software/indigowidget

Posted on
Fri Dec 09, 2005 2:13 pm
martinc offline
Posts: 83
Joined: Oct 27, 2005

(No subject)

Hi Andy,

Thank you for your quick response on this.

Unfortunately it still does not work, fonts are still big. Would the fact the Motorola E815 phone is not Java enabled have anything to do with it?

Martin.

P.S If you PM me I can give you the IP address if that would help?

Who is online

Users browsing this forum: No registered users and 4 guests