1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/wemo/README.md

112 lines
3.8 KiB
Markdown
Raw Normal View History

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
2016-06-24 12:06:59 +02:00
# node-red-node-wemo
A set of Node-RED nodes for working with Belkin WeMo devices.
These nodes use the uPnP discovery so may not discover your devices if you have a firewall enabled
Install
-------
2016-03-02 14:25:52 +01:00
Run the following command in your Node-RED user directory - typically `~/.node-red`
npm install node-red-node-wemo
## Output node
The output node switches a socket, a light or group of lights on or off
2019-07-02 21:17:43 +02:00
This should be backward compatible with the pervious version of this node but will benefit
from opening the config dialog and selecting the node you want.
2019-07-02 21:17:43 +02:00
The node accepts the following `msg.payload` as input
* A single value
2019-07-02 21:17:43 +02:00
* String : `on`/`off`
* Integer : `1`/`0`
* Boolean : `true`/`false`
* A JSON Object as below (lights only and color control is still work in the progress)
```
{
state: 1,
dim: 255,
color: '255,255,255',
temperature: 25000
}
```
2019-07-02 21:17:43 +02:00
**Note**: Currently any invalid value is treated as an `off` command.
## Input Node
The new input node is now based on uPnP notifications instead of polling. This means messages
2019-07-02 21:17:43 +02:00
will only be set when an actual change occurs in on the device. This means the node will not
send regular no-change messages.
The output varies depending on the type of device but examples for sockets look like this:
```
{
"raw": "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n<e:property>\n<BinaryState>1</BinaryState>\n</e:property>\n</e:propertyset>\n\n\r",
"state": "1",
"sid": "uuid:e2c4586c-1dd1-11b2-8f61-b535035ae35d",
"type": "socket",
2019-07-02 21:17:43 +02:00
"name": "Bedroom Switch",
"id": "221448K1100085"
}
```
2019-07-02 21:17:43 +02:00
And a lightbulb can look like this:
```
{
2019-07-02 21:17:43 +02:00
"raw": "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n<e:property>\n<StatusChange>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;StateEvent&gt;&lt;DeviceID\navailable=&quot;YES&quot;&gt;94103EA2B27803ED&lt;/DeviceID&gt;&lt;CapabilityId&gt;10006&lt;/CapabilityId&gt;&lt;Value&gt;1&lt;/Value&gt;&lt;/StateEvent&gt;\n</StatusChange>\n</e:property>\n</e:propertyset>\n\n\r",
"id": "94103EA2B27803ED",
"capability": "10006",
"value": "1",
"sid": "uuid:e2e5739e-1dd1-11b2-943d-c238ce2bad17",
"type": "light",
"name": "Bedroom"
}
```
An Insight socket output can look like this:
```
{
2019-07-02 21:17:43 +02:00
"raw": "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n<e:property>\n<BinaryState>8|1454271649|301|834|56717|1209600|8|1010|638602|12104165</BinaryState>\n</e:property>\n</e:propertyset>\n\n\r",
"state": "8",
"onSince": 1611179325,
"onFor": 2545,
"onToday": 17432,
"onTotal": 47939,
"averagePower": 13,
"power": 3.205,
"energyToday": 3596536,
"energyTotal": 9966151
2019-07-02 21:17:43 +02:00
"sid": "uuid:ea808ecc-1dd1-11b2-9579-8e5c117d479e",
"type": "socket",
"name": "WeMo Insight",
"id": "221450K1200F5C"
}
```
Some information about those power parameters:
+ `state`: Whether the device is currently ON or OFF (1 or 0).
+ `onSince`: The date and time when the device was last turned on or off (as a Unix timestamp).
+ `onFor`: How long the device was last ON for (seconds).
+ `onToday`: How long the device has been ON today (seconds).
+ `onTotal`: How long the device has been ON total (seconds).
+ `timespan`: Timespan over which onTotal is relevant (seconds). Typically 2 weeks except when first started up.
+ `averagePower`: Average power consumption (Watts).
+ `power`: Current power consumption (Watts).
+ `energyToday`: Energy used today (Watt-hours, or Wh).
+ `energyTotal`: Energy used in total (Wh).
+ `standbyLimit`: Minimum energy usage to register the insight as switched on ( milliwats, default 8000mW, configurable via WeMo App).
## Lookup Node
This node queries the current state of a device, when an input message is injected. The output is very similar to that of the Input node.