Creating a virtual device for WiFi Devices

I’m wanting to create a virtual device where I can use my WiFi Light strips or bulb as a switch. How would I go about doing that?

Go to Devices, select Add Virtual Device, at top. Input Name, then select Virtual Switch as type, save device.
That's it...

Talk about this a bit more .. what exactly would you like to do? Are you trying to control the light strips or bulbs, or are you using their state to control something else? I think of a virtual switch as a tool to control the status of something (e.g. Disable Sprinklers) or to communicate between two otherwise incompatible systems (e.g. "open" a virtual contact in HE to fool Alexa into executing a routine).

1 Like

So I really want to control either the light strips or bulb that’s what I want to do cause they are WiFi lights

A virtual switch doesn't control anything on its own. You still need to think about what will integrate with those lights. For example, if Alexa can control these lights but Hubitat doesn't have any integration for them, then you could create a virtual contact that you control from the Hubitat side. Then through the Amazon Echo Skill app, send the state of that contact to Alexa, where a routine sees the virtual contact "open", and turns on the light.

You might want to make sure that someone hasn't written some sort of integration to handle these lights in Hubitat. That would be your preferred route probably.

2 Likes

what about if I'm just trying to get them to turn on at a certain time? Like i have them setup in my kids room and i use them as a night light for them how would I do that or what virtual device would i create for it?

Brand or model of these bulbs?

We don't have nearly enough information to answer that, as first we need to know if or how we can get those bulbs controllable by Hubitat.

But generally speaking, you would use something like Simple Automation app and see if that fits your needs. There also might be community based apps that could do what you want, again need to know more about your lights. And finally the advanced option, which is the toughest to learn, would be to use Rule Machine.

1 Like

How are you controlling the bulbs now? Are they in HE? Are they in a smart assistant?

Def need more info to help out on this

2 Likes

well the lights are connected by wifi but i use amazon as the assistant.

Then you can get Hubitat to control the lights indirectly as I described in the comment above.

That assumes you’ve searched the community here to see if someone has done a more direct integration, and come up empty.

well the lights are connected by wifi but i use amazon as the assistant.

If that's the case then create a virtual switch in HE, send that to Alexa. Then create a routine in Alexa to turn on the WIFi light when the virtual switch gets activated (don't forget to create a reverse so HE will reflect the appropriate status if the light is controlled manually)

Not quite. You can't trigger an Alexa routine with a virtual switch. You have to use a virtual contact (or motion sensor, I suppose).

I use Virtual Contact Sensor with Switch by @stephack to have a device that treat as either a contact or switch.

1 Like

You still didn't answer the question of what brand or model number these are. Stating multiple times that they are wifi doesn't help, there are thousands of wifi devices. You are getting varied and vague answers because of this.

2 Likes

true, i forgot about that. i tested using a virtual switch to trigger a routine a while back and remember it didn't work. i had to create a virtual switch and a virtual motion sensor, then when i turned on the virtual switch it would activate the virtual motion sensor. then in alexa i would trigger a routine based on that virtual motion sensor