What makes you think so? Try something like that: var returnvalue = HTTP.sendHttpGetRequest(url, headers, 10*1000); logger.info("returnvalue: {}", returnvalue); //var arr=returnvalue; returnvalue = JSON.parse(returnvalue); var count = returnvalue.data.length; logger.info("count: {}", count); try { for (var i = 0; i < count; i++) { switch (returnvalue.data[i].feature) { case "heating.sensors.temperature.outside": var temp = returnvalue.data[i].properties.value.value; events.postUpdate('OutsideTemperature', temp); logger.info("DataIndex: {}, ExtTemp: {}", i,temp); break; case "heating.dhw.sensors.temperature.hotWaterStorage": var temp = returnvalue.data[i].properties.value.value; events.postUpdate('BoilerTemperature', temp); logger.info("DataIndex: {}, HotWaterStorageTemp: {}", i, temp); break; case "heating.dhw.oneTimeCharge": var temp = returnvalue.data[i].properties.active.value; temp = (temp === true) ? 'on' : 'off'; events.postUpdate('IsOneTimeCharge', temp); logger.info("DataIndex: {}, OneTimeCharge: {}",i, temp); break; case "heating.dhw.pumps.circulation": temp = returnvalue.data[i].properties.status.value; events.postUpdate('DhwPumpsCirculation', temp); logger.info("DataIndex: {}, DhwPumpsCirculation: {}",i, temp); break; case "heating.burners.0.statistics": temp = returnvalue.data[i].properties.hours.value; events.postUpdate("HeatingBurnerStatistics_Hours",temp); logger.info("DataIndex {}, Hours: {}", i, temp); temp = returnvalue.data[i].properties.starts.value; events.postUpdate("HeatingBurnerStatistics_Starts",temp) logger.info("DataIndex: {}, Starts: {}", i, temp); break; case "heating.circuits.0.operating.modes.active": temp= returnvalue.data[i].properties.value.value; events.postUpdate("ActiveMode", temp); logger.info("DataIndex: {}, ActiveMode: {}", i, temp); break; default: logger.info("DataIndex: {}, Data not used: {}",i, returnvalue.data[i].feature); } I'm using those lines after the request posted above. Sorry for no code tags, can't find them using my smartphone😎.
... Mehr anzeigen