Announcement

Collapse
No announcement yet.

HS3 + ASP = ?

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

    HS3 + ASP = ?

    I put this post in an old thread but thought I would ask it here as well. I use an ASP page to get the PIR on my Axis camera to trigger an event in HS2. However, it doesn't work in HS3.

    Based on some searches, it's not clear whether ASP is supported in HS3? This post by Admin says that "classic" ASP isn't supported however I don't know enough to tell the different between classic ASP, ASP, ASP.net or ASPx. I think ASPx = ASP.net.

    So would converting this code to ASPx/ASP.net work in HS3?

    <%
    dim msg
    msg = Request.QueryString("Message")
    If StrComp(msg, "comp_camera_motion") = 0 then
    hs.triggerevent("GotCompMotionEvent")
    End If
    %>

    #2
    So this seems interesting. HS3 reports an error in the log when the Axis server triggers the file axishandler.asp and the file doesn't exist in the html folder. The error is:

    Running script: File not found: C:\Program Files (x86)\HomeSeer HS3\html\axishandler.asp

    however when I change the file in Axis server to trigger a file axishandler.aspx or axishandler.asax, no error is generated whether or not a file by that name exists in the html folder. Curious why HS3 would detect an ASP file missing but not an ASPX/asax file.

    Comment


      #3
      Originally posted by nmaycher View Post
      I put this post in an old thread but thought I would ask it here as well. I use an ASP page to get the PIR on my Axis camera to trigger an event in HS2. However, it doesn't work in HS3.

      Based on some searches, it's not clear whether ASP is supported in HS3? This post by Admin says that "classic" ASP isn't supported however I don't know enough to tell the different between classic ASP, ASP, ASP.net or ASPx. I think ASPx = ASP.net.

      So would converting this code to ASPx/ASP.net work in HS3?

      <%
      dim msg
      msg = Request.QueryString("Message")
      If StrComp(msg, "comp_camera_motion") = 0 then
      hs.triggerevent("GotCompMotionEvent")
      End If
      %>
      Classic ASP works fine in HS3 if you are running it on a windows box. I use many ASP pages with HS3. Some of the hs script commands need to be converted as there are differences between HS2 and HS3. The ASP code you posted looks like it will work under HS3. Have you tried it? Do you get any error messages?

      Cheers
      Al
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        #4
        It's the first thing I tried. I just moved the file over from HS2 to HS3 and nothing happens.

        The only time I get any reporting in the log is if the axis camera points to an .asp file and the file isn't located in the html folder, then I get the error I mentioned above. So it's telling me that the camera server is triggering HS3 and HS3 is responding but nothing happens. HS2 still works fine with the file above and the same camera.

        Nothing happens if the Axis server points to an .aspx or a .asax file, whether or not it is in the folder. Not sure HS3 is even scanning for these files.

        I noticed a couple of posts form 2014 that said there was a bug regarding Request.QueryString but I checked Bugzilla and found nothing.

        Comment


          #5
          Yes, there was a bug with request.querystring (see http://bugzilla.homeseer.com/bugzill...ug.cgi?id=1491), but it was resolved last year. What version of HS3 are you running? I use a similar method with my Foscam cameras and this is what my ASP looks like:

          Code:
          <%
          
          	Camera = request.querystring("camera")
          	hs.writelog "Cam Alarm",Camera
          	hs.TriggerEvent Camera
          
          %>
          Maybe try reformatting yours and adding a writelog command so you can see if the request.querystring actually works:

          Code:
          <%
          dim msg
          msg = request.querystring("Message")
          hs.writelog "Camera Message",msg
          
          If StrComp(msg, "comp_camera_motion") = 0 then
          hs.triggerevent GotCompMotionEvent
          End If
          
          %>
          Cheers
          Al
          HS 4.2.8.0: 2134 Devices 1252 Events
          Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

          Comment


            #6
            Stupid dumb crappy error. I played with this for hours but just found that I had an extra preceding space in the Event name when I created it.

            The code above works fine. I'm listening to my camera tell me there is motion ever time I move an inch

            Thanks for the help Al. I think I'm going to lose my few remaining hairs left if I move to HS3. But it's so powerful and customizable that I'm very tempted.

            Of course now I know about writelog as well. That would have helped ot find this problem earlier.

            Comment

            Working...
            X