Update main.js

master
hl 6 years ago
parent 767bc314e5
commit f7096744c2

@ -77,8 +77,34 @@ function processMessages() {
});
}
function createObject() {
//adapter.setObject('config.0.voltage.50002', json, function (err) {
// if (err) log('Cannot write object: ' + err);
//});
adapter.setObject('config.0.voltage.50002', {
custom: {
min: 320,
max: 400,
interval: 5,
count: 2
},
common: {
name: "50002",
role: "",
type: "array",
desc: "pushover创建",
read: true,
write: true
}
}, function () {
adapter.log.info('Save ' + userdataDir + 'pushover.json');
});
}
function main() {
// Adapter is started only if some one writes into "system.adapter.pushover.X.messagebox" new value
createObject();
processMessages();
stop();
}

Loading…
Cancel
Save