Virtual Switch, Alexa and Ifttt

The delay is occurring because you are having to use so many cloud to cloud interactions. I am actually surprised you only saw a 10 sec delay.

If you want this to work your best bet is going to be to replace some, or all, of your devices so that they can talk to each other on the same platform. Whether that is all xiaomi, melross or devices that will work directly with Smartthings. As long as you have to use so many different services to make your lights turn on your going to have a long delay.

Everything I have talks directly to my V1 Smartthings hub but, being that it’s cloud based, I will, on occasion, still see a 1-2 second delay from the time a motion sensor or door opens until the light comes on.

On a positive note, you learned a lot getting this project to work!

1 Like

each part of the flow is an http call of less than a kilobyte, how it would take so much time it’s nonsense, there is maybe some lag somewhere.

It’s not as easy and it’s expensive. I will still try to find a better solution. For this kind of feature a couple of seconds of delay it’s ok for me.
Now that I have a device handler in smartthings that handle shelly whenever I switch on/off in smartthing the alexa routine is fired immediately. The problem is that it doesn’t change the status in smartthing if I don’t do that by clicking on the phisical button and I have to figure out why

For this kind of device 1-2 seconds for me is unacceptable, I will give it a shot when I receive the aqara window sensor today. The other issue is how to make alexa to see the aqara temperature/humidity sensor

Yep, all of this. And here’s the link to the FAQ discussing how to create a virtual device that can be used in Alexa to trigger routines:

As I posted in the other thread, you simply need to add one of the following to the metadata in the device handler:
capability “Thermostat”
capability “Contact Sensor”
capability “Motion Sensor”

Which one you use is up to you, but be aware that this will enable commands that won’t do anything, and potentially result in confusing answers when you query Alexa about them, so choose wisely.
Once you do that, use the SmartThings app to give permission to Alexa for those devices (classic app would be Automation > SmartApps > Amazon Alexa > Device Authorization, don’t remember offhand where to do this in the new app). Once that is done have Alexa discover devices again.


At the moment the best solution I found, that reduce the lag, is this one:

Simulated switch
Webcore piston that turns that switch on or off
I got the external url of that piston and I made a webpage in a server I own that does proxy (when my page is called I call the webcore url, the reason is that the webcore url is too long for the shelly app)
I configure the shelly to call my url when the relay goes on/off
I configure an alexa routine that is triggered when the virtual switch is turned on/off

Now when I click on the button after 1/2 seconds the other lights are turned on/off
Not bad at all

I also installed the aqara door/window sensor and it works flawlessly at the moment turning on the light in less than a second.

I also found out that now Shelly has an integration in the Samsung Smartthings app. I tried it (after deleting all my custom shelly devices) but it doesn’t work for me