diff --git a/main.js b/main.js index 933cc25..3413bc5 100644 --- a/main.js +++ b/main.js @@ -471,13 +471,13 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects) let regs = options[regType]; for (let i = 0; regs.length > i; i++) { - const id = adapter.namespace + '.' + regs[i].id; + const id = adapter.namespace + '.' + regName + '.' + regs[i].deviceId; adapter.log.info("id=" + id); regs[i].fullId = id; objects[id] = { - _id: regs[i].id, + _id: id, type: 'state', common: { name: regs[i].description, @@ -495,7 +495,7 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects) }; tasks.push({ - id: regs[i].deviceId, + id: id, name: 'add', obj: objects[id] });