Yes I'm on version 2024-4. So there are some changes. I changed the frontpage json to the new getdevices call.That should not be related. I think you also updated Domoticz to a new version and new Domoticz version have gone through some API changes. See the warning in the wiki https://www.domoticz.com/wiki/Domoticz_ ... d_newer.29
Code: Select all
function RefreshData()
{
clearInterval($.refreshTimer);
var jurl=$.domoticzurl+"/json.htm?type=command¶m=getdevices&plan="+$.roomplan+"&lastupdate="+$.LastUpdateTime;
$.getJSON(jurl,
{
format: "json"
},
function(data) {
if (typeof data.result != 'undefined') {
$.each(data.result, function(i,item){
for( var ii = 0, len = $.PageArray.length; ii < len; ii++ ) {
if( $.PageArray[ii][0] === item.idx ) { // Domoticz idx number
var vtype= $.PageArray[ii][1]; // Domotitcz type (like Temp, Humidity)
var vlabel= $.PageArray[ii][2]; // vak number from HTML layout
var vdesc= $.PageArray[ii][3]; // description
var vattr= $.PageArray[ii][4]; // extra css attributes
var valarm= $.PageArray[ii][5]; // alarm value to turn text to red
var vdata= item[vtype]; // current value
if (typeof vdata == 'undefined') {
vdata="???";
} else {
// remove too much text
vdata=new String(vdata).split("Watt",1)[0];
vdata=new String(vdata).split("kWh",1)[0];
vdata=new String(vdata).split("km/h",1)[0];
vdata=new String(vdata).split("W/m2",1)[0];
vdata=new String(vdata).split("graden C",1)[0];
vdata=new String(vdata).split("mm",1)[0];
vdata=new String(vdata).split("/555",1)[0];
vdata=new String(vdata).split("C",1)[0];
vdata=new String(vdata).split("m3",1)[0];
vdata=new String(vdata).split("m3",1)[0];
vdata=new String(vdata).split(" ",1)[0];
}
Groet Jan