Update main.js

This commit is contained in:
Administrator 2018-11-08 09:59:46 +08:00
parent 688bb999cc
commit a3996b7295

20
main.js
View File

@ -268,8 +268,14 @@ function checkDeviceIds(options, config, deviceIds) {
function checkObjects(options, regType, regName, regFullName, tasks, newObjects) {
let regs = options[regType];
adapter.log.warn('regs=' + regs);
for (let i = 0; regs.length > i; i++) {
const id = adapter.namespace + '.' + regs[i].id;
adapter.log.warn('id=' + id);
regs[i].fullId = id;
objects[id] = {
_id: regs[i].id,
@ -452,19 +458,11 @@ function parseConfig(callback) {
adapter.log.warn('adapter.config=' + adapter.config);
let options = prepareConfig(adapter.config);
const params = adapter.config.params;
adapter.log.warn('options=' + options);
adapter.log.warn('params=' + params);
const localOptions = {
multiDeviceId: options.config.multiDeviceId,
showAliases: (params.showAliases === true || params.showAliases === 'true'),
doNotRoundAddressToWord: (params.doNotRoundAddressToWord === true || params.doNotRoundAddressToWord === 'true'),
directAddresses: (params.directAddresses === true || params.directAddresses === 'true'),
maxBlock: options.config.maxBlock,
maxBoolBlock: options.config.maxBoolBlock
};
adapter.getForeignObjects(adapter.namespace + '.*', (err, list) => {
let oldObjects = list;
@ -474,8 +472,6 @@ function parseConfig(callback) {
let tasks = [];
adapter.log.warn('options.devices=' + options.devices);
// device.yz.config = adapter.config.yz.filter(e => e.deviceId === deviceId);