Announcement

Collapse
No announcement yet.

JSON question

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

    JSON question

    Hi, want to send the Battery status (value) from my Philips Pronto TSU-9800 remote to HS3.

    The value is valid and I have tried :

    ........... request.open(“GET", "http://xxx.xxx.xxx.xx:655/JSON?reque...ref=2151&value=“ + value, true);
    request.send(); .......

    The HS.log shows
    Warning JSON controldevicebyvalue ref 2151 value not found
    Warning JSON controldevicebyvalue ref 2151 value not found
    Warning JSON controldevicebyvalue ref 2151 value not found
    Isn‘t it possible to put the valid value into the URL this way ?

    Regards,
    Fischi

    #2
    This error occurs when the value you send is out of range. For example, I get that error when I send a value of 100 to a dimmer. The valid values for the dimmer device (defined on the status graphics tab) are 0 thru 99 and 255.

    Comment


      #3
      Originally posted by zwolfpack View Post
      This error occurs when the value you send is out of range. For example, I get that error when I send a value of 100 to a dimmer. The valid values for the dimmer device (defined on the status graphics tab) are 0 thru 99 and 255.
      Thanks zwolfpack
      That‘s not the reason for it.
      I‘ve set the value range from 0 to 200.
      There must be another reason for.

      Fischi

      Comment


        #4
        Is this supposed to be C# (where you're concatenating a string using a "+") or VB (where the character to concatenate a string is "&")? I see a semi-colon at the end of the line, so I'm assuming C#, but if VB, this gets me ALL THE TIME.

        I presume you've confirmed "value" is not only valid, but it's been converted to a string? VB may handle this OK, but C# would need a .ToString()

        Comment


          #5
          I guessed JavaScript: https://www.w3schools.com/xml/dom_httprequest.asp

          Next step is to confirm that the sent URL is what you think it is.

          Comment


            #6
            Originally posted by Fischi View Post
            Hi, want to send the Battery status (value) from my Philips Pronto TSU-9800 remote to HS3.

            The value is valid and I have tried :

            ........... request.open(“GET", "http://xxx.xxx.xxx.xx:655/JSON?reque...ref=2151&value=“ + value, true);
            request.send(); .......

            The HS.log shows
            Warning JSON controldevicebyvalue ref 2151 value not found
            Warning JSON controldevicebyvalue ref 2151 value not found
            Warning JSON controldevicebyvalue ref 2151 value not found
            Isn‘t it possible to put the valid value into the URL this way ?

            Regards,
            Fischi
            I have it running !
            I've set the status control to "both" and not only to "status" as I did before.

            Thanks, Fischi

            Comment

            Working...
            X