diff --git a/hardware/wemo/lib/wemo.js b/hardware/wemo/lib/wemo.js index a2ae24ef..a042bfd0 100644 --- a/hardware/wemo/lib/wemo.js +++ b/hardware/wemo/lib/wemo.js @@ -123,7 +123,7 @@ WeMoNG.prototype.start = function start() { request.get(location.href, function(err, res, xml) { if (!err) { xml2js.parseString(xml, function(err, json) { - if (!err && json) { + if (!err && json && json.root) { var device = { ip: location.hostname, port: location.port }; for (var key in json.root.device[0]) { device[key] = json.root.device[0][key][0]; diff --git a/hardware/wemo/package.json b/hardware/wemo/package.json index 9ba06250..70d2e368 100644 --- a/hardware/wemo/package.json +++ b/hardware/wemo/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-wemo", - "version": "0.1.11", + "version": "0.1.12", "description": "Input and Output nodes for Belkin WeMo devices", "repository": "https://github.com/node-red/node-red-nodes/tree/master/hardware", "main": "WeMoNG.js",