From c48facef4de528515308bc5f5eebd81ee707b4c8 Mon Sep 17 00:00:00 2001 From: Nico Hartung Date: Mon, 2 Apr 2018 07:29:48 +0200 Subject: [PATCH] Other result from vacuums with newer firmware #130 --- lib/devices/vacuum.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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'); } }