Virtual Devices How-To

I've been doing smart home automation for about 2 years now, entirely through wifi using Alexa and Smart Life. I bought a Hubitat on prime day after a lot of research and trying my hand at IFTTT (Which really sucks) and ST (better than IFTTT, but still some deal breakers).

So, at the moment I have no Z-Wave or Zigbee devices. I have a Ring Alarm, over a dozen wifi outlets, a dozen or so wifi wall switches, and an extensive Wyze network of Cams, Sensors, and Bulbs.

I'm trying to get this all to work on Hubitat so I can really automate and control my home, while I work on learning how to hack the wifi devices that can be hacked to run directly from HE, and start replacing the ones that can't.

So, I'm trying to control wifi devices, which currently all work through the cloud, and I am really struggling. I've spent hours watching youtube videos and digging through the community, and I'm not finding any good resource for a work flow for really controlling wifi devices. What I have so far is a ton of virtual switches, buttons, lights, and sensors, which I am trying to control from a dashboard through Alexa and IFTTT, with very little success.

Issue #1 - IFTTT Issues
I'm trying to control wifi outlets and lights using Virtual Switches and IFTTT. 3 out of 5 times I click the virtual switch on my Dashboard and it triggers on the dashboard, but IFTTT shows no activity. 1 of the other 2 times it turns the item on then the item turns right back off, even though the virtual switch is still on. The final 1 of 5 seems to work, but it literally takes 10+ seconds. It seems to be the same for Off and On, so out of 10 clicks on the Virtual switch the light will come on and back off twice and I might get it to stay on once or twice and maybe turn back off if I'm lucky.

This also has issues going the other way. If I turn the light on/off with Alexa, at least 2 out of 3 times it doesn't trigger the IFTTT aplet, especially when turning the devices on, it seems to work 4 out of 5 times when turning devices off, but not when turning them on.

I've also had the issue where I turn the device on with Alexa, the IFTTT aplet runs, then a second later the light turns off. I look at IFTTT activity and it's showing that the Virtual switch turned on, then turned off, which caused the light to turn off, even though I didn't touch the virtual switch.

Issue #2 - Can't get Alexa to change things in HE
This one is pretty specific to Ring, as IFTTT works with Wyze and SmartLife. I set up an Alexa routine to turn on a virtual contact sensor when a Ring sensor is open, and another to turn it back off when a Ring sensor is closed. The routines are active, and I even tried manually calling them, but the sensor on the dashboard remained Closed the entire time. I also tried doing the same thing with Motion, and could not get it to toggle a motion sensor.

Any help in getting these things working would be much appreciated.

To be honest, I would try and find out if those wifi devices have local api's. If they do then I wouldn't go through ifttt. Because the power of HA and also HE is local control and ifttt is dependent on your internet connection. If wifi devices have a local API you can create a driver / device handler (or find one in the community or from ST) an try to get the devices all hooked up locally. Maybe you can post a list of all your devices (brand and model)?

Ohw and btw: welcome to Hubitat! :muscle::grin:

2 Likes

I would consider replacing wifi devices with zigbee and/or z-wave devices. For sure, not the most inexpensive option, but it’ll save you the trouble of trying to get all the WiFi devices integrated. Particularly for lighting, hubitat works best with devices that are directly paired via zigbee/z-wave, or linked to a Lutron pro bridge through a telnet connection.

But since we’re all addicted to this stuff anyway, you know you want to get some new devices and install them, right? :sunglasses:

@frits Thanks, this is ultimately what I plan on doing, it's just going to take a lot of time to get everything playing nice, so trying to get ifttt working for the next couple months while I learn how to do custom drivers.

I actually bought some DIY Sonoff relays and shelly 2.5 relays to replace some of the wifi outlets, but it's still going to be a while before I have time to flash them and get them running.

@marktheknife My plan was to get Z-Wave devices to start replacing the wifi ones that don't have local APIs, but there are not a lot of options out there for US style switches, and they are almost twice as much as identical wifi versions. I looked into zigbee also, and 1) there's even fewer options than Z-Wave, 2) they operate on 2.4Ghz, so there's risk of interference from the 10 billion other 2.4Ghz devices in the area, and 3) I actually got a couple zigbee devices(a 4 button switch, and a smoke alarm), and have not been able to get them to pair.

Part of the expense is the wife wants physical switches, that will still turn most of the lights on and off even if the hub and internet both go down. So I can't really use the cheaper "add-on" "buttons" except in a few places to control scenes and things.


I need IFTTT working to get me by for a few months, after that I plan to start making everything local, but I want to get everything working properly in the meantime. Getting the wifi items to work will allow me to set up all of my automatons, so as I switch to local control all I have to do is mirror the physical device to the virtual one, or just change the virtual one to the physical one in the automation.

It should make the transition pretty smooth even if I do it small pieces at a time.

It would be really awesome if hubitat could just find a way to connect to smart life, you can control almost any wifi device through smart life. Then that would just leave the ring integration, which I'm keeping for the monitored security aspects (so at the moment I have wyze and ring sensors on the front and back door, so the wyze sensors are running the automations right now until I find a way to get ring working.

Lutron Caseta meets that requirement and works really well with hubitat. The caseta pro bridge works natively with hubitat over a telnet connection, and it’s lightning fast for automations, which is great for controlling lights with motion or contact sensors, etc.

The Lutron integration is a huge selling point of Hubitat.

So, while I appreciate the advice on where to go with hubitat in the future, so far nothing has addressed my issues with IFTTT and Alexa.

Is there anyone using IFTTT that has gotten it to work? Or is it that technically IFTTT can work with hubitat, it just works so poorly that you shouldn't even bother?

From reading other threads it seems like a lot of people are moving to hubitat from other platforms that require a lot of IFTTT integration. I can't be the only one trying to get my old cloud based wifi devices to work on hubitat through IFTTT, and I can't be the only one struggling to do so.

Do you have similar issues if you try to control the virtual switches from the device settings pages? In other words, take the hubitat dashboards and Alexa out of the equation for a moment. Does the problem persist?

I combine hubitat with both IFTTT and Alexa through the use of virtual switches, and can’t say I have run into something similar to what you are describing.

The speed and reliability of IFTTT applets can vary a lot though, depending on which service you are using, whether it’s the trigger or action, etc. Personally I have found Hubitat’s IFTTT integration to work just fine.