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.
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.
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.
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.
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.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.