I just got my HE a couple of days ago. I have a couple of these WiFi controlled plugs (VeSync - Etekcity WiFi Outlet US/CA) that I've been using with Alexa for a while. I'm having trouble finding Hubitat drivers for them. Could one of you veterans point me in the right direction?
Don’t recall seeing anything for those. May have to set them up as virtual outlets in HE, and then use Alexa routines to keep in sync.
Are there instructions somewhere that cover how to do that, that are newbie friendly?
Not sure how friendly, but I'll give it a shot for you...
Go to Apps and add the Alexa Echo Skill if you have already
Go to Drivers Code
and create a new user driver using this code:
metadata {
definition (name: "Virtual contact with Switch", namespace: "cw", author: "cwwilson08") {
capability "Sensor"
capability "Contact Sensor"
capability "Switch"
}
}
def on() {
sendEvent(name: "contact", value: "closed")
sendEvent(name: "switch", value: "on")
}
def off() {
sendEvent(name: "contact", value: "open")
sendEvent(name: "switch", value: "off")
}
def installed() {
}
Then go to Devices and create a new virtual device using the driver you just created.
Go back to Apps, and click on the Amazon Echo Skill, and click on Select Devices; add your virtual switch, click update, and done.
Open the Alexa app, and go to routines, create 2 routines:
- When virtual switch turns on, turn on the wifi outlet
- When virtual switch turns off, turn off the wifi outlet
Repeat as required.
Thanks! I'll give it a shot.
EDIT LATER: Hey! That actually worked. Thanks SO Much!
EDITTED AGAIN EVEN LATER: For those who come later and read this, if you have problems getting the Virtual Switch recognized by Alexa (Like I did), disable the Hubitat skill in the Alexa App and then re-enable it. You'll have to log into you Hubitat account again, but the Virtual Switch will go through and you'll be able to access it in the Alexa App.
I'm trying to do this but Switches are not listed as option for trigger in Alexa routines. Is this a new change?
I have tried several virtual switches and the errors on the attached pic are consistent. I have tried rebooting Hubitat, deleting and reinstalling the echo skill and getting the same results. Though not related, I had no problem installing and setting up "echo speak". This would seem to indicate that my token has been refreshed with Amazon. Your solution for the Etekcity Wi-Fi outlets was just what I was looking for. Do you have any insight to solve this problem?
If I’m reading that error correctly I’d say that the Amazon Echo Skill app is not properly authenticated, i.e. not properly connected to your Amazon account. Do you also have the Hubitat Skill installed in Alexa? If not you’ll need to add it, if you do already have it open it up, go to settings and make sure your account is linked. If it is showing linked, you may want to disable the skill, and then re-enable it - this will prompt you to login again.
Hubitat | Alexa |
---|---|
Alexa Echo Skill app | Hubitat Skill |
I did not want to do that, but your logic made sense. It worked. The following is what I am getting, but I don't believe it is a big deal, just an annoyance.
sys:12022-01-29 08:39:24.913 pm Received cloud request for App 68 that does not exist, path: /device/34 from 3.235.172.169
sys:12022-01-29 08:29:37.961 pm Received cloud request for App 68 that does not exist, path: /device/34 from 52.90.108.130
sys:12022-01-29 08:29:11.615 pm Received cloud request for App 68 that does not exist, path: /device/34 from 54.198.99.188
sys:12022-01-29 08:29:11.308 pm Received cloud request for App 68 that does not exist, path: /device/33 from 54.198.99.188
sys:12022-01-29 08:17:19.133 pm Received cloud request for App 68 that does not exist, path: /device/34 from 3.238.200.110
sys:12022-01-29 08:17:19.057 pm Received cloud request for App 68 that does not exist, path: /device/33 from 54.198.99.188
That message is saying that the skill in Alexa is looking for the app that you deleted earlier. May need to disable the Alexa Hubitat skill, then remove the Alexa Echo Skill app, re-add the Alexa Echo Skill app, and then enable the Alexa Hubitat Skill.
I will take your advice. I am just looking to run this without any errors and make a good backup. The virtual switch works, albeit with to hits on the switch. Tomorrow is another day and I will give you my results. I thank you so much for your help.
It worked and no errors. Again, I thank you.