Announcement

Collapse
No announcement yet.

ASP Page to control devices and dim without refreshing the page [ASP]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ASP Page to control devices and dim without refreshing the page [ASP]

    UPDATED 10/27/04
    I had to re-post this, sorry, For some reason it would not allow me to update the attachment.

    UPDATED 10/30/04
    Added the documentation to the .zip file that I forgot

    - First, Thanks to Rupp's Help, the code has been streamlined and easier to follow. Thanks Rupp!
    - Second I have included code for dimming devices as well

    This is a fully working .asp page to control lights with HS. When a light icon is clicked, it will toggle that light on/off and update the image on the screen screen WITHOUT REFRESHING the page! Diming is also done without the page refreshing. Through help from a few people on the board, and a lot of experimenting I have finally incorporated this into my HS setup.

    The great part about the way this is done, it send the request to a secondary page in the background, that actually updates the image on the current page with a bit of Java code. Even better, it can update ANY image on the page. The 4 buttons below the top sections of test lights, are actually toggles to demonstrate this.
    When button 1 for example is pressed, it will toggle "TestLight#1" and toggle the image next to that light.

    This is just "snippit" of code to help others by using a working example. It took me quite a few posted questions in the forum and a lot of trail and error on my part, fro someone that does not know asp very well. Once you see how this works, the possibilities are endless to create a page that looks exactly how you want.


    The .asp pages, and graphics used in this example are all included in the zip archive, as well as documentation. The different levels of dim are also in the zip, so it is ready to go! Just unzip the file into your HomeSeer/html/" folder. Fire up a web browser, and check it out. To change to your devices, simply edit the line in the code that Rupp created that creates the array. With this, all you have to do is change the list of house codes in the array to make this page work for you.

    The Discussion for this is <LOCATED HERE>

    Here is an animated screen capture to show what the page looks like.


    Just a note: My setup looks totally differnet than the one pictured here, this was created to get the code correct before implementing, and keeping it simple to share here on the forum. The Star Trek fan that I am, my entire system has an "LCARS" look to it.

    You can see it in action at my web site, listed below in the signature.
    Attached Files
    Last edited by johnwpb; April 21, 2005, 03:37 AM.
    Visit My Home Seer Site at:
    www.JohnWPB.com
    Created with LCARS
Working...
X