NEWS
Error im admin.0 [Alias subscription error]
-
Systemdata Hardwaresystem: PI4 Arbeitsspeicher: 8GB Festplattenart: SSD Betriebssystem: Linux Node-Version: 18.18.2 Nodejs-Version: 18.18.2 NPM-Version: 9.8.1 Installationsart: - Image genutzt: - Ort/Name der Imagedatei: - Ich habe hin und wieder folgenden ERROR :
admin.0 2023-11-01 09:44:26.972 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_065.Binary_Sensor.motion, sourceObj={"type":"state","common":{"role":"indicator","read":true,"write":false,"name":"Sensor state (Motion)","type":"boolean"},"native":{"nodeId":65,"valueId":{"commandClass":48,"endpoint":0,"property":"Motion"}},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1698334268930,"_id":"zwave2.0.Node_065.Binary_Sensor.motion","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}} admin.0 2023-11-01 09:44:26.973 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_065.Multilevel_Sensor.humidity, sourceObj={"type":"state","common":{"role":"value","read":true,"write":false,"name":"Humidity","type":"number","unit":"%"},"native":{"nodeId":65,"valueId":{"commandClass":49,"endpoint":0,"property":"Humidity"}},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1698334270043,"_id":"zwave2.0.Node_065.Multilevel_Sensor.humidity","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}} admin.0 2023-11-01 09:44:26.974 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_065.Multilevel_Sensor.illuminance, sourceObj={"type":"state","common":{"role":"value","read":true,"write":false,"name":"Illuminance","type":"number","unit":"Lux"},"native":{"nodeId":65,"valueId":{"commandClass":49,"endpoint":0,"property":"Illuminance"}},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1698334269984,"_id":"zwave2.0.Node_065.Multilevel_Sensor.illuminance","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}} admin.0 2023-11-01 09:44:26.975 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_065.Multilevel_Sensor.airTemperature, sourceObj={"type":"state","common":{"role":"value","read":true,"write":false,"name":"Air temperature","type":"number","unit":"°C"},"native":{"nodeId":65,"valueId":{"commandClass":49,"endpoint":0,"property":"Air temperature"}},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1698334269209,"_id":"zwave2.0.Node_065.Multilevel_Sensor.airTemperature","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}} admin.0 2023-11-01 09:44:26.975 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_064.Binary_Sensor.motion, sourceObj={"type":"state","common":{"role":"indicator","read":true,"write":false,"name":"Sensor state (Motion)","type":"boolean"},"native":{"nodeId":64,"valueId":{"commandClass":48,"endpoint":0,"property":"Motion"}},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1697812897069,"_id":"zwave2.0.Node_064.Binary_Sensor.motion","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}} admin.0 2023-11-01 09:44:26.976 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_064.Multilevel_Sensor.humidity, sourceObj={"type":"state","common":{"role":"value","read":true,"write":false,"name":"Humidity","type":"number","unit":"%","custom":{"history.0":{"enabled":true,"aliasId":"","debounceTime":0,"blockTime":0,"changesOnly":true,"changesRelogInterval":0,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":31536000,"customRetentionDuration":365,"maxLength":960,"enableDebugLogs":false,"debounce":1000}}},"native":{"nodeId":64,"valueId":{"commandClass":49,"endpoint":0,"property":"Humidity"}},"_id":"zwave2.0.Node_064.Multilevel_Sensor.humidity","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1698827722577} admin.0 2023-11-01 09:44:26.977 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_064.Multilevel_Sensor.illuminance, sourceObj={"type":"state","common":{"role":"value","read":true,"write":false,"name":"Illuminance","type":"number","unit":"Lux","custom":{"history.0":{"enabled":true,"aliasId":"","debounceTime":0,"blockTime":0,"changesOnly":true,"changesRelogInterval":0,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":31536000,"customRetentionDuration":365,"maxLength":960,"enableDebugLogs":false,"debounce":1000}}},"native":{"nodeId":64,"valueId":{"commandClass":49,"endpoint":0,"property":"Illuminance"}},"_id":"zwave2.0.Node_064.Multilevel_Sensor.illuminance","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1698827724985} admin.0 2023-11-01 09:44:26.977 error Alias subscription error. Please check your alias definitions: sourceId=zwave2.0.Node_064.Multilevel_Sensor.airTemperature, sourceObj={"type":"state","common":{"role":"value","read":true,"write":false,"name":"Air temperature","type":"number","unit":"°C"},"native":{"nodeId":64,"valueId":{"commandClass":49,"endpoint":0,"property":"Air temperature"}},"from":"system.adapter.zwave2.0","user":"system.user.admin","ts":1697812898332,"_id":"zwave2.0.Node_064.Multilevel_Sensor.airTemperature","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}}
Die Fehlermeldungen sind erst seitdem ich meine beiden Multi 7 Sensoren von Aeotec über Zwave 2 eingebunden habe.
Die Sensoren funktionieren eigentlich so wie sie sollen.Weis wer was hier den Fehler verursacht ?
@AlCalzone evtl. ?
-
Nodejs-Version: 18.17.1
Du stehst offenbar auf dem Abstellgleis, was nodejs angeht
iob nodejs-update
ausführen, ggfs. zuvor
iob fix
-
ioBroker nodejs fixer 2023-10-13 Recommended nodejs-version is: 18.18.2 Checking your installation now. Please be patient! Your current setup is: /usr/bin/nodejs v18.17.1 /usr/bin/node v18.17.1 /usr/bin/npm 9.6.7 /usr/bin/npx 9.6.7 /usr/bin/corepack 0.18.0 We found these nodejs versions available for installation: nodejs: Installed: 18.17.1-deb-1nodesource1 Candidate: 18.17.1-deb-1nodesource1 Version table: *** 18.17.1-deb-1nodesource1 500 500 https://deb.nodesource.com/node_18.x bullseye/main arm64 Packages 100 /var/lib/dpkg/status 12.22.12~dfsg-1~deb11u4 500 500 http://deb.debian.org/debian bullseye/main arm64 Packages 500 http://security.debian.org/debian-security bullseye-security/main ar m64 Packages Nothing to do - Your installation is using the correct paths. You are running nodejs v18.17.1. Do you want to install recommended version 18.1 8.2? Press <y> to continue or any other key to quit
-
Siehste. 18.18.2 ist aktuell angesagt...
-
OK bin auf der neusten Version dann schaue ich erstmal ob der Error wieder auftritt ...
-
@flopsi
Nein, der hat damit nix zu tun. War aber dennoch falsch. -
Zu meinem eigentlichen Problem hast du keine Idee ?
-
Dann hätte ich dazu was geschrieben.
-
@flopsi Dann zeig doch mal, wie der Alias definiert ist
-
createAlias('zwave2.0.Node_065.Multilevel_Sensor.illuminance','Flur.Multisensor.Aeotec_7.Lux'); createAlias('zwave2.0.Node_065.Multilevel_Sensor.airTemperature','Flur.Multisensor.Aeotec_7.Temp'); createAlias('zwave2.0.Node_065.Binary_Sensor.motion','Flur.Multisensor.Aeotec_7.Bewegung'); createAlias('zwave2.0.Node_065.Multilevel_Sensor.humidity','Flur.Multisensor.Aeotec_7.Luftfeuchtigkeit');
createAlias('zwave2.0.Node_064.Multilevel_Sensor.illuminance','Kueche.Multisensor.Aeotec_7.Lux'); createAlias('zwave2.0.Node_064.Multilevel_Sensor.airTemperature','Kueche.Multisensor.Aeotec_7.Temp'); createAlias('zwave2.0.Node_064.Binary_Sensor.motion','Kueche.Multisensor.Aeotec_7.Bewegung'); createAlias('zwave2.0.Node_064.Multilevel_Sensor.humidity','Kueche.Multisensor.Aeotec_7.Luftfeuchtigkeit');
-
@flopsi Ich meine die Objekt-Definition vom erstellten Alias
EDIT: Du benutzt
createAlias
falsch. Gerade mal in die Doku geschaut.name
ist die ID des Alias undalias
ist die ID, auf welcher sich dieser bezieht.
Also die Parameter einmal umdrehen jeweils.
-
@haus-automatisierung sagte in Error im admin.0 [Alias subscription error]:
createAlias
Versteh nicht was ich umdrehen soll ? Kannst du mir ein Beispiel zeigen ?
Ich erstelle all meine Alias nach dem Schema nie probleme gehabt erst seit den neuen Sensoren...
Ich nutze das folgendes Skript für:
/************************************************************** Github - https://github.com/xCruziX/ioBroker-Creating-Alias/blob/master/CreateAlias.js Changelog Version 1.1.3 - use callbacks in alias-path Version 1.1.2 - fix log message 'Created Alias-Path ' Version 1.1.1 - Bugfixing, clean functions Version 1.1.0 - added function for cleaning enums Version 1.0.6 - use callback functions for safety call Version 1.0.5 - decrease timeout assing enum Version 1.0.4 - Bugfixing array id lenght Version 1.0.3 - Githublink Version 1.0.2 - existsObject for Alias in the timeout - remove lowerCase enum - improved logs Version 1.0.1 - Rooms and functions casesensitive Version 1.0 **************************************************************/ /************************************** Flags / Variablen ***************************************/ // typeAlias = 'boolean'; // oder 'number' // read = "val == 'Ein' ? true : false"; // Erkennung "Aus" --> false erfolgt automatisch // write = "val ? 'Ein' : 'Aus'"; // nameAlias = 'Licht Haustür'; // role = 'switch'; // desc = 'per Script erstellt'; // min = 0; // nur Zahlen // max = 100; // nur Zahlen // unit = '%'; // nur für Zahlen // states = {0: 'Aus', 1: 'Auto', 2: 'Ein'}; // Zahlen (Multistate) oder Logikwert (z.B. Aus/Ein) let bCreateAliasPath = false; // If this flag is true, each folder is created seperately so rooms and functions can be assigned. /* Requirements: bCreateAliasPath == true If this flag is true, existing folders in the path will be converted so rooms and functions can be assigned. */ let bConvertExistingPath = false; /********************************************************** Don't change anything from here / Ab hier nichts verändern **********************************************************/ let arEnum = []; let arId = []; let timeoutAssignEnum; function createAlias(idSrc, idDst,raum, gewerk,typeAlias, read, write, nameAlias, role, desc, min, max, unit, states) { if(!idDst.includes('alias.0.')) idDst = 'alias.0.' + idDst; if(!existsObject(idSrc)) { log('Source-Id ' + idSrc +' does not exists.','warn'); return; } // Create the object Path for alias id, // so you can assign rooms and function to the parents var createAliasPath = (id) => { if(bCreateAliasPath){ let lisMergedIds = []; let mergedId = 'alias.0'; id = id.replace(mergedId + '.', ''); // Remove prefix alias so it will not be changed let split = id.split('.'); for(let i=0;i<split.length-1;i++){ mergedId += '.' + split[i]; lisMergedIds.push(mergedId); } function path(){ if(lisMergedIds.length == 0) {// Zu Ende erstellt alias(); return; } let tmpId = lisMergedIds[0]; lisMergedIds.splice(0,1); // entferne element if(!existsObject(tmpId) || bConvertExistingPath){ // not exists let obj; if(existsObject(tmpId)) obj = getObject(tmpId); else obj = {}; if(obj.type == undefined || obj.type != 'meta') obj.type = 'meta'; if(obj.common == undefined || obj.common != {}) obj.common = {}; if(obj.common.type == undefined || obj.common.type != 'meta.folder') obj.common.type = 'meta.folder'; if(obj.common.desc == undefined || obj.common.desc != 'createAliasPath') obj.common.desc = 'createAliasPath'; if(obj.common.def == undefined || obj.common.def != false) obj.common.def = false; if(obj.native == undefined || obj.native != {}) obj.native = {}; setObject(tmpId, obj, (err) =>{ if(!err){ log('Created Alias-Path ' + tmpId); path(); } else log('Error creating alias-path','error'); }); } } path(); } else alias(); } // createAliasPath(idDst); function alias(){ // Create alias object if(!existsObject(idDst)){ let obj = {}; obj.type = 'state'; obj.common = getObject(idSrc).common; obj.common.alias = {}; obj.common.alias.id = idSrc; if(typeAlias !== undefined) obj.common.type = typeAlias; if(obj.common.read !== undefined) obj.common.alias.read = read; if(obj.common.write !== undefined) obj.common.alias.write = write; if(nameAlias !== undefined) obj.common.name = nameAlias; if(role !== undefined) obj.common.role = role; if(desc !== undefined) obj.common.desc = desc; if(min !== undefined) obj.common.min = min; if(max !== undefined) obj.common.max = max; if(unit !== undefined) obj.common.unit = unit; if(states !== undefined) obj.common.states = states; obj.native = {}; obj.common.custom = []; // Damit die Zuordnung zu iQontrol, Sql etc. nicht übernommen wird log('Created Alias-State ' + idDst); setObject(idDst, obj,(err) =>{ if(!err) startAttach(); else log('Error creating-alias','error'); }); } else startAttach(); } // Save ID and Enum (room or function) var attach = (id, enu,value) => { if(id.length == 0){ log('ID has lenght 0, can not attach to enum','warn'); return; } if(value.length == 0){ log('Value has lenght 0','warn'); return; } let sEnuId = 'enum.' + enu + '.' + value; if(enu.length > 0 && existsObject(sEnuId)) { let obj = getObject(sEnuId) let members = obj.common.members; if(!members.includes(id)){ arEnum.push(sEnuId); arId.push(id); } } else log('Can not find enum ' + sEnuId,'warn'); } function startAttach(){ let bRoom = raum !== undefined && raum.length > 0; let bGewerk = gewerk !== undefined && gewerk.length > 0; if(bRoom) attach(idDst,'rooms',raum); if(bGewerk) attach(idDst,'functions',gewerk); if(bRoom || bGewerk){ if(timeoutAssignEnum){ clearTimeout(timeoutAssignEnum); timeoutAssignEnum = null; } timeoutAssignEnum = setTimeout(finishScript,100); } } createAliasPath(idDst); } function finishScript(){ assignEnums(); } // Add the saved IDs to the rooms/functions function assignEnums(){ if(arEnum.length == 0 || arId.length == 0){ return; } if(arEnum.length != arId.length){ log('Arrays have different size','error'); return; } let mapEnumId = new Map(); for(let i=0;i < arEnum.length; i++){ let enu = arEnum[i]; let id = arId[i]; if(existsObject(id)){ let obj = getObject(enu) let members; if(!mapEnumId.has(enu)){ members = obj.common.members; mapEnumId.set(enu,members); } else members = mapEnumId.get(enu); if(!members.includes(id)){ log("Adding " + id + " to " + enu); members.push(id); } } else log('Can not find Alias ' + id,'error'); } function setMembers(members,enu,map){ let obj = getObject(enu); obj.common.members = members; setObject(enu,obj); } mapEnumId.forEach(setMembers); }
Hier noch die Objekt-Definition: ( Ich hoffe es ist die richtige das gibt es ja zu jedem Datenpunkt eine ....
{ "type": "channel", "common": { "name": "alias.0.Flur.Multisensor.Aeotec_7" }, "_id": "alias.0.Flur.Multisensor.Aeotec_7", "native": {}, "from": "system.adapter.admin.0", "user": "system.user.admin", "ts": 1698686702683, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }
-
@flopsi sagte in Error im admin.0 [Alias subscription error]:
Versteh nicht was ich umdrehen soll ?
Statt
createAlias('zwave2.0.Node_065.Multilevel_Sensor.illuminance', 'Flur.Multisensor.Aeotec_7.Lux');
muss es so aussehen:
createAlias('Flur.Multisensor.Aeotec_7.Lux', 'zwave2.0.Node_065.Multilevel_Sensor.illuminance');
dein Script lese ich mir jetzt nicht komplett durch
@flopsi sagte in Error im admin.0 [Alias subscription error]:
Hier noch die Objekt-Definition:
Ja, und da fehlt die ID, auf welcher sich der Alias beziehen soll. Daher die Fehler.
-
@flopsi sagte in Error im admin.0 [Alias subscription error]:
Ich nutze das folgendes Skript für:
Okay, ich hab es mir nun doch angeschaut und frage mich, was der Sinn von diesem Script ist. Das kann der JavaScript-Adapter doch von Haus aus?
https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md#createalias
Wenn Du eigene Funktionen definierst (und diese auch noch genauso nennst, wie Standard-Funktionen im JavaScript-Adapter), dann wäre das schon eine Info im Ausgangspost wert
-
ich habe das Skript einfach nur kopiert .....
creates Alias ......
die Alias erstellt und mich dann auf die Alias Datenpunkte bezogen.
Wie machst du das denn mit den Alias ?
-
@flopsi Manuell über den Geräte-Adapter erstellen
Aber das löst ja dein Problem nicht. Jedenfalls erstellt dein Script den Alias Datenpunkt nicht korrekt. Würde ich nicht mehr verwenden, wenn der JavsScript Adapter das direkt mitbringt.
-
Problem erscheint schon zwei Tage nicht mehr
habe folgendes geändert:
createAlias('Flur.Multisensor.Aeotec_7.Lux', 'zwave2.0.Node_065.Multilevel_Sensor.illuminance');
ich habe diesen Texteil gelöscht
.Aeotec_7
so sieht es jetzt aus:
createAlias('Flur.Multisensor.Lux', 'zwave2.0.Node_065.Multilevel_Sensor.illuminance');
jetzt kommen keine Error mehr und die fehlende ID wurde auch erstellt