@Skorpionbird looks like a breaking change in onoff.js module…
latest fs has started enforcing callback on async operations.
onoff write needs to be fixed like read
Gpio.prototype.read = function (callback) {
fs.read(this.valueFd, this.readBuffer, 0, 1, 0, function (err, bytes, buf) {
if (typeof callback === 'function') {
if (err) {
return callback(err);
}
callback(null, buf[0] === ONE[0] ? 1 : 0);
}
});
};
current write
Gpio.prototype.write = function (value, callback) {
var writeBuffer = value === 1 ? ONE : ZERO;
fs.write(this.valueFd, writeBuffer, 0, writeBuffer.length, 0, callback);
};
try editing MagicMirror/node_modules/onoff/onoff.js
and changing the Gpio.prototype.write (line 200)
to this
Gpio.prototype.write = function (value, callback) {
var writeBuffer = value === 1 ? ONE : ZERO;
fs.write(this.valueFd, writeBuffer, 0, writeBuffer.length, 0, function (err, bytes, buf) {
if (typeof callback === 'function') {
if (err) {
return callback(err);
}
callback(null, bytes, buf);
}
});
};
I have submitted issue 150 to the onoff module on github