-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When I want to issue a serie of reads to several devices, the callback gives no way of telling which device is delivering result.
What to do?
var Client = require("owfs").Client;
var con = new Client('localhost');
var dev = [
{'id':'/10.243EE400080086/temperature', 'topic':'/lolland/stuen'},
{'id':'/10.8E6521010800E3/temperature', 'topic':'/lolland/vaerksted'},
{'id':'/10.FD622101080073/temperature', 'topic':'/lolland/orangeri'},
{'id':'/10.AFCE3503080058/temperature', 'topic':'/lolland/depot'},
]
for (i in dev) {
con.read(dev[i].id, function(err, result) {
console.log(dev[i].id,dev[i].topic, result); // this will not work!
});
}
Metadata
Metadata
Assignees
Labels
No labels