Announcement

Collapse
No announcement yet.

JSON interface - cannot set value on device to open garage door

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

    JSON interface - cannot set value on device to open garage door

    Hello, I regularly update values on devices this way, but for some reason I can't get it to set.

    The device is 1104 (url is http://192.168.1.143/devices.html?re...=true&feature=)

    I invoke this URL to hit the JSON API - http://192.168.1.143/JSON?request=co...1104&value=255

    Error message:
    { "Response":"Error, controlling device, value not found" }

    Am I setting this wrong via the API? Thanks!
    Click image for larger version

Name:	door-config.png
Views:	163
Size:	314.1 KB
ID:	1474327

    #2
    Are you on HS version 4.1.0.16 by chance?
    Jon

    Comment


      #3
      4.1.14.0 currently

      Comment


        #4
        OK, there were some changes in .16

        Try bylabel:

        Code:
        http://192.168.1.143/JSON?request=controldevicebylabel&ref=1104&label=On
        Jon

        Comment


          #5
          Will try right now - cheers

          Comment


            #6
            Ok, ran

            Code:
            /JSON?request=controldevicebylabel&ref=1104&label=On
            Unfortunately received result:

            Code:
            { "Response":"Error, controlling device, value/label not found" }
            Side note, I just upgraded from 4.1.14.0 to 4.1.16.0.

            Comment


              #7
              My mistake, try:

              Code:
              /JSON?request=controldevicebylabel&ref=1104&label=Open
              Jon

              Comment


                #8
                Ah, no luck.

                Attached Files

                Comment


                  #9
                  Odd, does the control work with the devices page button? What shows in the log when you do that?
                  Jon

                  Comment


                    #10
                    Thankfully it does

                    Comment


                      #11
                      And the log entry?
                      Jon

                      Comment


                        #12
                        Actually this is something I don't have experience in. Will search the logs now

                        Comment


                          #13
                          This is just the standard HS log i.e. Tools > Log
                          Jon

                          Comment


                            #14
                            When operating from the UI, here are the open and close events:
                            Attached Files

                            Comment


                              #15
                              Aha, Found it. I looked at the URL when hovering over the "Barrier Operator" feature within the device, and it shows a different refId (1106) and that works!

                              Comment

                              Working...
                              X