mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Added more error checking in the discovery section (#214)
* Replacing the original wemo node with the wemo-ng node * Added install instructions * Fix name of wemo out node * Fix some jshint errors More jshint fixes fix jshint last jshint fix Fix last jshint error * Adds proper url length detection * fix up the extra line added in the merge * Fix some jshint errors More jshint fixes fix jshint last jshint fix Fix last jshint error load of tiny listing fixes, undef, unused, etc fix slight wrinkle in new Wemo node Fix wemo package name for npm. Add contribution.md to node-red-nodes to make it more obvious. correct spelling in readme.md revert .jshintrc Added subtree and walker nodes. (#200) Thanks @mikakaraila - very useful. slight edits to snmp to pass jslint-ing Bump underlying serial port nam version correct BBB callback response to check exists To Fix #198 * Adds proper url length detection fix up the extra line added in the merge * Added some more error checking in discovery * Adds proper url length detection* fix up the extra line added in the merge * Adds proper url length detection * fix up the extra line added in the merge Add line output mode for Daemon node to address #202 Email rework (#195) * Rework of Node-RED email nodes tidy up email listing - no code changes add latest email node dips and update email node libs - bump version update package version for nodes tests add a few tests geohash, smooth, base64, msgpack correct path of source file Thanks @Ltrlg Fix typo in node-red-node-smooth (#205) node-red-node-physical-web: Added msg.advertising = true/false to enable/disable advertising (#204) * Added msg.advertising = true/false to enable/disable advertising * Fixed comparison with bool Don't use get_compass as it breaks get_orientation add envelope to email node options as part of node-red#875 Physical-web: Added status (found, updated and lost) as msg.topic (#206) Added msg.advertising = true/false to enable/disable advertising Added status (lost, updated, found) as msg.topic, if not already set Added checkbox to allow duplicates or not. * Re-added optional topic to avoid breaking compatibility * Cleaner topic slection add a v0.3 serial port to help with node5/6 let PI try to enable sensorTag access on install Add cc and bcc options to email node to close #209 updates to email node to better handle different mail types. Still not great - but does the basics… To close Better email node parsing (again) Fix indent fixed formating * Fix heading in README.md Fix node name in README.md
This commit is contained in:
parent
49692b3255
commit
46cc9bb906
@ -1,4 +1,4 @@
|
|||||||
# node-red-contrib-nodes-wemo
|
# node-red-node-wemo
|
||||||
|
|
||||||
A set of Node-RED nodes for working with Belkin WeMo devices.
|
A set of Node-RED nodes for working with Belkin WeMo devices.
|
||||||
|
|
||||||
|
@ -79,7 +79,9 @@ WeMoNG.prototype.start = function start() {
|
|||||||
var location = url.parse(headers.LOCATION);
|
var location = url.parse(headers.LOCATION);
|
||||||
var port = location.port;
|
var port = location.port;
|
||||||
request.get(location.href, function(err, res, xml) {
|
request.get(location.href, function(err, res, xml) {
|
||||||
|
if (!err) {
|
||||||
xml2js.parseString(xml, function(err, json) {
|
xml2js.parseString(xml, function(err, json) {
|
||||||
|
if (!err) {
|
||||||
var device = { ip: location.hostname, port: location.port };
|
var device = { ip: location.hostname, port: location.port };
|
||||||
for (var key in json.root.device[0]) {
|
for (var key in json.root.device[0]) {
|
||||||
device[key] = json.root.device[0][key][0];
|
device[key] = json.root.device[0][key][0];
|
||||||
@ -191,7 +193,15 @@ WeMoNG.prototype.start = function start() {
|
|||||||
//other stuff
|
//other stuff
|
||||||
//console.log( device.ip + ' -' + device.deviceType);
|
//console.log( device.ip + ' -' + device.deviceType);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
console.error("failed to parse respose from " + location.href);
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
console.error("Failed to GET info from " + location.href);
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
_wemo._client.search(urn);
|
_wemo._client.search(urn);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-wemo",
|
"name": "node-red-node-wemo",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"description": "Input and Output nodes for Belkin WeMo devices",
|
"description": "Input and Output nodes for Belkin WeMo devices",
|
||||||
"repository": "https://github.com/node-red/node-red-nodes/tree/master/hardware",
|
"repository": "https://github.com/node-red/node-red-nodes/tree/master/hardware",
|
||||||
"main": "WeMoNG.js",
|
"main": "WeMoNG.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user