Announcement

Collapse
No announcement yet.

How to show DeviceLastChange in UltraView2 Status???

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

    How to show DeviceLastChange in UltraView2 Status???

    In UltraView2 Status, I want to display a table with two columns - one that shows the DeviceString and another that shows the DeviceLastChange. The default XSL files for UV2 Status show the device name and the DeviceString.

    The applicable section in my XSL file looks like the following. Instead of "NAME", I want to have the value of DeviceLastChange in the second column. How can this be done?

    PHP Code:
    <xsl:if test="TYPE = 'Caller ID'">
        <
    tr>
            <
    td class="tableroweven" width="50%" valign="top" align="left">
                <
    xsl:value-of select="STRING" />
            </
    td>
            <
    td class="tablerowodd" width="50%" valign="top" align="left">
                <
    xsl:value-of select="NAME" disable-output-escaping="yes"/>
            </
    td>
        </
    tr>
    </
    xsl:if> 

    #2
    Hmm, its been a while... try changing NAME to @CHANGE
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    Comment


      #3
      Didn't work. Any other ideas?

      Comment


        #4
        From the HomeSeer web interface, load up ultra_view2_xml.vbs. Does the DEVICE element have a CHANGE attribute as shown below?

        PHP Code:
        <DEVICE ID="deva12345" CODE="O4" STATUS="3" VALUE="0" TIME="224" CHANGE="4/30/2004 6:27:00 AM" CTL="2">
          <
        ICON X="39" Y="186" Z="0" FLOOR="-1">
           <![
        CDATAoff.gif  ]]> 
          </
        ICON>
          <
        NAME>Side Light</NAME
          <
        STRING>
           <![
        CDATAOff  ]]> 
          </
        STRING>
          <
        LOCATION>Outside</LOCATION
          <
        TYPE>Light Switch</TYPE
        </
        DEVICE
        Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

        Comment


          #5
          UltraJones,


          I too have struggled with this. I have reviewed my xml code and noticed that I do not have the change time listed, hence probably the reason I have never had much success. As requested, here is a snippit from one of my temp sensors that I would like to have the last change info for.

          PHP Code:
          - <DEVICE ID="deva63391" CODE="_15" STATUS="17" VALUE="8" TIME="84" CTL="3">- <ICON X="-100" Y="-100" Z="0" FLOOR="1">- <![CDATAdegrees/t8.gif  ]]>f(clean);   </ICON>  <NAME>4A0008008B63CD10</NAME> - <STRING>- <![CDATA8  ]]>f(clean);   </STRING>  <LOCATION>Attic</LOCATION>   <TYPE>Temperature</TYPE>   </DEVICE
          Instead of using the @change command, I use the @time command as shown below, which just shows the last time the device changed in minutes.

          PHP Code:
           <td class="tableroweven" width="25%" valign="top" align="left">
          <
          xsl:value-of select="LOCATION" /> 
          </
          td>
          <
          td class="tableroweven" width="35%" valign="top" align="left">
          <
          xsl:value-of select="NAME" />
          </
          td>
          <
          td class="tablerowodd" width="25%" valign="top" align="left">
          <
          xsl:value-of select="STRING" disable-output-escaping="yes"/>
          </
          td>
          <
          td class="tablerowodd" width="15%" valign="top" align="left">
          <
          xsl:value-of select="@TIME" />
          </
          td

          Thanks for a great add-on


          Steven
          Brampton, Ontario

          Comment


            #6
            If you don't have the @CHANGE attribute, then your using an older version of UltraView2.
            Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

            Comment


              #7
              I don't have the @CHANGE attribute either. According to ultra_view2_status.txt, I'm using HomeSeer Ultra View2 Status Version 1.2.0. Where can I get an update that gives me the @CHANGE attribute? Do I need to get everything or just one or two files? Thanks!

              -Peter

              Comment


                #8
                OK, I found Ultra View2 1.2.1 here - http://board.homeseer.com/showthread.php?t=85756. I think that the @CHANGE attribute is provided for in the ultra_view2_xml.inc file. Comparing the 1.2.0 version that I have to the 1.2.1 version, I see quite a few additions. I'm hesitant to just replace my file with the new one 'cause I've done quite a bit of customization to it already. Guess I don't have a choice though, so I'll attempt it - piece by piece.

                I don't want to replace all my 1.2.0 files with 1.2.1 files 'cause I've spent many, many hours customizing UV2 Status. Will adding the @CHANGE stuff to my ultra_view2_xml.inc file give me the ability to get DeviceLastChange, or do I need to modify more than just ultra_view2_xml.inc?

                Ultra: I know it's probably been a while since you looked at this stuff. Appreciate your help and time spent looking at this.

                Comment


                  #9
                  Solved...

                  Got it. I copied all lines that contained CHANGE or strDeviceLastChange from the 1.2.1 version of ultra_view2_xml.inc into my (1.2.0) version. There were four lines to copy. This added the ability to use the @CHANGE attribute in my .xls file. All is good now. Thanks for pointing out that I had an old version.

                  Comment


                    #10
                    Peter,

                    Thanks for all the info you posted, including the number of lines to change. I was in the same boat, that I have done a fair amount of tweaking and was hesitant to mess with it just yet. Have to keep up the WAF or I may be toast.

                    Steven

                    Comment

                    Working...
                    X