Announcement

Collapse
No announcement yet.

Ultraview Setup Instructions

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

    Ultraview Setup Instructions

    Here's how I customize the UltraView framework written by Ultra Jones...

    Step 1: Getting device info to show up

    First, once UltraView is installed, let's make sure you can get some of your devices to show up on the ultra_view2_status.asp (QuickView). Do this by choosing an existing section that you would probably still use like lights or weather and locate the corresponding xsl file in the \Homeseer\HTML folder. For this example, edit the ultra_view2_status_lights.xsl and find the following similar code:

    <xsl:for-each select="DEVICE">
    <xsl:sort select="LOCATION" order="ascending" />
    <xsl:if test="NAME = 'Front Lights' or NAME = 'Driveway Lights' or NAME = 'Deck Lights' or NAME = 'Hallway' or NAME = 'Lamp' or NAME = 'Entertainment' or NAME = 'Recessed Lighting' or NAME = 'Niche' or NAME = 'Curio'">
    <tr>
    <td class="tableroweven" width="20%" valign="top" align="left">
    <xsl:value-of select="LOCATION" />
    </td>
    <td class="tableroweven" width="50%" valign="top" align="left">
    <xsl:value-of select="NAME" />
    </td>
    <td class="tablerowodd" width="30%" valign="top" align="left">
    <xsl:apply-templates select="ICON" />
    <xsl:apply-templates select="STRING" />
    </td>
    </tr>
    </xsl:if>
    </xsl:for-each>

    This is where you control which devices show up in that section. In the code above, we are choosing our devices based on Device Location. Change the 'if test' line to contain all of the devices you wish to appear in this section (make sure spelling is exact). Also, notice the table data for what shows up (and in what order) is also specified as well as the widths of each column. This example will display three columns; location, name and Icon w/ device string.

    Your sort can also look like:
    <xsl:for-each select="DEVICE">
    <xsl:sort select="NAME" order="ascending" />
    <xsl:if test="TYPE = 'Computer'">

    This would pull all devices that have a device name of 'Computer'.

    NOTE: Be careful editing the xsl files since keywords must be lower case. When you have an 'if' spelled as 'If' or 'select' as 'Select', the section will not be displayed.


    Step 2: Adding new sections to ultra_view2_status.asp

    Next, lets look closer at what is calling this xsl. In the ultra_view2_status.asp, each table is created with code similar to the following:

    <td width="100%" valign="top" align="left" colspan="2" class="tableheader">Lighting</td>
    </tr>
    <tr>
    <td colspan="2">
    <div id="divlights" style="height=190; overflow: auto;">
    <table border="0" width="100%" cellpadding="2" cellspacing="3">
    <tr>
    <td class="tablerowodd"></td>
    </tr>
    </table>
    </div>
    </td>

    Notice the <div id> tag is "divlights". This refers to the the ultra_view2_status_lights.xsl we modified in Step 1. For every section where device data will be passed through, you need a div tag and corresponding xsl named the same. Next, lets look at adding a new div section and xsl. There is a file called ultra_view2_status.txt also in the \Homeseer\HTML directory. Edit this file and look for a subroutine called ProcessData. This sub refreshes the data using XML and will need to be modified when you add a new section. Here is how the code looks in the ProcessData sub:

    set objDivElement = document.all.divSystemInfo
    Call LoadDiv("ultra_view2_status_sysinfo.xsl", objDivElement)

    set objDivElement = document.all.divWeather
    Call LoadDiv("ultra_view2_status_weather.xsl", objDivElement)

    set objDivElement = document.all.divLights
    Call LoadDiv("ultra_view2_status_lights.xsl", objDivElement)


    Step 3: Running the ultra_view2_status.asp

    Next, lets try to run the asp by specifying http://localhost:81/ultra_view2_status.asp in your browser. (change port for web server if necessary) If the devices show up then it worked! If not, there is probably a problem with the data being parsed in xml. The best way to find and fix it is to run the http://localhost:81/ultra_view2_xml.vbs script. This should show you all of the xml data for your page. If there is an error (degree symbol is very common) then you should get a script error with a line number. This will help you troubleshoot where the problem is. Refer to step 4 for how to fix.


    Step 4: Adding icons and modifying device strings

    If you are getting script errors in Step 3 or would like to add icons to your devices, edit the file \HomeSeer\HTML\Include\ ultraview2_xml.inc. You will see case statements based upon device name, location and/or type. Add cases for each specific device name with code to update the device icon. You could also replace any characters that xml is having trouble parsing here. Alot of that is already being done.


    Step 5: Adding other non-device related sections to the QuickView

    This is pretty easy once you figure out where to add the new table. For me, it took a little playing around to get the weather maps, network status and Caller ID sections in place. Look in my ultra_view2_status.asp for ideas on how this can be done.



    Well, that's it! I am not using the floorplan portion of the UltraView so no info on that. I am certainly no expert, but this is what I've learned so far. If I forgot anything or if others have additional ideas, please chime in!

    Thanks,

    -Tom

    Visit my HomeSeer at http://68.55.68.192:81 (New Guest Downloads!)

    [This message was edited by Tom Kern on Tue, 30 December 2003 at 09:59 AM.]
    Attached Files
    -Tom

    Visit Kernhome
    Kern Theater Gallery

    (User: guest / Pass: guest)

    #2
    I'd given up on ultra_View because I didn't have the skill to understand how to make the changes. With your instructions its seems at least there is a process one might follow. Thanks for taking the time to help those of us less skilled.

    Happy Holidays

    Dennis
    Not too old to learn

    Comment


      #3
      Tom,
      Thanks for the great info. Every layer that get peeled back helps. I have fudged UV status asp by using response.write, but that seems to break the original intent of UV. With your notes I think I am closer to 'breaking the code'. I have one problem (probably many more, I just don't know it yet) I have taken the Irragation section and revised it to be used for 'WAF AB8SS'. I can not get the speaker devices to show up. I changed the test='TYPE section, but nothing shows up. I can go to the Fans.xsl and add the WAF AB8SS in the TEST and the speakers show up there. I have to think it is something very simple, but I am lost. Any ideas?

      TIA,
      michael

      Comment


        #4
        Hmmm, not sure Michael. Can you upload the xsl that doesn't work and the other that does so we can take a look?

        -Tom

        Visit my HomeSeer at http://68.55.68.192:81 (New Guest Downloads!)

        [This message was edited by Tom Kern on Tue, 30 December 2003 at 10:00 AM.]
        -Tom

        Visit Kernhome
        Kern Theater Gallery

        (User: guest / Pass: guest)

        Comment


          #5
          Tom,
          Thanks for the quick response. The offending file is below. Also, I ran the .vbs in step 3 and didn't get any script errors.
          michael
          Attached Files

          Comment


            #6
            That looks good to me, is there a chance that the section where you want it to show up in your ultraview asp does not have the divAudio tag? If you want to post your asp I can take a look at that too.

            BTW, no problem on posting the instructions for you guys. I've been wanting to put something together for a while but just hadn't had time.

            -Tom

            Visit my HomeSeer at http://68.55.68.192:81 (New Guest Downloads!)

            [This message was edited by Tom Kern on Tue, 30 December 2003 at 09:59 AM.]
            -Tom

            Visit Kernhome
            Kern Theater Gallery

            (User: guest / Pass: guest)

            Comment


              #7
              Tom,
              I appreciate the help. Here is the asp section


              <tr>
              <td width="100%" valign="top" align="left" colspan="2" class="tableheader" height="22">Audio Status</td>
              </tr>
              <tr>
              <td colspan="2">
              <div id="divAudio" style="height=85; overflow: auto;">
              <table border="0" width="100%" cellpadding="0" cellspacing="1">
              <tr>
              <td class="tablerowodd"></td>
              </tr>
              </table>
              </div>
              </td>
              </tr>


              thanks,
              michael

              Comment


                #8
                I ran the vbs file to check for errors (not seeing any status of devices). I see the page, but no information is showing up on it.

                I am getting:

                Script Error:
                500:Variable is undefined 'GetLocation' in line 202

                Line 202 of which file?

                Thanks!

                Comment


                  #9
                  Did you look in your ultra_view2_status.txt file located in the HTML folder and make sure that it contains the following code in the ProcessData sub?

                  set objDivElement = document.all.divAudio
                  Call LoadDiv("ultra_view2_status_audio.xsl", objDivElement)


                  jeport:

                  I think the line 202 would be in the xml file that is trying to be built, but I'm not sure. I would probably do a text search in windows (Start - Search - All Files and Folders) and search in containing text for "GetLocation". Make sure you are not searching for filenames, but in the files themselves and search the HTML folder. See what you come up with and where that leads...


                  -Tom

                  Visit my HomeSeer at http://68.55.68.192:81 (New Guest Downloads!)
                  -Tom

                  Visit Kernhome
                  Kern Theater Gallery

                  (User: guest / Pass: guest)

                  Comment


                    #10
                    Tom

                    Yes, it is there. Here is the info:

                    '
                    'This subroutine refreshes the data by using XML and XSLT (applied to the XML)
                    '
                    sub ProcessData()

                    ON ERROR RESUME NEXT

                    dim bSuccess
                    dim objDivElement

                    bSuccess = LoadXMLFile()
                    if not bSuccess then exit sub

                    set objDivElement = document.all.divSecurity
                    Call LoadDiv("ultra_view2_status_security.xsl", objDivElement)

                    set objDivElement = document.all.divTemperature
                    Call LoadDiv("ultra_view2_status_temperature.xsl", objDivElement)

                    set objDivElement = document.all.divAudio
                    Call LoadDiv("ultra_view2_status_audio.xsl", objDivElement)

                    set objDivElement = document.all.divIrrigation
                    Call LoadDiv("ultra_view2_status_irrigation.xsl", objDivElement)

                    set objDivElement = document.all.divNetwork
                    Call LoadDiv("ultra_view2_status_network.xsl", objDivElement)

                    set objDivElement = document.all.divDevices
                    Call LoadDiv("ultra_view2_status_devices.xsl", objDivElement)

                    set objDivElement = document.all.divDevices
                    Call LoadDiv("ultra_view2_status_lights.xsl", objDivElement)

                    set objDivElement = document.all.divFans
                    Call LoadDiv("ultra_view2_status_fans.xsl", objDivElement)

                    Call RefreshStatusDiv("none", "")
                    bRefreshing = False

                    set objDivElement = Nothing

                    end sub

                    Thanks again,
                    michael

                    Comment


                      #11
                      What if you delete the audio.xsl and copy the fans to audio? Will that work?

                      -Tom

                      Visit my HomeSeer at http://68.55.68.192:81 (New Guest Downloads!)
                      -Tom

                      Visit Kernhome
                      Kern Theater Gallery

                      (User: guest / Pass: guest)

                      Comment


                        #12
                        Is the variable that is not being defined?

                        Any suggestions?

                        Comment


                          #13
                          <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by jeport:
                          I ran the vbs file to check for errors (not seeing any status of devices). I see the page, but no information is showing up on it.

                          I am getting:

                          Script Error:
                          500:Variable is undefined 'GetLocation' in line 202

                          Line 202 of which file?

                          Thanks!<HR></BLOCKQUOTE>

                          GetLocation() is a function called within ultra_view2_xml.vbs. If your only trying to get the Ultra View2 Status working, then you need to create a blank ultra_view2.cfg file and put that file into the /HomeSeer/scripts directory.
                          <pre class="ip-ubbcode-code-pre">
                          function GetLocation(strDeviceID)

                          dim arrLocation

                          select case strDeviceID
                          case else arrLocation = array(-100, -100, 1, 0)
                          end select

                          GetLocation = arrLocation

                          end function
                          </pre>

                          This file is usually created when running the configuration utility outlined witin the setup instructions.

                          Regards,
                          Ultrajones
                          Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                          Comment


                            #14
                            Tom

                            I replaced the xml as suggested. There was no change.

                            tia,
                            michael

                            [This message was edited by michael_turner0 on Tue, 30 December 2003 at 09:44 PM.]

                            Comment


                              #15
                              Test to see if your getting XML output by pointing your browser to:

                              http://127.0.0.1:80/ultra_view2_xml.vbs

                              Once that works, then you can start troubleshooting the other files.

                              Regards,
                              Ultrajones
                              Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                              Comment

                              Working...
                              X