Send reboot msg after message retrieval to deal with sensors going to sleep

minimal adjustment to the dallas temperature sensor as an example
added scripts to drop the database and to set a reboot manually for
debugging purposes
This commit is contained in:
ToSa27
2014-07-26 11:28:57 +02:00
parent cc5a9fe9a8
commit 5968ddf219
5 changed files with 1129 additions and 1009 deletions
+17
View File
@@ -0,0 +1,17 @@
const dbAddress = '127.0.0.1';
const dbPort = 27017;
const dbName = 'MySensorsDb';
var dbc = require('mongodb').MongoClient;
dbc.connect('mongodb://' + dbAddress + ':' + dbPort + '/' + dbName, function(err, db) {
if (err) {
console.log('Error connecting to database at mongodb://' + dbAddress + ':' + dbPort + '/' + dbName);
} else {
db.dropDatabase(function(err, result) {
if (err)
console.log('Error dropping database at mongodb://' + dbAddress + ':' + dbPort + '/' + dbName);
else
console.log('Successfully dropped database at mongodb://' + dbAddress + ':' + dbPort + '/' + dbName);
});
}
});