Announcement

Collapse
No announcement yet.

[VB.NET] my.Alert

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

    #46
    I have tried these -
    PHP Code:
    \s(?<number>[0-9]{1,3}\.[0-9])\s
    (?<number>[0-9]+\.[0-9]{2})
    \
    s(?<number>[0-9]{1,3}\:[0-9][0-9])
    (?<
    number>[0-9]{1,3}\.[0-9]) 
    All these give - "no data" - in the device string
    PHP Code:
    (?<number>.*) 
    Gives mutiple lines of text in the device string like the pic in the previous post.
    Strange???

    Thanks,
    Tim
    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

    Comment


      #47
      Must be a tough nut to crack.
      Any suggestions?

      Thanks,
      Tim
      FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

      HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

      Comment


        #48
        How about:
        PHP Code:
        RegExSearch=Air Temperature</td><td class="value">(.*?) F</td
        Jon

        Comment


          #49
          Nope.
          This is what I did and the result in the device string was "no data"

          PHP Code:
          [Airtemp]
          URL=http://wqdatalive.com/public/470.
          RegExSearch=Air Temperature</td><td class="value">(.*?) F</td>
          RegExReplace=*
          DeviceString=I80
          Content

          I was guessing on the * for the RegExReplace.
          Thanks,
          Tim

          ps I did correct the copy/paste error I did
          Last edited by fungun; June 30, 2015, 06:18 PM.
          FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

          HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

          Comment


            #50
            I tried putting "
            PHP Code:
            <number
            " in different positions of your example.
            Then used "number" for the RegExReplace, but none worked.

            Thanks, Tim
            FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

            HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

            Comment


              #51
              Got it
              Thank you Jon
              For the RegExReplace i had to put a "1" there.
              Now it works!!!

              Thank you,
              Tim
              FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

              HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

              Comment


                #52
                Well, I'm at it again.
                I went to this site - http://www.regular-expressions.info/
                To try and figure this one out.
                What do you do when there are 2 items with the same name?

                PHP Code:
                <td class="parameter-name">Dissolved Ox...</td><td class="value">99.5 %</td>
                <
                td class="parameter-name">Dissolved Ox...</td><td class="value">8.61 mg/L</td
                ??????

                Thanks,
                Tim
                FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                Comment


                  #53
                  As you did before:

                  For the first metric:

                  PHP Code:
                  RegExSearch=<td class="parameter-name">Dissolved Ox...</td><td class="value">(.*?) %</td>
                  RegExReplace=
                  For the second metric:

                  PHP Code:
                  RegExSearch=<td class="parameter-name">Dissolved Ox...</td><td class="value">(.*?) mg/L</td>
                  RegExReplace=
                  They are different due to the units displayed.
                  Jon

                  Comment


                    #54
                    Nope, that didn't work.
                    The first Device is right - "100.1"
                    The second device is wrong - "100.1 %Dissolved Ox...8.63"

                    Thanks,
                    Tim
                    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                    Comment


                      #55
                      Here is how the ini comes out -
                      PHP Code:
                      [DissolvedOxy]
                      URL=http://wqdatalive.com/public/470.
                      RegExSearch=Dissolved Ox...</td><td class="value">(.*?) %</td>
                      RegExReplace=1
                      DeviceString
                      =I84
                      Content
                      =100.1

                      [DissolvedOxy2]
                      URL=http://wqdatalive.com/public/470.
                      RegExSearch=Dissolved Ox...</td><td class="value">(.*?) mg/L</td>
                      RegExReplace=1
                      DeviceString
                      =I85
                      Content
                      =100.1 %Dissolved Ox...8.63 
                      Thanks,
                      Tim
                      FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                      HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                      Comment


                        #56
                        For the second, Try:

                        PHP Code:
                        RegExSearch=Dissolved Ox...</td><td class="value">.*?</td></tr><tr><td class="parameter-name">Dissolved Ox...</td><td class="value">(.*?) mg/L</td>
                        RegExReplace=
                        Jon

                        Comment


                          #57
                          Ha, that worked.
                          I will remember that one

                          Thank you again,
                          Tim
                          FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                          HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                          Comment


                            #58
                            Using my.Alert with webpage that requires login

                            Originally posted by electron View Post
                            Discussion Thread for my.Alert.

                            If you have any questions, suggestions or need help building the regular expression, don't hesitate to post here please!
                            Can I use this on a webpage that requires login?
                            I'm using Homeseer 2 and I just ordered an ecobee 3 thermostat and I was wondering if I could use this to get temperature for the website. I don't think there is a plugin for HS2 and this thermostat. I also don't have a login yet so I can't test it.
                            Here is the webpage.
                            https://www.ecobee.com/home/ecobeeLogin.jsp

                            Comment


                              #59
                              can't download myAlert.vb.txt

                              I'm tying to download the file but it keeps hanging up, never downloads.

                              Comment


                                #60
                                Still use this with HS2.
                                Started getting the error below. Check the website and it is up and working fine.
                                I don't understand the error.

                                12/29/2016 5:30:53 PM ~!~my.Alert~!~Error --- An error has occurred while downloading data from http://waterdata.usgs.gov/usa/nwis/uv?site_no=06604200 : System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream. at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceiv e(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsync Result lazyResult) at System.Net.TlsStream.CallProcessAuthentication(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWi thGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionConte xt executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at scriptcode12.scriptcode12.GetData(String sURL)
                                12/29/2016 5:30:53 PM ~!~my.Alert~!~Script Exception Error: Object reference not set to an instance of an object.

                                Thanks,
                                Tim
                                FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

                                HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

                                Comment

                                Working...
                                X