@dslraser aber klar doch
Die API ist lhier
ganz gut beschrieben:
schedule('*/1 * * * *', function(){
var url = 'http://IP-ADRESSE/api/epgbouquet?bRef=1:7:1:0:0:0:0:0:0:0:FROM%20BOUQUET%20%22userbouquet.dbe00.tv%22%20ORDER%20BY%20bouquet'; //bRef der entsprechenden Favoritenliste
request(url, function (err, state, body){
if (body) {
body = JSON.parse(body);
for(var i=0;i<body.events.length;i++) {
var current_service = body['events'][i]['sname'];
var title = body['events'][i]['title'];
var shortdesc = body['events'][i]['shortdesc'];
var longdesc = body['events'][i]['longdesc'];
var begin_timestamp = body['events'][i]['begin_timestamp'];
var duration = (body['events'][i]['duration_sec'])/60;
duration = Math.floor(duration);
var time;
time = new Date(begin_timestamp*1000).toLocaleTimeString();
createState("javascript.0.EPG.jetzt." + current_service + ".title");
createState("javascript.0.EPG.jetzt." + current_service + ".shortdesc");
createState("javascript.0.EPG.jetzt." + current_service + ".longdesc");
createState("javascript.0.EPG.jetzt." + current_service + ".begin_timestamp");
createState("javascript.0.EPG.jetzt." + current_service + ".duration_sec");
setState("javascript.0.EPG.jetzt." + current_service + ".title", title);
setState("javascript.0.EPG.jetzt." + current_service + ".shortdesc", shortdesc);
setState("javascript.0.EPG.jetzt." + current_service + ".longdesc", longdesc);
setState("javascript.0.EPG.jetzt." + current_service + ".begin_timestamp", time);
setState("javascript.0.EPG.jetzt." + current_service + ".duration_sec", duration);
}
} else {
log('EPG_now meldet Fehler: ' + err, 'error');
}
});
});