HTTP Virtual Input command not working

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Gast

    #1

    HTTP Virtual Input command not working


    I have a webpage that returns the JSON result below:
    I wanted to read out the value of TEMP(highligthed in blue).
    To do this I have created a virtual http input with the URL of this website.
    Then I created a virtual http commant below this input.
    In this command I put the following command recognition "Temp" : \v .
    This should give the value behing the string "Temp" : .
    But still I get no result. What am I doing wrong?
    { "ActTime" : 1484813438, "ServerTime" : "Jan 19 2017 09:10:38", "Sunrise" : "08:31:00", "Sunset" : "17:06:00", "result" : [ { "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 100, "CustomImage" : 0, "Data" : "15.3 C, 56 %", "DewPoint" : "6.57", "Favorite" : 1, "HardwareID" : 2, "HardwareName" : "RFXCOM", "HaveTimeout" : false, "Humidity" : 56, "HumidityStatus" : "Comfortable", "ID" : "260E", "LastUpdate" : "2017-01-19 09:10:29", "Name" : "Temp boven", "Notifications" : "true", "PlanID" : "0", "Protected" : false, "ShowNotifications" : true, "SignalLevel" : 5, "SubType" : "Cresta, TFA TS34C", "Temp" : 15.30, "Timers" : "false", "Type" : "Temp + Humidity", "TypeImg" : "temperature", "Unit" : 1, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "6" } ], "status" : "OK", "title" : "Devices" }
  • J V
    LoxBus Spammer
    • 28.08.2015
    • 367

    #2
    I think you need to put "\iTemp : "\i as the recognition: the string you want to find has to be specified between \i. And then still filter out the semicolon, which you can just add to the recognition string.
    I'm not sure, but it may be that it just reads 15, or that it will read the decimal number 15.30 (so not 15 hours 30 minutes)

    Kommentar

    • Gast

      #3
      Good day, i'm little confused with http virtual input too, can't get value from json source
      {
      "TaskName": "Vartai",
      "Swi": 1.00
      }
      i have tried \i"Swi" : \i\v and "Swi" : \v allways zero plz help me debug this issue ?

      Kommentar


      • romildo
        romildo kommentierte
        Kommentar bearbeiten
        You do'nt need \i in your case, I think

      • Gast
        Gast kommentierte
        Kommentar bearbeiten
        i have solved this without spaces thx romildo for comment.

      • romildo
        romildo kommentierte
        Kommentar bearbeiten
        You're welcome.
    • J V
      LoxBus Spammer
      • 28.08.2015
      • 367

      #4
      Glad it works!
      Small question... how come you don't need the \i in this situation? I thought the \i were used to delimit a string that has to be matched...?
      Thanks!

      Kommentar

      • romildo
        Lebende Foren Legende
        • 25.08.2015
        • 5144

        #5
        You don't need "\i" to beginning of your search, but it works also when "\i" is included
        Example:
        Code:
        "Temp" : \v -> works
        \i"Temp" : \i\v -> works
        If you are surching for more then one text, after the first one you need "\i"
        Example:
        Code:
        "Notifications" : "true"\"Temp" : \v -> don't work
        "Notifications" : "true"\i"Temp" : \i\v -> works
        \i"Notifications" : "true"\i\i"Temp" : \i\v -> works
        Zuletzt geändert von romildo; 18.08.2017, 09:37.
        lg Romildo

        Kommentar


        • J V
          J V kommentierte
          Kommentar bearbeiten
          Thanks for the clarification! I somehow thought it was always necessary.

        • romildo
          romildo kommentierte
          Kommentar bearbeiten
          You're welcome.
      Lädt...