Virtual Switches

Since release 0.51.13 you can add Virtual Switches to your NEEO, but what are these good for?

Well, the possibilities with these are almost endless. You can use them to implement a party switch in your house, you can use them to tell NEEO who is home, you can use them to quickly enable or disable automation and much much more. You can even use them to group lights from different brands/rooms and control them all with a single switch.

 

Basic setup

The basic setup is quickly done. In the NEEO App when adding a device, search for "virtual" and add a "NEEO Virtual Switch". Give it a name which makes sense for your use case.

After setting up the switch you then have to create recipes which are triggered based on the virtual switch state. Check out the examples below for a detailed explanation.

 

Example - Party Mode

Some friends dropping by for a surprise visit and you are totally not ready for that? No problem, hit a single switch on you NEEO and your complete home immediately feels like you have been expecting them.

After adding a virtual switch and calling it "Party" you can go ahead and setup the recipes to make it functional. The first recipe which is triggered when the party-switch is activated includes all the commands you need to get your party started. For example:

  • Turn on the colored Hue lights
  • Turn off the bright standard lights
  • Turn on some LED stripes
  • Start the music on Sonos
  • Turn on the Pinball machine
  • Unlock the door
  • Turn the coffee machine on
  • Send a message to your family to let them know you are having a party

You can then also add a recipe which is triggered if the party switch is powered off to bring your home back in a normal state.

 

Example - Automation Toggle

When doing automation based on motions sensors, it sometimes is handy to be able to disable the logic without having to actually delete the rule itself.

After adding a virtual switch, you can use it in recipe conditions. A typical recipe would then have the conditions "If motion sensor is on" AND "The light level is below..." AND "The virtual switch is on". This way the recipe is then only triggered when the virtual switch is set to ON.

 

Example - Light Grouping

By using a virtual switch you can come up with group of lights. Especially when you have different light brands which you can't group together with the original app this is something you can only do with NEEO.

So let's say you have some Hue and some LIFX lights in your living room. You can now add a virtual switch called "Living Room Lights". After adding the switch, you can then create two recipes, on which is triggered when the virtual switch is on and another one which is triggered if the virtual switch is off. In the on-recipe you ad all the commands for the lights which should turn on and in the off-recipe you add all the power off commands.

Voila, a single switch controlling multiple lights from different brands.

 

I am looking forward to your feedback on this. I am convinced you can come up with much more crazy use cases compared to our examples. This thread is for sharing these.

Feel free to post any questions you have.

Reply
45replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Just tried to add a virtual switch but I guess am missing something. So I added it and added two receipes acting on the power state of that virtual switch. But the switch does not show up in the list of devices of the room.

    What am I missing?

    Reply Like
  • Just started this and then realized I should change rooms.   Maybe I should delete and start over instead.  See error:

    Reply Like
  • Patrick  I do not understand how to use virtual switches. I have added one and also crested a recipe, but where do I find the switch no om my remote?? it's not listed in the room...

    Reply Like
  • Patrick Raphael but MQTT use with this switches is planned or already possible??

    Reply Like
  • Is there a way to toggle a Virtual Switch via a recipe?

    I would like to have an On / Off recipe that performs different tasks for turning my setup on or off.

    Reply Like 1
  • Oh, by the way:

    The "IF-Statement" in a recipe is very nice. But it is only half useful without an "ELSE-Statement".

    Reply Like 3
  • Would it not have been better to just allow launch and power off options for a custom recipe linked to no device?

    I dont really want to start a random recipe to get to shortcuts to then start my "Party"?

    or am i missing something?

    Reply Like
    • Jim Trout with the switch you can add the switch as a shortcut to one of your light/device pages.

      what you want is also possible. Just add a dummy device and you’ll have a start and stop recipe.

      Reply Like 1
  • Thanks Niels, just spotted the dummy's myself looking at one of your vids. cant believe i have had so many on\off recipies!

    bit of  a tidy up later i think :)

    Reply Like
    • Jim Trout great! Do you have any specific usecases for them?! I’m interested as I would like to make more simple how to’s. But as I have no use for these solutions myself it’s dific to show something that would makes sense.

      Reply Like
  • Few examples but kind of like whats mentioned above with the virtual and just to save me extra clicks\make it easier for the family. 

    Lights -  Mixture of lights turning them all on off from rooms screen as i dont use the sliders really.

    Game Mode - Commands to turn game mode on/off on TV. TV often left in game mode when moving between Plex\xbox\stb etc.. - however i think this is one for the new Virtual Switch

    Sonos Resume - each room just hit play on Sonos to resume what was last played. I often listen to radio so dont need to see\use controls and the good thing with sonos is it sees its started so easy to then turn off.

     

    Edited to add one more which may be the reason it was actually built -  An accessory device do not give you a recipe to edit. So create a Dummy one and add commands.

    Reply Like
  • Hello folks,

     

    I'd like to create a virtual switch for my hue lights. The light recipes are already there and I want to use the possibility to make use of them as a shortcut in my other recipes. I added a virtual switch to my devices, no problem so far. What I don't understand is how to connect the recipes to the switch states. How can a configure an "and" condition? Sorry, I don't get it.

    Reply Like
  • Has anyone come up with a use for virtual switches yet?  I'm a bit confused as to their purpose. The original example of a 'party mode' could be achieved with a recipe turning on all those devices couldn't it?

    Like I have a 'goodnight' recipe which turns off my tv and sonos, turns on the lights in the stairs & upstairs hallway, waits 15 seconds and turns off the lounge light, waits another 5 seconds and turns off the dining room lights.

    I'm not saying these switches are a bad feature - I just don't understand them.

    Reply Like 1
    • Brian Chambers I guess one benefit is that you can describe a recipe that is being triggered when a Virtual Switch changes its state. Thus you can describe this recipe once and then incorporate it into other recipes, simply by changing the Virtual Switch state in the new recipe. So less repetitive work.

      What would be an essential function for me is to have a "Toggle Virtual Switch" command. That way I could put a recipe toggling the virtual switch on my home screen. So I would have one On/Off button toggling the virtual switch and behind the scenes there would be two different recipes, one for switching my media system on, one for switching it off (they are slightly different).

      That being said, I proposed a radical re-design of the NEEO UI that would pretty much allow you to do anything you want. But I guess I shouldn't hold my breath, because it is challenging the status quo. :-/

      Reply Like
  • Hi Patrick. Please can you explain how to do this with clear and simple step by step instructions. Honestly, I work in IT but even I'm completely baffled. I set up the switches but don't get how to link them to recipes. 

    I understand this is Neeo's version of macros but it needs to be explained in a way non-Neeo engineer or non-developer people can understand.

    In the meantime I will keep tinkering until I work it out.

    Thank you

    Reply Like 2
  • Niels made a good video which he put in the comments of the full upgrade thread. Helped me out. 

    https://youtu.be/Kp77SEXgsO8

    Reply Like 1
  • To me those Virtual Switches would only really become useful, If I had a toggle-command, so that I can just press one single button to toggle it ON and OFF, while behind the scenes I can run different recipes depending on whether the Virtual Switch is turning ON or OFF.

    Reply Like 1
  • Jakob Winter you can do exactly that, create the virtual switch, create custom recipes that react to the state of your switch, then on the shortcut page of your main recipe add a shortcut, look for the virtual switch and add the toggle command

    Patrick though these new switches go a long way in achieving much richer shortcuts, I would still think it simpler in many cases if we could simply have a shortcut to a recipe directly. I imagine that doesn’t sit well with the way the NEEO database works but it would be a much simpler UX.

    The ability to move devices between rooms was also an important one for Z-wave devices. In other words, with these two things I was able to get very close to my perfect light recipe. On the app that is. The remote is still crippled by flaky debouncing and somehow adds a lot of wasted space between widgets, forcing my virtual switches on a second page ... any update on the debouncing issue?

    Niels de Klerk I played with the dummy audio device in the past (to circumvent we cannot pick icons for devices / recipes) and it caused all kinds of strange behaviour (don’t remember the details but documented it in another thread many moons ago). I however duplicate MANY real devices. As many do, I duplicate my source devices to have multiple recipes. I also duplicate my sink device for EVERY recipe that uses it so I can have multiple recipes in the active now area. Basically this is to circumvent the fact NEEO refuses to treat smart devices like smart devices and imposes an assumption mode on then nobody wanted. Something I still find slightly stupefying after the whole “we don’t have an assumption mode because you shouldn’t have stupid devices” mantra.

    Reply Like
    • Geert Van Der Linden if I want to control it via a shortcut, your suggested solution works. But Usually I am on the Recipe-layer of the UI when I want to switch my system ON.
      Hence the need for a toggle-command (ON/OFF). Should be pretty trivial for the NEEO team to program too.

      I've thought quite a bit about the NEEO UI in the past. I put all my thoughts on a suggestion for a re-design in this post. That would make everything way easier to understand and much more flexible to use. Sadly, non of the NEEO team have responded to it yet.

      Reply Like
    • Jakob Winter had a look at your other post (to better understand what you meant with a toggle on the recipe layer). I too would love many more customisations. Your suggestions however far exceed my current expectation level. I don’t see that happening. Redesigning the UI is one thing, redesigning the underlying data structure is another. The second influences or limits the first, and once choices have been made is far more difficult to change than the UI. I bet that is also why we have virtual switches rather than shortcuts to recipes.

      So, toggle on the recipe layer, not possible but you can have two custom recipes (one for ON, the other for Off, I had those for lights before we had virtual switches and still have those for a physical power switch). But as you describe in the longer post a smart remote should just allow choosing a recipe and automatically turn the system on. NEEO does that. Hence, no need for the ON part. I still have a custom OFF recipe to turn all my devices off (individually, not using the power switch). Would like to give that a power icon but functionally its ok (except of course for the incomprehensible assumption mode for smart devices).

      Reply Like
    • Geert Van Der Linden actually, I don't need a toggle on the recipe layer. All I need is a toggle function for the virtual switch. Right now we have ON and OFF. What I would need is ON/OFF in one single command.
      Then I could simply create one recipe with this one ON/OFF command in it.

      Reply Like
    • Jakob Winter you can have a toggle as a shortcut, it still uses two recipes though. What do you exactly want to achieve? Sounds like you want to overcome the lack of an else clause in the routine but I am not sure.

      Reply Like
  • Patrick this is how my light recipe now looks like, using two virtual switches. One master on / off switch and the other to put all dimmers to their max value. One could add more virtual switches for additional moods / scenes. Very happy with this. However, a couple issues remain:

    1) for some reason on the app the title of the screen shows the name of the first device, in this case “table”. On the remote this shows “light”.

    2) if I use the widget instead of the slider the three buttons on the bottom go to a second screen on the remote, on the app they stay on the same screen, as you would expect as the widget should use the same height on screen as the slider

    3) on both app and remote it shows “multilevelswitch 1” under every slider, which is pretty pointless

    4) if I put the widget instead of the slider the app still shows “multilevelswitch 1” but the remote shows “toggle 2” which is confusing and still pointless

    5) debouncing is still better on the app, though it seems to have improved with the last firmware update

    6) the “activating recipe” and “leaving recipe” circle routines needlessly delay proceedings, nothing is actually being activated, we just want to see the controls asap

    7) it would be great to have the possibility to put the light recipe on the home screen, I currently have it in a room called “lights” but thanks to the virtual switches all custom recipes are now neatly inside the light recipe, meaning I have a room with just one recipe. Adding an extra click, open room, open recipe, where just open recipe would be cleaner. I imagine many other users would like their most used recipes on the home screen and use rooms to group the other recipes.

    Most of these comments are pretty minor but the devil is in the detail and these changes would turn a good UX into a great UX.

    Reply Like 2
  • The concept of these virtual switches is still confusing me. I understand these can be used as shortcut within a recipe. What I am trying to achieve though is a recipe button acting as a toggle switch. E.g. I got one Hue light and within a room I want to have one recipe button that toggles this Hue Light on and off.

    Can this be done, can a recipe button act like a toggle (on/off) switch? And if yes, would someone be willing to explain how to achieve this?
     

    Reply Like
    • BuzzLightyear I think the answer is no, it can’t be done. You can have a toggle, or use two buttons.

      Reply Like
      • BuzzLightyear
      • To infinity and beyond...
      • BuzzLightyear
      • 1 mth ago
      • Reported - view
      Geert Van Der Linden said:
      You can have a toggle

       The answer seems to be no but then you mention “You can have a toggle”; you mean as a short cut only?

      Reply Like
    • BuzzLightyear shortcuts always refer to commands of devices. A virtual switch is just another device in the NEEO logic. It has three commands. A switch / toggle, an ON button and an OFF button. I added the switch in my screenshot. So, you can use that switch or use two buttons.

      Reply Like 1
      • BuzzLightyear
      • To infinity and beyond...
      • BuzzLightyear
      • 1 mth ago
      • Reported - view

      Geert Van Der Linden thanks, it is more clear now. Unfortunately though it can only be used as shortcut, I will need to look into an alternative scenario

      Reply Like
    • BuzzLightyear yes, shortcuts only. The use of those switches lies in the fact you can couple them with recipes. So a shortcut can trigger a recipe. That was not possible before.

      Reply Like
      • BuzzLightyear
      • To infinity and beyond...
      • BuzzLightyear
      • 1 mth ago
      • Reported - view

      Geert Van Der Linden appreciate your feedback! Is there a trick to turn a recipe button into a toggle switch?

      Reply Like
    • BuzzLightyear nope. Custom recipes are still the same. The difference is you can now use those recipes from a shortcut within another recipe

      Reply Like
  • This is so frustrating. Surely from a technical point of view it is trivial to have a toggle command for a virtual switch (If it s ON, turn it OFF. If its OFF, turn it ON).

    Please, NEEO, implement this feature!

    Reply Like 1
    • Jakob Winter +1

      I tried to use the switches but couldn’t get it right. My idea was to have two switches, one for ON / OFF and another for MIN / MAX. But the UI / UX was never consistent. If I manually change to a state between MIN or MAX, what should the switch show? What if it still shows MIN and I wanted to go back to the MIN state? Also, if I use the MIN / MAX switch I want my ON / OFF switch to show ON, but triggering the state of that switch triggered its recipes. Come to think of it, I want an ELSE statement more then a toggle button 😉

      Reply Like
reply to topic
Like6 Follow