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 today.

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

  1. Thanks for the great work !
    I am having trouble setting the brightness, could you post an example ?

    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

  2. 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.

  3. Hello, I know it’s been a long time since you did this amazing work. I was using openhab to control my wemo but the bindings are so unreliable that I switch to nodered. I had made my own http request to be able to control light, dimmer and I’m stuck on switch socket that return error 501 when trying the set and get binary state. Thus, I stumble on your nodered node, thinking dam, I did all that work for nothing!

    So I installed the node but there’s something I don’t see anywhere in the doc, how to configure the wemo-dev config node. Is there an how to somewhere cause I really don’t understand how this node work.

    Thank you!

    1. There is nothing to configure, the node runs discovery in the background and will present the list of devices it has found when you click on the pencil icon in the node. From here you pick the device name and that’s it

      1. ah, that’s the problem then. My openhab binding stop working because the upnp discovery doesn’t work anymore on the server, I don’t even know why. Thus for me, in the dev node, there’s no device listed. I’ve yet to find the problem on my gentoo installation on to why it’s like that 🙁

        Thanks for the input!

  4. You wouldn’t know what a return code of 501 means? I got everything working except my socket switch which return this code whatever I try to do, even just get.

    Thank you!

Leave a Reply

Your email address will not be published.

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