diff --git a/lib/devices/vacuum.js b/lib/devices/vacuum.js index d116bee..350ac8f 100644 --- a/lib/devices/vacuum.js +++ b/lib/devices/vacuum.js @@ -9,7 +9,10 @@ const MiioApi = require('../device'); const BatteryLevel = require('./capabilities/battery-level'); function checkResult(r) { - if(r !== 0) { + //console.log(r) + // {"result":0,"id":17} = Firmware 3.3.9_003095 (Gen1) + // {"result":["ok"],"id":11} = Firmware 3.3.9_003194 (Gen1), 3.3.9_001168 (Gen2) + if( r !== 0 && r[0] !== 'ok' ) { throw new Error('Could not complete call to device'); } }