API Error

Comments

5 comments

  • Avatar
    Jerome Morignot

    Your json is really wrong if you are trying to set the temperature:

    {"data":{"type":"structures", "attributes": {"set-point-temperature-c":"27.78"}}}

    0
    Comment actions Permalink
  • Avatar
    Jrskoler

     

    Thank you for your help.

    The dev is using patchObjectAsync and that is the trace created.

    The DTH code is:

    asynchttp_v1.patch('patchObjectAsync', params, args)

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Jerome Morignot

    Sorry but I don't understand your statement?! I used Python for my own needs, the json I had to send to the API to patch the temperature set point is the one I wrote in  my previous message. What's DTH code?! :)

    0
    Comment actions Permalink
  • Avatar
    Jrskoler

     

    Sorry, I'll explain.

    I am using another developer's Smartthings code.  DTH is an acronym for Device Type Handler.  It's part of the programming structure for utilitizing Smartthings.

    The code utilizes the library "asynchttp_v1" whithin which is the procedure (I think that's what one calls it) "patch"

    Hence, asynchttp_v1.patch('patchObjectAsync', params, args)

    In case you're curious:

    https://docs.smartthings.com/en/latest/smartapp-developers-guide/async-http.html?highlight=patch

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Jrskoler

     

    Turns out the app will only work with the Flair system in Manual mode.

    As soon as I switched it to Manual, the error disappeared and the system responded properly to the commands.

    Hope this helps someone, sometime.

    1
    Comment actions Permalink

Please sign in to leave a comment.