Announcement

Collapse
No announcement yet.

Custom Status page

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

    Custom Status page

    I a complete newbie when it comes to HTML and asp. The only stuff I've ever done is use Word to edit HTML documents and put in the odd hyperlink.

    My question is:

    Is there an easy way to create a simplified status page without learning HTML and asp?

    What I want to do is have a very simple status display on a black background using large white fonts. I need it to look like this as I am viweing it on a standard TV through a PC-TV convertor so it is very low resolution, but can be viewed throughout the house.

    I would like the page to have the current date/time sunset/rise times and half a dozen or so status displays. i.e. 'The temperature is XX' 'You have xx new voicemails' 'The central heating is on/off' etc... I don't need the page to control devices- that can be next years project! I might have learned how to do it myself by then!

    It would be really good if this could be displayed in an IE window without the buttons at the top. Even better if it could it be activated as the HS computer screensaver.

    I have a feeling I might be being too ambitious... [img]/infopop/emoticons/icon_frown.gif[/img]

    Jon

    #2
    You really need to learn a bit of HTML and .asp.

    It actually is very easy once you get started, so I cooked up a basic .asp page to get you started. Take a look and give it a try.

    With HomeSeer, you are going to get the most bang by using a .asp format. On a very basic level all you have to do is include the .asp code between the <% %> markers

    Take a look at the HoomeSeer scripting functions Help files for ideas about code
    It might help to download a basic HTML editor. I use one called CoffeeCup

    I will put a screenshot of the basic.asp page below.
    Attached Files

    Comment


      #3
      [img]/infopop/emoticons/icon_smile.gif[/img]
      Attached Files

      Comment


        #4
        Thanks HomeseerLover,

        Thats exactly the sort of thing I was trying to acheive.

        I don't understand it all yet, but it will help to learn by example. At least I can see how the source code is meant to be arranged!

        One question. In your screenshot, it shows the window displayed without the address bar etc. When I try the page on my PC that doesn't happen. How do you make it display the page like that without pressing F11?

        Jon

        Comment


          #5
          <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> One question. In your screenshot, it shows the window displayed without the address bar etc. When I try the page on my PC that doesn't happen. How do you make it display the page like that without pressing F11?
          <HR></BLOCKQUOTE>

          I pressed F11 [img]/infopop/emoticons/icon_smile.gif[/img]

          You can have the page open to Full Screen using a java script such as:

          Full Screen, but I can't figure out how do do it automatically from the start.

          you should add a mete refresh line to the page so that it automatically updates e.g.

          if you put the line
          &lt;META http-equiv="refresh" content="60; URL=/basic.asp"&gt;

          the page will refresh ever 60 seconds

          Comment


            #6
            Thank you HomeSeerLover, I'm also new to ASP scripting and I wanted to make a simple page for my Treo phone so I know if the security system is on, the temperature of the PC, etc. I only need to show status of various devices, that's it.

            It's good that I have something to start with. Thanks,

            Hmm, something is not right. When I click on the basic.asp link, I don't get the download dialog box, instead it opens up in the browser. If I right-click on the link, it can only save as html file.

            Simon

            Comment


              #7
              Simon, just rename it to basic.asp

              Comment


                #8
                That's it, thank you very much.

                2 problems I run into so far:

                a) I was trying to use: response.send "&lt;b&gt;" & "IP: " & IP & "&lt;/b&gt;&lt;br&gt;", but I'm getting a text dump in the browser. What's the difference between response.write and response.send?

                b) hs.DeviceString takes the whole line with the icon string but I don't want them to show up in the phone. Is it possible to just format the string to just the text with nothing else?

                Your help is much appreciated,

                Simon

                Comment


                  #9
                  htsource,

                  Check this thread. There are a couple of solutions in there.


                  Paul

                  Comment


                    #10
                    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> a) I was trying to use: response.send "" & "IP: " & IP & "&lt;br&gt;", but I'm getting a text dump in the browser. What's the difference between response.write and response.send?

                    <HR></BLOCKQUOTE>

                    I have to admit that I am not quite sure other than response.write [writes] to the web page. More info can be found in the HS Help Section
                    8.7 Controlling HomeSeer using ASP pages


                    I am sure that one of the .asp experts will fill us in [img]/infopop/emoticons/icon_smile.gif[/img]

                    I expect the reason that you are getting a textt dump is that the code is not between &lt;% ---- %&gt; tags

                    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>

                    b) hs.DeviceString takes the whole line with the icon string but I don't want them to show up in the phone. Is it possible to just format the string to just the text with nothing else?
                    <HR></BLOCKQUOTE>

                    This is a little harder (but you are ready)
                    You need to use the VB Mid and Instr commands

                    Mid Function
                    Returns a specified number of characters from a string.

                    Mid(string, start[, length])

                    InStr Function
                    Returns the position of the first occurrence of one string within another.

                    InStr([start, ]string1, string2[, compare])


                    So using the above commands I can find a string
                    starting after the text &lt;center&gt; which will be 1000 characters long (The number 1000
                    here is arbitary, but is longer than the
                    expected string)

                    The VB command Replace gets rid of unwanted text by replacing the text with "" (nothing)

                    Here is the code:

                    <pre class="ip-ubbcode-code-pre">

                    sets = hs.DeviceStringByName("System Sets 102.1")
                    position = Instr ( sets, "&lt;center&gt;") + 8

                    sets = Mid ( sets, position , 1000)

                    sets = Replace (sets, "&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;", "",1,-1,1)

                    hs.write sets
                    </pre>

                    Here is the string from the device System Sets 102.1

                    cellpadding='0'&gt;&lt;tr&gt;&lt;td class='tablecellcustom' width='54'&gt;&lt;a href='#' onClick="window.open('http://www.sets102.com/now.html','newWnd','width=625,height=450,toolbar=1,status=0, scrollbars=1,resizable=1')"&gt;&lt;img src='Sets2000logo.jpg' width='100' height='85' align='left'&gt;&lt;font color="#0000FF"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;& lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;marquee&gt; Click Here for Current Song Info&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/marquee&gt;&lt;/td&gt;&lt;td class='tablecellcustom' width='300'&gt;&lt;center&gt; COME AS YOU ARE by NIRVANA on NEVERMIND&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;


                    The final result on the .asp page is

                    COME AS YOU ARE by NIRVANA on NEVERMIND

                    Comment


                      #11
                      Guys, thank you very much. I'm getting closer to finish off the status page. I'm very excited to finish it off and this will be my first ASP page build by myself (sort of) [img]/infopop/emoticons/icon_smile.gif[/img]

                      Thanks again,

                      Simon

                      Comment


                        #12
                        Simon, very cool glad to hear that you are off to a good start.

                        You can keep adding and adding and....

                        Keep us posted on your progress!!!!!

                        Comment


                          #13
                          HSlover,

                          I have been busy this morning trying out asp page creation (using your starting point) but have struck a brick wall.
                          Can you tell me why this:

                          response.send "Shelf Light is " & hs.DeviceString("A5")

                          doesn't work? The asp page just displays 'Shelf light is '

                          I can do it like this:

                          StatusA5 = hs.DeviceStatus ("A5")
                          if StatusA5 = 2 then hs.SetDeviceString "A5","on"
                          if StatusA5 = 3 then hs.SetDeviceString "A5","off"
                          if StatusA5 = 4 then hs.SetDeviceString "A5","dim"
                          if StatusA5 = 17 then hs.SetDeviceString "A5","unknown"

                          response.send "Shelf Light is " & hs.DeviceString ("A5")

                          But that is a load of code. Not too bad for one or two devices, but I need to put a thermostat display in there. That will need pages of conditional statements.


                          What am I doing wrong.

                          Another question, how do I make the colon in the time flash. I have tried &lt;blink&gt; but its only supported in netscape. Is there an IE equivalent?


                          Jon

                          [This message was edited by JPLeedsUK on Sunday, 22 September 2002 at 06:22 AM.]

                          Comment


                            #14
                            HomeSeerLover,

                            I've tried your codes and it's working pretty good except there's a bit of formatting issue [img]/infopop/emoticons/icon_smile.gif[/img]

                            Since I need to use the codes to strip off the formatting string so I thought I would make it a function so I can call it whenever I need it.

                            Here's the function:

                            <pre class="ip-ubbcode-code-pre">
                            Function stripicon(strDeviceName)
                            sets = hs.DeviceString(strDeviceName)
                            position = Instr ( sets, "&lt;center&gt;") + 8
                            sets = Mid ( sets, position , 1000)
                            sets = Replace (sets, "&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;", "",1,-1,1)
                            response.write sets
                            End Function
                            </pre>

                            And here's how I call it:

                            response.send "Temperature: " & stripicon("w3")

                            The final result is:

                            15 Degreee CTemperature:

                            I know the problem is the last line in response.write sets but I'm not sure how to change it so that the string is after "Temperature: " like it should be.

                            Your help is much appreciated.

                            Simon

                            Comment


                              #15
                              Jon,

                              Does "A5" have any status text such as On/Off? If you only have icon but no text set up, you won't see any text on the phone.

                              Also, you can bring up the ASP page in IE or Netscape and see how it looks. In IE, if you click on View, Source. You can see how the ASP is working and what is in the "A5".

                              In my case, I want to get rid of the icon and all other format strings but just leave the text.

                              Hope it helps,

                              Simon

                              [This message was edited by htsource on Sunday, 22 September 2002 at 09:22 AM.]

                              Comment

                              Working...
                              X