If you continue with the URL you are using, you will need to issue 12 http requests to get information for 12 different devices. Hence why I voted for Randman's approach.
I'm hoping that if you use Randman's URL you can get back multiple devices in a single request. I leave this for you to try.
Take this url... htt_p:// HOMESEER-IP-ADDRESS/JSON?request=getstatus&ref=349
If this works and you get information for all devices, you will have a device array that can be checked using if/else and for loops.
What you will need to know is the ref-id of each device you want to determine which device goes to which label.
// This is modified callback that allows you to process multiple device entries. function processResponse(rcvd) { var jsonObj = JSON.parse(rcvd); // Loop through Devices using a for loop as you would with any array testing for conditions as needed. GUI.widget('DEV0').label = jsonObj.Devices[0].value; GUI.widget('DEV1').label = jsonObj.Devices[1].value; }