More improvements to the WeMo Node-RED Nodes

Having got all my bulbs working again with my WeMo Link device it was time to have another play with the Node-RED WeMo nodes.

  • First up close the gap between what the doc claims the nodes do and what they actually do. This is mainly the WeMo Out node which claimed to support an input object that could set both the state and the brightness at the same time for light bulbs and groups. In actuality it only set the state. This update fixes this along with supporting setting colour and colour temperature as well if the bulb supports those capabilities.
  • The WeMo in node (event node) now includes the capability name as well as it’s code when a bulb or group changes.
  • Fixed Light groups to actually work
  • Automatically set the node name to the discovered device name to stop you having to set it via the name field in the config

The biggest change is the addition on the new WeMo Lookup node. This node queries a given device for it’s current state.

For Sockets the node sets the msg.payload to something very similar to the event node’s staus field, so 0 for off and 1 for on (and 8 for on/standby in the case of the insight socket.). For lights/light groups it outputs an object similar to the Event node, with keys for each capability the light/group has. At the moment the color field is still in X,Y values not RGB.

This makes it possible to implement flows that carry out relative changes without having to keep a permanent record of the state of the device in the context. This let’s you do fun things like this:

Powermate dimmer with Node-RED

This flow looks up the current brightness level and then increases or decreases it based on the direction the Powermate is turned and toggles the light on/off when it’s pressed.

Version 0.1.11 should have gone live on npmjs.org today.

5 thoughts on “More improvements to the WeMo Node-RED Nodes”

    1. You need to set the msg.payload to JSON object with a structure like this:

      {
        state: 1,
        dim: 125
      }

      state is on/off (1/0)

      dim values should be between 0 and 255

  1. Hi Hardillb, first off I just wanted to thank you for all your work on the wemo nodes.
    It would seem that the new lookup node would be the perfect node to look up power consumption from a wemo insight socket on a regular basis instead of just at the state change. Is this possible currently or would this be a feature you might be looking to add? I seem to only be able to get out current state of the socket from the lookup node.
    If this feature was available I could see it being very useful for energy logging and very interesting for those using EmonCMS.
    Kind regards, Mike

    1. Hi, I’m not currently using any WeMo kit and the nodes are now rolled into the node-red-nodes package of nodes. Feel free you stick in a pull request to extend them if you want and I’ll definitely have a look.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.