I managed to connect ewelink and smartthings both to Alexa and then use two Alexa routines: one to turn on the light when there is motion and another to turn off the light when there hasn’t been motion for x minutes.
Unfortunately Alexa can’t do anything with the illumination part of the sensor so its kind of dumb to just turn on the lights during the day. I could schedule it based on certain times but time of sunset differs around the year.
Smartthings would be a lot better with access to the illumination information so the automation there is a lot smarter.
I managed to create a virtual device in smartthings and Alexa sees the virtual device but I can’t create a routine for when virtual device turns on then turn on real light switch. Alexa doesn’t allow me to select the virtual device in the routine.
I created that simulated Alexa switch in smartthings. It appears in Alexa and Alexa even shows it in the list of devices when creating the routine but when selecting it Alexa gives an error “This device is not currently supported”.
You must use a virtual device which is both a switch and a contact sensor. The code for one is at the FAQ link that I already gave you. You will be able to use the virtual sensor as the trigger for the Alexa routine. And you will be able to turn it on from smartthings by using the virtual switch part of it. Turning on the switch makes the sensor look like it opened.
All of this is explained in the FAQ, so just read it carefully and follow each step exactly in the order given.
The discussion of the specific error that you had is in the FAQ in the forum, but just following the process in the community – created wiki should avoid that error. Don’t skip any steps even if you think you have already done them, they have to be done in a specific order.
You can read discussion of the error in the link I already gave you:
Just chiming in to say thank you!!! I’m starting to get irritated by the number of devices that I have whose IFTTT integration is going kaput. Luckily I’ve only lost 3 without workarounds so far, but given this is now the 7th instance of devices with workarounds I’m concerned my luck is running out. Why can’t they all just get along on the same platform! (Sarcasm)
There is a new effort underway to make just that possible, at least for Wi-Fi and other IP protocol home automation. Project CHIP. Amazon, Apple, Google, Samsung, and the zigbee alliance are all involved. But it will probably be two or three years before we actually see interoperable devices.