Announcement

Collapse
No announcement yet.

how to Set DeviceString From web page

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

    how to Set DeviceString From web page

    I searched and couldn't find any info on if I can set the devicestring from a custom web page

    I know how to set a dim from a web page.
    <select name="selectdim" SIZE="1" onchange="this.form.submit();"<option-blah-blah-blah

    Can I set the deviceString from a web page for a device. With a drop down select box.

    Thanks For any help.

    StevenE
    Why oh why didn't I just leave things alone, they had been working.

    #2
    Just include something like:
    <pre class="ip-ubbcode-code-pre">
    &lt;%
    hs.SetDeviceString "z1","&lt;img border=""0"" src=""clock.gif""&gt;A clock"
    %&gt;
    </pre>

    in an asp page. Add as many of the above lines in a drop down list box and submit the entire line.

    -Rupp
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Rupp,

      Pardon the incompetence. But I am no where near writing my own code. Everything I used so far is just a cut and paste from other scripts and web stuff.

      I know how to use hs.devicestring from the web page.
      I just don't understand how to get it into a drop down box.

      If you could point me to examples or code I could pick apart. I would appreciate it.

      I coudn't find anything on my own how to set the devicestring from an drop down box for my htm pages.

      Thanks.
      StevenE
      Why oh why didn't I just leave things alone, they had been working.

      Comment


        #4
        Please spell what you're trying to do: when this should happen (in response to what trigger) and what exactly should happen.

        The best I can guess is you want to make a custom web page that lets you set some device's event string interactively, by choosing one from a list. This is not that hard to do, but it is not something you can do without knowing how to write scripts. IMO, you have to learn VBScript (or some other scripting language) and HTML and HomeSeer before you can do HomeSeer ASPs, and that's really the only way to make the kind of page you're describing.

        Nucleus Home Automation
        News, support, and updates for Rover, Network Monitor, TimeIcons, and more

        Comment


          #5
          Try this small asp file and let me know if this is what your looking for.

          <pre class="ip-ubbcode-code-pre">
          &lt;%@ Language=VBScript %&gt;
          &lt;HTML&gt;
          &lt;HEAD&gt;
          &lt;META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"&gt;
          &lt;/HEAD&gt;
          &lt;BODY&gt;

          &lt;%
          Response.Write(Request.Form("select1"))
          value = Request.Form("select1")
          select case Request.Form("select1")
          case "A64 Motion Detected"
          hs.SetDeviceString "A64","Motion Detected"
          case "A64 No Motion Detected"
          hs.SetDeviceString "A64","No Motion Detected"
          case "A64 Some Motion Detected"
          hs.SetDeviceString "A64","Some Motion Detected"
          case "A3 Motion Detected"
          hs.SetDeviceString "A3","Motion Detected"
          case else
          Response.Write "&lt;br&gt;no hit"
          end select



          %&gt;
          &lt;FORM action="" method=post &gt;
          &lt;SELECT id=select1 style="WIDTH: 199px" name=select1&gt;
          &lt;OPTION &gt;A64 Motion Detected&lt;/OPTION&gt;
          &lt;OPTION &gt;A64 No Motion Detected&lt;/OPTION&gt;
          &lt;OPTION &gt;A3 Motion Detected&lt;/OPTION&gt;
          &lt;OPTION selected&gt;A64 Some Motion Detected&lt;/OPTION&gt;
          &lt;/SELECT&gt;&lt;INPUT type=submit value=Submit&gt;
          &lt;P&gt;&lt;/P&gt;&lt;/FORM&gt;
          &lt;/BODY&gt;
          &lt;/HTML&gt;
          </pre>

          Just paste this into a file named setdevstring.asp and put it in your Hs/html directory and give it a go.

          -Rupp
          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

          Comment


            #6
            Hunter,

            Actually I know very little about vbscript but understand the basics. Literally from basic programming in high school on the apple iie..
            frightening now that I think about it.

            I know absolutely nothing about vbscript or any other language. But i am very adapt at picking code pieces out of something else and using them in my stuff.

            I currently am running a lot of custom asp pages I pasted together to do what I want. A little help from frontpage for astectics and I am good to go.

            I just got stuck on the one function right now.

            I will futz with the code rupp provided and give it a whirl.

            StevenE
            Why oh why didn't I just leave things alone, they had been working.

            Comment


              #7
              Thanks Rupp,

              That looks like what i was looking for.
              I will give it a try tommorow.

              Thanks again.

              StevenE
              Why oh why didn't I just leave things alone, they had been working.

              Comment

              Working...
              X