NEWS
Pegelwerte Fritzbox 6490 Cable auslesen?
-
@MartinP
Bei meiner Fritzbox schwankt der Wert zwischen 0, 1 und 2 Fehlern pro Minute.
Er kann auf keinen Fall negativ werden. Welche Werte werden denn in der Fritzbox angezeigt? Dort muss die nicht korrigierbaren Fehleranzahl kontinuierlich steigen wenn es Fehler gibt. Aber niemals fallen, es sei denn, Du startest die Fritzbox neu. -
Hallo,
ich habe das script mal bei mir eingesetzt, aber bisher wird scheinbar nur der Kanal C22
geloggt alle anderen werden nicht abgefragt. Muß ich noch irgendwas eintragen damit er
auch alle Kanäle überwacht und mitloggt?Scheint so das man ja so mal seine Fritte gut überwachen kann so das man auch sehen
kann wie der aktuelle Zustand der Internet-Leitung ist.Achja, ich habe das folgende Script genutzt:
var logging = true; const iconv = require('iconv-lite'); const crypto = require('crypto'); var DOCSIS30DSChannels = 0; var DOCSIS31DSChannels = 0; var DOCSIS30USChannels = 0; var DOCSIS31USChannels = 0; var sid; var fritzBenutzer = 'ioBroker'; var fritzPasswort = '**********'; var loginURL = 'http://192.168.178.1/login_sid.lua?username='; var docsisURL = 'http://192.168.178.1/data.lua'; // Downstream DOCSIS 3.0 for (var i = 1; i <= 31; i++){ var Channel = 'C' + (i < 10 ? '0' + i.toString() : i.toString()); createState('Internet.Docsis.DS.' + Channel + '.Frequency', 0, false, {name: 'Frequency', unit: 'MHz', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.Modulation', 0, false, {name: 'Modulation', unit: 'QAM', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.PowerLevel', 0, false, {name: 'PowerLevel', unit: 'dBmV', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.MSE', 0, false, {name: 'MSE', unit: 'dB', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.Latency', 0, false, {name: 'Latency', unit: 'ms', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.CorrectableErrors', 0, false, {name: 'CorrectableErrors', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.CorrectableErrorsPerMinute', 0, false, {name: 'CorrectableErrorsPerMinute', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.UncorrectableErrors', 0, false, {name: 'UncorrectableErrors', type: 'mixed', role: 'state'}); createState('Internet.Docsis.DS.' + Channel + '.UncorrectableErrorsPerMinute', 0, false, {name: 'UncorrectableErrorsPerMinute', type: 'mixed', role: 'state'}); } // Upstream DOCSIS 3.0 for (var i = 0; i <= 5; i++){ var Channel = 'C0' + i.toString(); createState('Internet.Docsis.US.' + Channel + '.Frequency', 0, false, {name: 'Frequency', unit: 'MHz', type: 'mixed', role: 'state'}); createState('Internet.Docsis.US.' + Channel + '.Modulation', 0, false, {name: 'Modulation', unit: 'QAM', type: 'mixed', role: 'state'}); createState('Internet.Docsis.US.' + Channel + '.MultiplexMethod', 0, false, {name: 'MultiplexMethod', type: 'mixed', role: 'state'}); createState('Internet.Docsis.US.' + Channel + '.PowerLevel', 0, false, {name: 'PowerLevel', unit: 'dBmV', type: 'mixed', role: 'state'}); } // Downstream DOCSIS 3.1 createState('Internet.Docsis31.DS.C01.Frequency', 0, false, {name: 'Frequency', unit: 'MHz', type: 'mixed', role: 'state'}); createState('Internet.Docsis31.DS.C01.Type', 0, false, {name: 'Modulation', unit: 'K', type: 'mixed', role: 'state'}); createState('Internet.Docsis31.DS.C01.PowerLevel', 0, false, {name: 'PowerLevel', unit: 'dBmV', type: 'mixed', role: 'state'}); // Upstream DOCSIS 3.1 createState('Internet.Docsis31.US.C00.Frequency', 0, false, {name: 'Frequency', unit: 'MHz', type: 'mixed', role: 'state'}); createState('Internet.Docsis31.US.C00.Type', 0, false, {name: 'Modulation', unit: 'K', type: 'mixed', role: 'state'}); createState('Internet.Docsis31.US.C00.MultiplexMethod',0, false, {name: 'MultiplexMethod', type: 'mixed', role: 'state'}); createState('Internet.Docsis31.US.C00.PowerLevel', 0, false, {name: 'PowerLevel', unit: 'dBmV', type: 'mixed', role: 'state'}); /** * Simple XML parser * @param {String} xml * @return {Object} */ function parseXML(xml) { var beg = -1; var end = 0; var tmp = 0; var current = []; var obj = {}; var from = -1; while (true) { beg = xml.indexOf('<', beg + 1); if (beg === -1) break; end = xml.indexOf('>', beg + 1); if (end === -1) break; var el = xml.substring(beg, end + 1); var c = el[1]; if (c === '?' || c === '/') { var o = current.pop(); if (from === -1 || o !== el.substring(2, el.length - 1)) continue; var path = current.join('.') + '.' + o; var value = xml.substring(from, beg); if (typeof(obj[path]) === 'undefined') obj[path] = value; else if (obj[path] instanceof Array) obj[path].push(value); else obj[path] = [obj[path], value]; from = -1; continue; } tmp = el.indexOf(' '); var hasAttributes = true; if (tmp === -1) { tmp = el.length - 1; hasAttributes = false; } from = beg + el.length; var isSingle = el[el.length - 2] === '/'; var name = el.substring(1, tmp); if (!isSingle) current.push(name); if (!hasAttributes) continue; var match = el.match(/\w+\=\".*?\"/g); if (match === null) continue; var attr = {}; var length = match.length; for (var i = 0; i < length; i++) { var index = match[i].indexOf('"'); attr[match[i].substring(0, index - 1)] = match[i].substring(index + 1, match[i].length - 1); } obj[current.join('.') + (isSingle ? '.' + name : '') + '[]'] = attr; } return obj; }; function loginAndGetSID(){ sid = null; // Challenge holen var options = { url: loginURL + fritzBenutzer, method: 'GET' }; request(options, function(error, response, body) { if (!error && response.statusCode == 200) { //if (logging) log('error: ' + error + ', response: ' + JSON.stringify(response) + ', body: ' + body, 'info'); var result = parseXML(body); var challenge = result['SessionInfo.Challenge']; // Einloggen und SID holen var utf16le_encoded = iconv.encode(challenge + '-' + fritzPasswort, 'UTF-16LE', {addBOM: false}); var challengeResponse = crypto.createHash('md5').update(utf16le_encoded).digest('hex'); options = { url: loginURL + fritzBenutzer + '&response=' + challenge + '-' + challengeResponse, method: 'GET' }; request(options, function(error, response, body) { if (!error && response.statusCode == 200) { var result = parseXML(body); sid = result['SessionInfo.SID']; if (logging) log('Logged in. SID = ' + sid, 'info'); } else { log('error: ' + error + ', response: ' + response.statusCode.toString(), 'info'); } }); } else { log('error: ' + error + ', response: ' + response.statusCode.toString(), 'info'); } }); } // Wenn keine Daten abgerufen werden konnten, werden die States auf NULL gesetzt function setStates2NullValues(){ var NullValue = null; // DOCSIS 3.0 Downstream Channels for (i = 0; i < DOCSIS30DSChannels; i++) { setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.Frequency', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.Modulation', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.PowerLevel', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.MSE', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.Latency', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.CorrectableErrors', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.CorrectableErrorsPerMinute', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.UncorrectableErrors', NullValue, true); setState('Internet.Docsis.DS.C' + (i < 10 ? '0' : '') + i.toString() + '.UncorrectableErrorsPerMinute', NullValue, true); } // DOCSIS 3.1 Downstream Channel setState('Internet.Docsis31.DS.C01.PowerLevel', NullValue, true); setState('Internet.Docsis31.DS.C01.Type', NullValue, true); setState('Internet.Docsis31.DS.C01.Frequency', NullValue, true); // DOCSIS 3.0 Upstream Channels for (i = 0; i < DOCSIS30USChannels; i++) { setState('Internet.Docsis.US.C' + (i < 10 ? '0' : '') + i.toString() + '.Frequency', NullValue, true); setState('Internet.Docsis.US.C' + (i < 10 ? '0' : '') + i.toString() + '.Modulation', NullValue, true); setState('Internet.Docsis.US.C' + (i < 10 ? '0' : '') + i.toString() + '.MultiplexMethod', NullValue, true); setState('Internet.Docsis.US.C' + (i < 10 ? '0' : '') + i.toString() + '.PowerLevel', NullValue, true); } // DOCSIS 3.1 Upstream Channel setState('Internet.Docsis31.US.C00.PowerLevel', NullValue, true); setState('Internet.Docsis31.US.C00.Type', NullValue, true); setState('Internet.Docsis31.US.C00.MultiplexMethod', NullValue, true); setState('Internet.Docsis31.US.C00.Frequency', NullValue, true); } // Holt die Informationen von der Fritzbox Benutzeroberfläche. Ab fritz.OS Version 7.2x werden die Informationen als JSON-String übermittelt (getCableModemChannelInfos Version 2) function getCableModemChannelInfosV2(){ var NullValue = null; var tableData; var options = { url: docsisURL, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: 'xhr=1&sid=' + sid + '&lang=de&page=docInfo&xhrId=all&no_sidrenew=' }; request(options, function(error, response, body) { if (!error && response.statusCode == 200) { tableData = JSON.parse(body); if(tableData){ //log(JSON.stringify(tableData), 'info'); // DOCSIS 3.0 Downstream Channels DOCSIS30DSChannels = Object.entries(tableData.data.channelDs.docsis30).length; for (i = 0; i < DOCSIS30DSChannels; i++) { var channelID = parseInt(tableData.data.channelDs.docsis30[i].channelID); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.Frequency', parseInt(tableData.data.channelDs.docsis30[i].frequency), true); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.Modulation', parseInt(tableData.data.channelDs.docsis30[i].type.replace('QAM', '')), true); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.PowerLevel', parseFloat(tableData.data.channelDs.docsis30[i].powerLevel), true); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.MSE', parseFloat(tableData.data.channelDs.docsis30[i].mse), true); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.Latency', parseFloat(tableData.data.channelDs.docsis30[i].latency), true); var correctableErrors = getState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.CorrectableErrors'); var lastValue = correctableErrors.val; var ts_diff = new Date().getTime() - correctableErrors.ts; var newValue = parseInt(tableData.data.channelDs.docsis30[i].corrErrors); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.CorrectableErrors', newValue, true); // Die Differenz zum letzten Wert nur dann speichern, wenn dieser ca. 1 Min. alt ist if (ts_diff > 50000 && ts_diff < 70000){ if (newValue > lastValue){ setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.CorrectableErrorsPerMinute', newValue - lastValue, true); } } else { setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.CorrectableErrorsPerMinute', NullValue, true); } var uncorrectableErrors = getState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.UncorrectableErrors'); var lastValue = uncorrectableErrors.val; var ts_diff = new Date().getTime() - uncorrectableErrors.ts; var newValue = parseInt(tableData.data.channelDs.docsis30[i].nonCorrErrors); setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.UncorrectableErrors', newValue, true); // Die Differenz zum letzten Wert nur dann speichern, wenn dieser ca. 1 Min. alt ist if (ts_diff > 50000 && ts_diff < 70000){ if (newValue > lastValue){ setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.UncorrectableErrorsPerMinute', newValue - lastValue, true); } } else { setState('Internet.Docsis.DS.C' + (channelID < 10 ? '0' : '') + tableData.data.channelDs.docsis30[i].channelID + '.UncorrectableErrorsPerMinute', NullValue, true); } } // DOCSIS 3.1 Downstream Channel if (tableData.data.channelDs.docsis31 != null){ DOCSIS31DSChannels = 1; setState('Internet.Docsis31.DS.C01.PowerLevel', parseFloat(tableData.data.channelDs.docsis31[0].powerLevel), true); setState('Internet.Docsis31.DS.C01.Type', parseInt(tableData.data.channelDs.docsis31[0].type.replace('K', '')), true); setState('Internet.Docsis31.DS.C01.Frequency', tableData.data.channelDs.docsis31[0].frequency, true); } // DOCSIS 3.0 Upstream Channels DOCSIS30USChannels = Object.entries(tableData.data.channelUs.docsis30).length; for (i = 0; i < DOCSIS30USChannels; i++) { var channelID = parseInt(tableData.data.channelUs.docsis30[i].channelID); setState('Internet.Docsis.US.C' + (channelID < 10 ? '0' : '') + tableData.data.channelUs.docsis30[i].channelID + '.Frequency', parseInt(tableData.data.channelUs.docsis30[i].frequency), true); setState('Internet.Docsis.US.C' + (channelID < 10 ? '0' : '') + tableData.data.channelUs.docsis30[i].channelID + '.Modulation', parseInt(tableData.data.channelUs.docsis30[i].type.replace('QAM', '')), true); setState('Internet.Docsis.US.C' + (channelID < 10 ? '0' : '') + tableData.data.channelUs.docsis30[i].channelID + '.MultiplexMethod', tableData.data.channelUs.docsis30[i].multiplex, true); setState('Internet.Docsis.US.C' + (channelID < 10 ? '0' : '') + tableData.data.channelUs.docsis30[i].channelID + '.PowerLevel', parseFloat(tableData.data.channelUs.docsis30[i].powerLevel), true); } // DOCSIS 3.1 Upstream Channel if (tableData.data.channelUs.docsis31 != null){ DOCSIS31USChannels = 1; setState('Internet.Docsis31.US.C00.PowerLevel', parseFloat(tableData.data.channelUs.docsis31[0].powerLevel), true); setState('Internet.Docsis31.US.C00.Type', parseInt(tableData.data.channelUs.docsis31[0].type.replace('K', '')), true); setState('Internet.Docsis31.US.C00.MultiplexMethod', tableData.data.channelUs.docsis31[0].multiplex, true); setState('Internet.Docsis31.US.C00.Frequency', parseInt(tableData.data.channelUs.docsis31[0].frequency), true); } } else{ log('Empty response', 'error'); setStates2NullValues(); loginAndGetSID(); } } else { log('error: ' + error + ', response: ' + response.statusCode.toString(), 'error'); setStates2NullValues(); loginAndGetSID(); } }); } if (logging) log('DocsisInfo starting', 'info'); // SID holen und merken (User Token) loginAndGetSID(); var getSIDinterval = setInterval(loginAndGetSID, 900000); // Alle 15 Minuten neue SID holen schedule("* * * * *", function() { // Zu jeder vollen Minute die Fritzbox DOCSIS-Daten abfragen getCableModemChannelInfosV2(); });
Würde mich freuen wenn ich vielleicht noch das eine oder andere zusätzlich ins script einbauen kann so das ich vielleicht auch mal in regelmäßigen Abständen einen Speedtest machen kann. Habe schon bischen gelesen das hier im Posting dazu was geschrieben wurde.
Doch erstmal möchte ich das das Grundscript läuft und über alle Kanäle auch dann aufzeichnet bzw loggt.
-
Das mit dem Speedtest habe ich von hier. https://www.kreyenborg.koeln/speedtest-fuer-iobroker/
Läuft einwandfrei -
Danke Dir, werde ich mirspäter mal anschauen. Doch erstmal hoffe ich das das Script richtig
läuft. Immer ein schritt nach dem anderenDas zeigt er unter den Objekten an:
Da scheint es auch noch etwas arbeit zu geben
-
Welche Fritzbox mit welcher Fritz OS Version ist das?
Guck bitte mal in meinen Beitrag weiter oben: https://forum.iobroker.net/post/1066896
-
@ichderarnd Die Fritzbox SELBER meldet ja gar nicht die Fehler pro Minute, sondern da läuft für jeden Kanal ein Zähler rauf, den das Skript Minütlich abfragt. Der Minutenwert ist dann die Differenz zwischen vorigem Zähler-Wert und aktuellem Wert.
Wenn da bei der Abfrage dann zwischendurch mal eine 0 statt des korrekten Standes gemeldet wird, gibt es dieses -/+ Muster ... -
@martinp
Verstehe…
Negative Werte muss ich im Script dann ignorieren. Kann ich einbauen.
Aber es scheint zu einem Fehler bei der Abfrage der Werte zu kommen. Das gilt es , herauszufinden. Ich überlege mir was. -
@ichderarnd
Ich habe eine Fritz 6591 mit der IOS Version 7.57Habe gerade das Script mal im Debug-Modus gestartet und bekomme dann folgendes Angezeigt in den logs:
-
@ichderarnd Ja, stattdessen eine "0" als Differenz wegschreiben wäre wahrscheinlich die pragmatischste Lösung.
-
@wolfshunter
Hast Du die Version auf 2 stehen?
Diese Meldung kommt eigentlich nur dann, wenn im Script Version 1 eingestellt ist.
Nutzt Du das aktuellste Script (siehe ein paar Einträge weiter vorher)? -
@ichderarnd Gibt es eigentlich Deine aktuelle Skript-Version nur hier im Thread, oder hast Du Die auch anderswo? Z. B. Github o. Ä.
-
Danke für deine Antwort. Also ich nutze das Script aus der Datei:
DOCSISinfoV2.zip
Habe dort nur die IP eingetragen für meine Fritzbox und das Password meines ioBroker-Users
auf der Fritzbox.Kann später nochmal das Script nehmen und es dann schauen ob ich dort noch irgendwas falsch
drin habe. Aktuell bin ich nicht im Homeoffice. Zur Not werde ich einfach nochmal das Script neu
machen und die Werte löschen die bisher gefunden wurden. -
@ichderarnd said in Pegelwerte Fritzbox 6490 Cable auslesen?:
... ChannelID für jeden Kanal.... Allerdings scheinen sich diese ja gelegentlich je nach Fritz OS Version zu ändern.
Das ist eher eine Frage des "Kabelsegments" und des darin eingesetzten "CMTS". Als in meinem "Kabelsegment" der Casa-CMTS durch einen von "Harmonic" ersetzt wurde, wurden auch die Kanalnummern durcheinandergewürfelt, ohne dass die Fritzbox eine neue Firmware bekommen hätte ...
-
@wolfshunter sagte in Pegelwerte Fritzbox 6490 Cable auslesen?:
ichderarnd
Ich werde nachher mal von meiner Fritzbox die Kanäle posten denn ich glaube das dort
auch einiges anders ist. Sobald ich im Homeoffice bin kann ich das hier mal posten und
hoffe das dann das Script auch gut laufen wird -
Hallo,
keine Ahnung was sich verändert hat. Aber bin gerade im Homeoffice und habe nochmal
alles gelöscht was im Script bei stand und dann das DOCSISinfoV2.zip erneut hineinkopiert.Dann nur kurz die IP anstatt des Namen geändert und das passende Password gesetzt, nun
wirft er mir auch passende Werte aus.Werde das nun mal beobachten und dann vielleicht auch mal sehen ob es stabil weiter läuft.
Danke noch an Dich für deine Hilfe.
PS: Das Script läuft aber es sind noch viele Warnungen im Log
javascript.0 2023-11-15 12:35:00.362 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.362 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.362 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.362 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.362 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.362 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.362 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.362 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.362 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.362 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.361 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.361 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.361 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.361 warn at script.js.Fritzbox_Pegel:349:21 javascript.0 2023-11-15 12:35:00.358 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.357 warn State "Internet.Docsis.DS.C32.UncorrectableErrors" not found javascript.0 2023-11-15 12:35:00.357 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.357 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.357 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.356 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.356 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.356 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.356 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.356 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.356 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.356 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.356 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.356 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.356 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.355 warn at script.js.Fritzbox_Pegel:345:43 javascript.0 2023-11-15 12:35:00.354 warn getState "Internet.Docsis.DS.C32.UncorrectableErrors" not found (3) javascript.0 2023-11-15 12:35:00.354 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.354 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.353 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.353 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.353 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.353 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.353 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.353 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.353 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.353 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.353 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.353 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.352 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.352 warn at script.js.Fritzbox_Pegel:331:21 javascript.0 2023-11-15 12:35:00.352 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.350 warn State "Internet.Docsis.DS.C32.CorrectableErrors" not found javascript.0 2023-11-15 12:35:00.350 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.350 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.350 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.350 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.350 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.349 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.349 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.349 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.349 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.349 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.349 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.349 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.349 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.348 warn at script.js.Fritzbox_Pegel:327:41 javascript.0 2023-11-15 12:35:00.342 warn getState "Internet.Docsis.DS.C32.CorrectableErrors" not found (3) javascript.0 2023-11-15 12:35:00.342 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.342 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.342 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.341 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.341 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.341 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.341 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.341 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.341 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.340 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.340 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.340 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.340 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.340 warn at script.js.Fritzbox_Pegel:325:21 javascript.0 2023-11-15 12:35:00.339 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.337 warn State "Internet.Docsis.DS.C32.Latency" not found javascript.0 2023-11-15 12:35:00.337 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.337 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.336 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.336 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.336 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.336 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.336 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.336 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.335 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.335 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.335 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.335 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.335 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.335 warn at script.js.Fritzbox_Pegel:324:21 javascript.0 2023-11-15 12:35:00.334 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.332 warn State "Internet.Docsis.DS.C32.MSE" not found javascript.0 2023-11-15 12:35:00.332 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.332 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.331 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.331 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.331 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.331 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.331 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.331 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.331 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.330 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.330 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.330 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.330 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.330 warn at script.js.Fritzbox_Pegel:323:21 javascript.0 2023-11-15 12:35:00.329 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.325 warn State "Internet.Docsis.DS.C32.PowerLevel" not found javascript.0 2023-11-15 12:35:00.325 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.325 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.324 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.324 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.324 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.324 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.324 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.324 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.324 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.324 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.323 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.323 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.323 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.323 warn at script.js.Fritzbox_Pegel:321:25 javascript.0 2023-11-15 12:35:00.323 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.322 warn State "Internet.Docsis.DS.C32.Modulation" not found javascript.0 2023-11-15 12:35:00.321 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.321 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.321 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.321 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.321 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.321 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.321 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.321 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.321 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.321 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.320 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.320 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.320 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.320 warn at script.js.Fritzbox_Pegel:316:21 javascript.0 2023-11-15 12:35:00.320 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.318 warn State "Internet.Docsis.DS.C32.Frequency" not found javascript.0 2023-11-15 12:35:00.318 warn at processTicksAndRejections (node:internal/process/task_queues:82:21) javascript.0 2023-11-15 12:35:00.318 warn at endReadableNT (node:internal/streams/readable:1368:12) javascript.0 2023-11-15 12:35:00.318 warn at IncomingMessage.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.318 warn at IncomingMessage.emit (node:events:529:35) javascript.0 2023-11-15 12:35:00.318 warn at Object.onceWrapper (node:events:631:28) javascript.0 2023-11-15 12:35:00.318 warn at IncomingMessage.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1076:12) javascript.0 2023-11-15 12:35:00.317 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.317 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.317 warn at Request.<anonymous> (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:1154:10) javascript.0 2023-11-15 12:35:00.317 warn at Request.emit (node:domain:489:12) javascript.0 2023-11-15 12:35:00.317 warn at Request.emit (node:events:517:28) javascript.0 2023-11-15 12:35:00.317 warn at Request.self.callback (/opt/iobroker/node_modules/iobroker.javascript/node_modules/request/request.js:185:22) javascript.0 2023-11-15 12:35:00.314 warn at Request._callback (/opt/iobroker/node_modules/iobroker.javascript/lib/request.js:27:17) javascript.0 2023-11-15 12:35:00.314 warn at script.js.Fritzbox_Pegel:315:21 javascript.0 2023-11-15 12:35:00.314 warn at setState (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1740:20) javascript.0 2023-11-15 12:35:00.312 warn State "Internet.Docsis.DS.C32.ChannelID" not found
Habe es mal noch angehangen was jede Minute geloggt wird als Warnung
-
@martinp
Bisher noch nicht auf Github. Aber wäre mal eine Maßnahme wenn es häufiger benutzt wird. Muss dann ja noch etwas Doku dazu… -
@wolfshunter
Ich sehe in Deinem Log, dass Deine Fritzbox 32 DOCSIS 3.0 Downstream-Kanäle hat. Bisher hat das Script nur 31 Kanäle unterstützt.
Ich habe das Script daher angepasst. Probier bitte mal, ob die Meldungen im Log daher kommen.@MartinP
Negative Werte sollten jetzt nicht mehr auftreten. Probier bitte mal. -
Danke Dir, jetzt läuft es super. Die meldungen sind weg
-
Jetzt muß ich das nur noch hinbekommen das ich diese influxDB installiert und im ioBroker eingebunden
bekomme. Aktuell nutze ich ja SQL aber irgendwie ist Grafana da wohl nicht so leicht mit zu bedienen.Denn ich habe mir schon Videos angeschaut, aber dort sieht es so easy aus mit dem Erstellen von
Diagrammen oder ähnlichen. Doch ich bekomme zwar die Datenbank zur Auswahl, aber dann wars
das schon. Bin auch nicht so gut was Datanbank Abfragen angeht -
@ichderarnd said in Pegelwerte Fritzbox 6490 Cable auslesen?:
nice, vielen dank!
bei mir quieckt nun allerdings die influxdb, da sich ein type geändert hat
wundert mich nur dass niemand anders das meldet - an der FB hat sich nichts geändert, kann eigtl. nur am script liegen...?javascript.0.Internet.Docsis31.US.C00.Frequency war immer eine zahl, nun ein string -> 29.775 - 64.775
hab schon etliches ausprobiert, aber umstellen bringt nichts. influxdb manual verweist drauf schlicht im adapter den type umzustellen
influxdb.0 2023-11-16 22:33:53.254 info disabled logging of javascript.0.Internet.Docsis31.US.C00.Frequency influxdb.0 2023-11-16 22:33:44.398 error HttpError: runtime error @4:12-4:151: filter: type conflict: bool != string influxdb.0 2023-11-16 22:33:43.446 error HttpError: runtime error @4:12-4:151: filter: type conflict: bool != string influxdb.0 2023-11-16 22:33:11.978 warn Add javascript.0.Internet.Docsis31.US.C00.Frequency to conflicting Points (1 now) influxdb.0 2023-11-16 22:33:11.977 warn Error on writePoint("{"value":"29.775 - 64.775","time":"2023-11-16T21:33:00.590Z","from":"system.adapter.javascript.0","q":0,"ack":true}): HttpError: failure writing points to database: partial write: field type conflict: input field "value" on measurement "javascript.0.Internet.Docsis31.US.C00.Frequency" is type string, already exists as type float dropped=1 / "failure writing points to database: partial write: field type conflict: input field \"value\" on measurement \"javascript.0.Internet.Docsis31.US.C00.Frequency\" is type string, already exists as type float dropped=1"" influxdb.0 2023-11-16 22:33:11.975 warn Point could not be written to database: iobroker