OpenSprinkler Forums Third-Party Software Different responses from ja endpoint

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #66611

    therealdb
    Participant

    Hi all.

    I’m working a plug-in to integrate OpenSprinkler into Vera.

    I’ve recently started using ja endpoint, to found out that sometimes the stations tree is missing. When I ask them to call the endpoint in the browser, this part is present.

    Is there any header I have to add in order to get it? I can place a separate call if the node is missing, but I want to avoid this kind of mess in the code, if possible.
    Thanks.

    #66619

    Ray
    Keymaster

    There are separate commands that you can use, such as /jo for just obtaining the option values, /jn for just station data. These are all documented in the OpenSprinkler API document. /ja is a collector of all the data combined.

    #66629

    therealdb
    Participant

    Thanks Ray, I got it. Was I was referring to it is that sometimes the same endpoint is missing some information, while others everything is present. Is that by design? I really want to just call one single endpoint, if possible, to avoid sending many HTTP calls. Thanks.

    #66637

    Ray
    Keymaster

    Which firmware does your controller run?

    It’s certainly not by design that sometimes it’s missing the stations tree. You can do a json parsing on the result and if it’s corrupted ignore that call result.

    #66772

    therealdb
    Participant

    it’s the same firmware.
    it seems to be related to the sockets LUA library. I switched to curl and it’s OK. maybe something related to the fact that the data are sent in chunck, I’m not really sure.

    Thanks for the help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Third-Party Software Different responses from ja endpoint