ho provato anche così:

buttons: {

"btn1": function() {
var id = $(this).data("id");
},

ma sempre indefinito...