Lyndel, is this OK or am I missing anything? :
var HomeSeer = {};
HomeSeer.IP = "x.x.x.x"; // assign HomeSeer IP here
// Below example assumes that HomeSeer is
// configured to not require user/password when
// request coming from local LAN:
HomeSeer.msgPrefix = "http://" + HomeSeer.IP + "/JSON?request=";
function getStatus
{
var msg = "", msgSuffix = "";
msgSuffix = "getstatus";
msg = HomeSeer.msgPrefix + msgSuffix;
com.philips.HttpLibrary.getHTTP(msg, processResponse);
}
// 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;
}
Month ago you've sent me a library "json compressed"
Can I take it also for this ?
Regards,
Fischi
Last edited by Fischi on September 11, 2020 07:51.