This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url = "http://192.168.0.xxx/middleware.php/data.json?from=now&uuid[]=KANAL1_UUID&uuid[]=KANAL2_UUID"; | |
var pfad = "Volkszaehler."; | |
var idAKTUELLER_VERBRAUCH = pfad + "AKTUELLER_VERBRAUCH"; | |
var idAKTUELLE_ERZEUGUNG = pfad + "AKTUELLE_ERZEUGUNG"; | |
// Vorgegebene Funktion, die nur dazu dient, das JSON einzulesen | |
// Angelehnt an: http://www.iobroker.net/docu/?page_id=3691 | |
var request = require("request"); | |
function readJson(url, callback) { | |
request(url, function(err, state, body) { |