Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 13 made on Thursday September 10, 2020 at 05:29
Fischi
Long Time Member
Joined:
Posts:
January 2011
114
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.


Hosting Services by ipHouse