This change fixes the bindings ability to scrape the program names of the sprink…ler controllers internal automated programs that a user can select to run. More information is found that the issue this fixes here closes #15260
The newer firmware uses JSON with this structure and the "pd" now has an extra element over previous firmware which causes the update to break the old code. The JSON is an Array that contains mixed types including further arrays. Details are included in case a better method exists.
```
{
"nprogs": 3,
"nboards": 1,
"mnp": 40,
"mnst": 4,
"pnsize": 32,
"pd": [
[3, 68, 0, [20540, 0, 120, 0],
[0, 2700, 2700, 0, 0, 0, 0, 0], Water Lawn, [0, 33, 415]
],
[3, 1, 0, [16384, 0, 0, 0],
[0, 0, 0, 2700, 0, 0, 0, 0], Water Citrus, [0, 33, 415]
],
[3, 18, 0, [16384, 0, 0, 0],
[2700, 0, 0, 0, 0, 0, 0, 0], Water Fruit Trees, [0, 33, 415]
]
]
}
```
This pull request will automatically be built and available under the following links if anyone wants to test:
https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/
https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.opensprinkler/4.1.0-SNAPSHOT/org.openhab.binding.opensprinkler-4.1.0-SNAPSHOT.jar
Signed-off-by: Matthew Skinner <matt@pcmus.com>