Update main.js

This commit is contained in:
Administrator 2018-11-08 10:22:09 +08:00
parent 19696e733c
commit 9c0933cb8a

View File

@ -272,12 +272,15 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects)
adapter.log.warn('regs=' + JSON.stringify(regs)); adapter.log.warn('regs=' + JSON.stringify(regs));
for (let i = 0; regs.length > i; i++) { for (let i = 0; regs.length > i; i++) {
const id = adapter.namespace + '.' + regType + '.' + regs[i]._address; const id = adapter.namespace + '.' + regType + '.' + regs[i]._address + '.' + regs[i].name;
regs[i].id = id;
adapter.log.warn('id=' + id); adapter.log.warn('id=' + id);
regs[i].fullId = id; regs[i].fullId = id;
objects[id] = { objects[id] = {
_id: regs[i].id, _id: regs[i].id,
type: 'state', type: 'state',