NEWS

Etamon Skript Warnungen - woher? [gelöst]


  • Hallöchen, ich habe mein Etamon Skript überarbeitet, da einiges nicht zutreffend war bzw. auch nicht vorhanden war.

    Nun habe ich aber etliche Warnungen im Log, sind alles die gleichen Meldungen.
    Kann mir jemand weiter helfen dabei, würde die Warnungen gern noch weg bekommen, damit das Log-File nicht so voll wird!

    Hier das abgeänderte Skript:

    var http = require('http');
    var xpath = require('xpath');
    var dom = require('xmldom').DOMParser;
    
    var etaIP = 'http://192.168.178.62:8080/user/var';
    
    	// 1. URI
    	// 2. iobroker Object
    	// 3. read
    	// 4. write
    	// 5. name
    	// 6. type
    	// 7. unit
    	// 8. role
    	// 9. CCU variable (optional)
    var etaVars = [
    	 ["/120/10251/0/0/12242",		"eta.puffer.oben",				true, false, "Puffer oben",						"number",	"°C",		"value.temperature"]
    	,["/120/10251/0/0/12244",		"eta.puffer.unten",				true, false, "Puffer unten",					"number",	"°C",		"value.temperature"]
    	//,["/120/10251/0/0/12207",		"eta.puffer.aktion",			true, false, "Puffer Aktion",					"string",	"",			""]
    	,["/120/10251/0/0/12533",		"eta.puffer.leistung",			true, false, "Puffer Leistung",					"number",	"KW",		""]
    	,["/120/10251/0/0/12129",		"eta.puffer.zustand",			true, false, "Puffer Zustand",					"string",	"",			""]
    	
    	//,["/120/10101/0/0/12090",		"eta.hk.1.zustand",				true, false, "Heizkreis Zustand",				"string",	"",			""]
    	,["/120/10101/0/0/12241",		"eta.hk.1.vorlauf",				true, false, "Heizkreis Vorlauf",				"number",	"°C",		"value.temperature"]
        ,["/120/10101/0/0/12111",		"eta.hk.1.heizkurve",			true, false, "Heizkreis Heizkurve",				"number",	"°C",		"value.temperature"]
    	,["/120/10101/0/11124/0",		"eta.hk.1.pumpe",				true, false, "Heizkreis Pumpe",					"string",	"",			""]
    	,["/120/10101/0/11124/2001",	"eta.hk.1.anforderung",			true, false, "Heizkreis Anforderung",			"string",	"",			""]
    	
    	//,["/40/10021/0/0/12000",		"eta.kessel.aktion",			true, false, "Kessel",      					"string",	"",			""]
    	,["/40/10021/0/0/12153",		"eta.kessel.vollast",			true, false, "Kessel Vollaststunden",			"string",	"",		    ""]
    	,["/40/10021/0/0/12016",		"eta.kessel.verbrauch",			true, false, "Kessel Gesmtverbrauch",			"number",	"kg",		""]
    	,["/40/10021/0/0/12013",		"eta.kessel.aschebox",			true, false, "Kessel Verbrauch seit Aschebox",	"number",	"kg",		""]
    	,["/40/10021/0/0/12180",		"eta.kessel.druck",				true, false, "Kessel Druck",					"number",	"bar",		""]
    	,["/40/10021/0/0/12001",		"eta.kessel.soll",				true, false, "Kessel Soll",						"number",	"°C",		""]
    	,["/40/10021/0/0/12161",		"eta.kessel.ist",				true, false, "Kessel Ist",						"number",	"°C",		""]
    	,["/40/10021/0/0/12162",		"eta.kessel.abgasgtemp",		true, false, "Kessel Abgastemperatur",			"number",	"°C",	    ""]
    	,["/40/10021/0/0/12165",		"eta.kessel.abgasgeblaese",		true, false, "Kessel Abgasgebläse",				"number",	"U/min",	""]
    	,["/40/10021/0/0/12164",		"eta.kessel.restsauerstoff",	true, false, "Kessel Restsauerstoff",			"number",	"%",		""]
    	,["/40/10021/0/0/12080",		"eta.kessel.zustand",			true, false, "Kessel Zustand",					"string",	"",			""]
    	
    	,["/40/10201/0/0/12015",		"eta.lager.silo",				true, false, "Pellets Silo",					"number",	"kg",		""]
    	,["/40/10021/0/0/12011",		"eta.lager.tag",				true, false, "Pellets Tagesbehälter",			"number",	"kg",		""]
    	,["/40/10241/0/0/12197",		"eta.system.aussentemperatur",	true, false, "Aussentemperatur",				"number",	"°C",		""]
    ];
    
    etaVars.forEach(function(etaVar){
        createState(etaVar[1], 0, {
            read:  etaVar[2],
            write: etaVar[3],
            name:  etaVar[4],
            type:  etaVar[5],
            unit:  etaVar[6],
            role:  etaVar[7]
        });
    });
    
    schedule("*/5 * * * *", function () {
        pollETA();
    });
    
    pollETA();
    
    function pollETA() {
        // console.log("** Polling ETA Variables");
    	etaVars.forEach(function(etaVar){
    		http.get(etaIP + etaVar[0], function (http_res) {
    
    			// initialize the container for our data
    			var data = "";
    
    			// this event fires many times, each time collecting another piece of the response
    			http_res.on("data", function (chunk) {
    				// append this chunk to our growing `data` var
    				data += chunk;
    				// console.log("** ETA chunk: " + chunk);
    			});
    
    			// this event fires *one* time, after all the `data` events/chunks have been gathered
    			http_res.on("end", function () {
    				// console.log("** ETA data: " + data);
    
    				try {
    					var doc = new dom().parseFromString(data);
    					var select = xpath.useNamespaces({"eta": "http://www.eta.co.at/rest/v1"});
    
    					var strValue    = (select('//eta:value/@strValue',    doc)[0].nodeValue);
    					var text        = (select('//eta:value/text()',       doc)[0].nodeValue);
    					var scaleFactor = (select('//eta:value/@scaleFactor', doc)[0].nodeValue);
    					var unit        = (select('//eta:value/@unit',        doc)[0].nodeValue);
                        var value       = "";
                        
    					if (etaVar[5]=="number") {
    						value = text * 1.0 / scaleFactor;
    					} else {
    						value = strValue;
    					}
    
    					/* console.log("**** ETA " + etaVar[0] + " @strValue:    " + strValue);
    					console.log("**** ETA " + etaVar[0] + " @unit:        " + unit);
    					console.log("**** ETA " + etaVar[0] + " text()  :     " + text);
    					console.log("**** ETA " + etaVar[0] + " @scaleFactor: " + scaleFactor);
    					console.log("** ETA [" + etaVar[4] + "]: " + value + " " + unit); */
    
    					setState(etaVar[1], value);
    					
    					// Schreibe Variablen zu CCU
    					//if(etaVar[8]!="") {
    					    setState(etaVar[8], value);
    					//}
    				}
    				catch (e) {
    					log("ETA: Cannot set data "+ etaVar[2] +":" + e, 'error');
    				}
    			});
    		});
    	});
    	
    	//var dateFormat = require('dateformat');
    	//var currentdate = new Date();
    	//log(dateFormat(currentdate, "dd. mmm yyyy hh:MM"));
    	// optional last update in CCU3
    	//setState("hm-rega.0.7022", dateFormat(currentdate, "dd. mmm yyyy hh:MM"));
    

    Und hier die Meldungen:

    20:27:30.935	info	javascript.0 (2266) Start javascript script.js.Wohnzimmer.Etamon
    20:27:30.951	info	javascript.0 (2266) script.js.Wohnzimmer.Etamon: registered 0 subscriptions and 1 schedule
    20:27:31.001	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.007	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.014	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.018	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.025	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.029	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.036	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.040	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.046	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.051	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.059	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.063	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.073	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.077	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.081	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.091	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.095	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.100	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.106	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.110	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:27:31.975	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.059	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.066	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.071	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.076	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.082	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.086	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.092	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.101	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.107	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.112	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.116	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.125	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.130	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.134	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.139	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.143	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.152	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.158	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.166	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:00.171	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    20:30:01.028	warn	javascript.0 (2266) at IncomingMessage.<anonymous> (script.js.Wohnzimmer.Etamon:108:10)
    

Suggested Topics

  • 14
  • 7
  • 5
  • 28
  • 29
  • 3
  • 3
  • 11

1.8k
Online

38.3k
Users

43.7k
Topics

611.0k
Posts