| | |
| | | var mcu = this.toDec(fields[64]) + this.toDec(fields[65]) / 100; |
| | | |
| | | var _config = global.configs[mac]; |
| | | |
| | | console.log("----------------------1") |
| | | console.log(_config) |
| | | |
| | | if(_config == null) { |
| | | _config = config.ALARM_DEFAULTS; |
| | | _config.mac = mac; |
| | | configs[mac] = _config; |
| | | global.configs[mac] = _config; |
| | | } |
| | | |
| | | console.log("----------------------2") |
| | | console.log(_config) |
| | | |
| | | var current = moment(); |
| | | |
| | |
| | | var userID = doc.userID; |
| | | db.collection("users").find({"_id": userID}).limit(1).next(function(err, user){ |
| | | if(user) { |
| | | config[notice] = { |
| | | config["notice"] = { |
| | | tel: user.username, |
| | | email: user.email, |
| | | open_id: user.open_id |