Announcement

Collapse
No announcement yet.

hs.GetURL keeps timing out (SSL issue?)

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

    hs.GetURL keeps timing out (SSL issue?)

    Hoping someone could point me in the right direction here. Why does this time out every time it's run?

    &hs.GetURL("espn.com","/mlb",True,80)

    This had been working fine for years, but just started failing a month or so ago.

    I guess ESPN added SSL to their site, but &hs.GetURL("https://www.espn.com","/mlb",True,443) times out as well. I wrote a script (below) to trap the exception and I just get "Operation Timed Out."

    Is there something I need to do to handle https connections that I haven't stumbled upon yet?

    Thanks.

    Test script:

    Sub Main(ByVal Parms As Object)

    dim page, newP
    System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls13

    Try
    page = hs.GetURL("https://www.espn.com", "/mlb", True, 443) 'I have tried multiple versions of this with different parameters
    hs.WriteLog("Test", page)
    Catch ex as Exception
    hs.WriteLog("Test", ex)
    End Try

    End Sub​

    Log reads: Test ERROR: The operation has timed out

    #2
    Working fine here without setting the SecurityProtocol:

    Code:
        Sub Main(ByVal Parms As Object)
    
            Dim page, newP
            'System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
    
            Try
                page = hs.GetURL("https://www.espn.com", "/mlb", True, 443) 'I have tried multiple versions of this with different parameters
                hs.WriteLog("Test", page)
            Catch ex As Exception
                hs.WriteLog("Test", ex)
            End Try
    
        End Sub
    What OS is this?

    I'm on W10
    Jon

    Comment


      #3
      Originally posted by jon00 View Post
      Working fine here without setting the SecurityProtocol:

      What OS is this?

      I'm on W10
      Default setting for ServicePointManager.SecurityProtocol is SecurityProtocolType.Default which for Win 10 is Tls12​

      Comment


        #4
        Thanks for the input, guys. I am on Win10, and the above times out whether I use the security protocol call or not. Typing URL directly into browser on same machine works fine. So frustrating when you troubleshoot every possible scenario that comes to you, and it makes absolutely no difference in the outcome.

        These are the times when it ends up being something so simple it doesn't occur to me.



        Date/time=4/25/2023 10:41:10 AM Central Daylight Time
        Version=HS4 Standard Edition 4.2.18.0 (Windows)
        License=Registered
        Confguration File=C:\Program Files (x86)\HomeSeer HS4\Data\HS4Data.json
        In Virtual Machine=No MFG: dell inc.
        Antivirus=Windows Defender
        OS=Microsoft Windows 10 Home - Work Station
        OS Version=10.0.19045
        Uptime=0 Days 22 Hours 56 Minutes 35 Seconds
        Lan IP=192.168.7.43 (DESKTOP-UVSVIIF)
        Device Count=113
        Event Count=19
        Processor:=Intel64 Family 6 Model 42 Stepping 7 at 3.07 GHz
        Modules/Threads=133 Modules, 65 Threads
        Available Threads=1023
        System Load=161 Processes, 2% Load
        Free/Total Memory=1.57 GBytes / 3.91 GBytes (40% free)
        Free/Total Virtual Memory=1.75 GBytes / 4.60 GBytes (38% free)
        HomeSeer Memory Used=317 Mbytes
        Plugin Memory Used=7 EXE Plug-Ins using 176 Mbytes
        Plugins Installed=AK Weather 4.0.5.37,HS MyQ 4.0.9.0,MNS Insteon 4.0.4.0,NetCam Plugin 1.0.0.5,Zigbee 4.0.11.0,Z-Wave 4.0.3.0,Z-Wave Parameters 4.0.55.0​

        Comment


          #5
          Have you tried another https website with the script to see if that works?
          Jon

          Comment


            #6
            Yes, hs.GetURL("homeseer.com", "/", True, 80) works perfectly (and redirects to https)
            hs.GetURL("ESPN.com", "/", True, 80) times out

            Comment


              #7
              I changed it to all vb.net to scrape the page, which works fine. Just some issue wit hs.geturl on my machine. It will likely clear up at some point on its own.

              Comment

              Working...
              X