Announcement

Collapse
No announcement yet.

Getting a basic device list in my ASP page

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

    Getting a basic device list in my ASP page

    I've been trying for two days now to get my ASP page just to display device values! This is frustrating! I was hoping that there would be a complete example in Help or a script -- but no! Anyway, I want to get the device name, location, value and time for all devices. Note that the ASP page is _not_ running from the HS webserver but my IIS server. Why isn't this working?

    Set hs = createobject("HomeSeer.application")
    If hs is Nothing Then
    response.write "Got an empty homeseer object."
    response.end
    End If
    hs.speak "boo"
    Set DE = hs.GetDeviceEnumerator

    It dies when trying to get the DeviceEnumerator. I get the error "Object variable or With block variable not set". The hs.speak works so I know that hs is getting set. Is I set hs to Homeseer2.Application, I get a different error when trying to get the DeviceEnumerator, "Object doesn't support this property or method: 'GetDeviceEnumerator'". I can't see any other way of getting this done.

    Please help. Thanks much!

    Tahl


    #2
    Go to the programming with homeseer forum and you will see some example asp pages. If you are going to be using the HS webserver and host your html file the homeseer html directory I don't think you need the set application command. I think you can just access the hs object directly. Thus the only code you would need is

    Code:
    [B][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]hs.speak "boo"
    Set DE = hs.GetDeviceEnumerator[/COLOR][/SIZE][/COLOR][/SIZE][/B]
    James

    Running HS 3 on Win10 .

    Comment


      #3
      Really have no examples

      I've looked at about every thread. There are very few ASP examples and most of them are actually ASPX examples and assume you are running the pages on the HS webserver. I want to run these pages _not_ on the HS webserver but my regular IIS webserver. So....

      I just want to get a few lines to work. I'd really hate to have the ASP page kick off a hosted VBScript which would create a file that my ASP page would read but it might have to get ugly!

      Comment


        #4
        Originally posted by tahl View Post
        I've looked at about every thread. There are very few ASP examples and most of them are actually ASPX examples and assume you are running the pages on the HS webserver. I want to run these pages _not_ on the HS webserver but my regular IIS webserver. So....

        I just want to get a few lines to work. I'd really hate to have the ASP page kick off a hosted VBScript which would create a file that my ASP page would read but it might have to get ugly!
        HomeSeer 2 uses a .net control for remoting and it doesn't work between IIS and HS via asp. It does work when using ASPX page though.
        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

        Comment


          #5
          Well, won't work is an answer

          To be honest, I don't know about ASPX pages (are they that much different than ASP pages?) and not sure that my current IIS server will handle them....

          Looks like I'll take the ugly solution. At least I tried.

          Thanks for the help.

          Comment


            #6
            Just for info, What are you trying to show on IIS pages?
            Jon

            Comment


              #7
              What I'm trying to show

              I'm trying to show device name, location, value (current state) and time last updated.

              Tahl

              Comment


                #8
                I was just thinking outside the box. You could for instance use my image builder to create a png/jpg file(s) via Homeseer (with device information etc.) and insert them in your IIS pages as images.
                Jon

                Comment


                  #9
                  Yes IIS will run aspx pages if you have the 2.0 and higher .net frameworks loaded. I'm on vacation but if I get a chance I'll throw together a starter aspx page that will run on IIS for you.
                  💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                  Comment


                    #10
                    aspx pages to work

                    That would be wonderful if you could help. I am running IIS 5.1 so check on that. The .net framework I'm assuming is loaded because homeseer requires it. However, if there is something that I have to specifically do with IIS with regard to .net, please advise. I've been doing plain ol' .asp pages for years and haven't done anything with .aspx. So I'm clueless on .aspx.

                    My home automation website is www.liamsite.net by the way....

                    Comment


                      #11
                      Until I return home you may be able to find a simple aspx page in the HomeSeer directory that you can start with.
                      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                      Comment


                        #12
                        Look to see if there's a text.aspx page in your HomeSeer html directory. Also see this how-to on using IIS with HomeSeer.
                        http://board.homeseer.com/showthread.php?t=113751

                        This should get you going.
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment


                          #13
                          Got working

                          Took a few hours... First, I didn't know about that article. You'd think they'd put it in the script section! So once I read the article, I understood the requirements. Next, I didn't know that my IIS 5.1 had .NET 1.1 installed but when I ran the test script, it's nice enough to say what version I'm running. Took a couple of hours to figure out that I have to run aspnet_regiis to install the .NET 2.0 I already had. Then following the article more, tweak my script a bit (apparently aspx changes some rules on script running in a page) and voila!

                          So thanks everyone for the help....

                          Comment

                          Working...
                          X