Announcement

Collapse
No announcement yet.

Whats wrong with hs.ping

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

    Whats wrong with hs.ping

    I have tried
    <pre class="ip-ubbcode-code-pre">
    u = hs.ping("www.yahoo.com", 0)
    </pre>
    and receive runtime error 380.

    I also tried
    <pre class="ip-ubbcode-code-pre">
    u = hs.ping(CStr("www.yahoo.com"), 0)
    </pre>
    same error


    I also tried
    <pre class="ip-ubbcode-code-pre">
    address = "www.yahoo.com"
    u = hs.ping(CStr(address), 0)
    </pre>
    same error

    Why is this so hard to use and how is it supposed to be used?

    -Rupp
    ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.

    [This message was edited by Rupp on Wednesday, 09 October 2002 at 10:49 PM.]
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    #2
    It could be that icmp packets are dropped at their end.

    -Nitrox

    Comment


      #3
      I can use ping www.yahoo.com just fine from the command prompt.

      -Rupp
      ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        I have the same experience, unable to ping by name. I verified that 'ping' works properly from a command prompt and successfully resolves the name to an IP. From HS I get the 380 error. There was another thread on this about a month ago.

        Wish I new what a 380 error means.

        HomeSeer Environment:
        Pentium III 733mhz
        384mb PC133 SDRAM
        HS 1.6, W2K SP3
        MR26A, TI103
        X10 Pro PDT20 thermostat

        Comment


          #5
          It's a dll posted here. It's been around since before hs.ping. I call it with a function based on the code Stevech posted earlier in that thread.

          <pre class="ip-ubbcode-code-pre"> Function ping(pIP,pTimeOut)
          ' Returns success of ping as True or False
          ' pTimeOut is milliseconds to wait

          Dim sping

          SET sping = CreateObject("SpingCtl.SPing.1")
          sping.RemoteHost = pIP
          sping.Timeout = pTimeOut
          sping.PacketSize = 32
          sping.DoHostResolution = FALSE
          sping.Blocking = FALSE
          sping.DoPing
          ping = cBool(sping.ReplyCode = 0)
          set sping = nothing

          End Function
          </pre>

          Paul

          Comment


            #6
            VB error 380 = "invalid property value". Looks like hs.ping only wants ip addresses.

            Comment


              #7
              The users manual states:

              "Name or IP address of host to ping"

              -Rupp
              ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #8
                I agree, according to the manual it should work either way. It is broken, has anyone e-mailed Rich on it?

                Comment


                  #9
                  (I hope I do this right)

                  This is a previous thread with Rich's reply.

                  http://ubb.homeseer.com/6/ubb.x?a=tp...4&m=1232916276

                  HomeSeer Environment:
                  Pentium III 733mhz
                  384mb PC133 SDRAM
                  HS 1.6, W2K SP3
                  MR26A, TI103
                  X10 Pro PDT20 thermostat

                  Comment


                    #10
                    As you can see from my first post, I tried that (last section) and this too didn't work.

                    -Rupp
                    ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      #11
                      Leave off the www.

                      <pre class="ip-ubbcode-code-pre">
                      strName = "yahoo.com"
                      intValue = hs.Ping(CStr(strName),5)
                      </pre>

                      Jeff Farmer

                      --
                      Jeff Farmer
                      HS 3, HSPhone
                      My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                      Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                      Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                      Comment


                        #12
                        Thanks. Why. Is there an implied www?

                        -Rupp
                        ...One Nation Under GOD, Indivisible, With Liberty And Justice For All.
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment


                          #13
                          As to why hs.ping works that way, I don't know. That would be a Rich question. I just stumbled across it.

                          It may have to do with the fact that you register a domainname it does not have the www on it. Once the domainname is pointed to a server, the server than has to be setup to use www, mail, ftp, etc. So the www is not part of a domainname.

                          Jeff Farmer

                          --
                          Jeff Farmer
                          HS 3, HSPhone
                          My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
                          Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

                          Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

                          Comment


                            #14
                            The lookup is probably failing with the WWW. For ping, you really only need the host name or IP address.

                            -Rich

                            HomeSeer Technologies LLC
                            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                            Comment


                              #15
                              www.yahoo.com maps to an IP exactly the same as yahoo.com does. In fact, for some domains, the base domain name will not have a DNS record pointing to an IP address, while the www version will; and for others, vice versa. yahoo.com is one where both exist, but point to different addresses, and you might get different results (one may be down, or one might not answer pings). There's nothing inherently better about with-www or without; they're both just DNS names.

                              But that's besides the point. The issue here isn't that the ping got send out and failed to come back, because that wouldn't be a problem. That's a successful result -- it means you asked a question (is there network connectivity to this place) and got an answer (no). That's exactly as successful an outcome as getting the ping reply back (same question, but a 'yes' answer).

                              The problem is that the ping never gets sent, the command never gets executed, the question never gets answered. The command aborts with an unhelpful error number as if it were passed an invalid parameter, even though the parameter is valid. This has happened both with IPs and DNS names. In fact, for someone else running the same script with the same parameter it might work. That's a problem with the command, not with your network connectivity or the server or its DNS entries.

                              hs.ping has been like this since day one, and though it's often been questioned, it's never been seriously investigated. Long ago I tried to use it and got inconsistent results. Usually, a constant would work, but a variable holding the same value would fail, no matter what type the variable was cast into. Other people could get it to work with the same code that didn't work for me, and vice versa. Eventually, I dismissed the command as unusable until fixed, and so it has remained. I was hoping this might be the time it gets looked at, but we've gotten sidetracked again.

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

                              Comment

                              Working...
                              X