Update main.js

master
钟进 6 years ago
parent bcebdfe797
commit d585b3cf5c

@ -316,6 +316,33 @@ function checkObjects(options, regType, regName, regFullName, tasks, newObjects)
adapter.log.info("id=" + id);
regs[i].fullId = id;
objects[id] = {
_id: regs[i].deviceId,
type: 'state',
common: {
name: regs[i].description,
role: regs[i].role,
type: 'string',
read: true,
write: true,
def: ""
},
native: {
regType: regType,
address: regs[i].address,
ip: regs[i].ip
}
};
tasks.push({
id: regs[i].deviceId,
name: 'add',
obj: objects[id]
});
newObjects.push(id);
}
}

Loading…
Cancel
Save