NorthernMan54 / homebridge-alexa

Expose your homebridge controlled devices to Amazon Alexa.
https://www.homebridge.ca
446 stars 77 forks source link

Alexa Routines Virtual Device #427

Closed Damianod27 closed 3 years ago

Damianod27 commented 3 years ago

Is it possible in upcoming updates to add support for Virtual Devices ON/OFF in routines? Alexa does not have the functionality to perform this activity only once a day when using the Motion sensor, Contact Sensor, button etc. in the routine. This can be done in HomeKit and transferred to Alexa, but a virtual device is needed for that.

The homekit can be initialized: that if Motion Sensor is detected then Virtual Decice ON. In Alexa, he sets up a routine that if Virtual Device On should do so and so. That's what I had at Smarthings before. Now I have everything in FIBARO HOME Center 2 Z-Wave + Raspberry Pi 4 and Canbee 2 Zigbee.

image

NorthernMan54 commented 3 years ago

Which plugin is creating the virtual devices ?

Damianod27 commented 3 years ago

The plug from the picture below. It's nice if you could add devices from the list you have. But it would be enough with Virtual Switch. You can then do that if Motion Sensor detected and Door Sensor Detected to Virtual Switch On. In Alexa that if Virtual Switch On will do it and this. Maybe someday it will be unnecessary but Alexa is poor in conditions now. You cannot add two conditions or trigger them in any particular way. Sorry for my English. image

NorthernMan54 commented 3 years ago

This is already supported, have you asked Alexa to discover devices ? If they don't appear, have you looked at the logs for any messages ?

Please keep in mind that only motion and contact sensors can be used to trigger a routine, and this is not a motion or contact sensor. This limitation exists on the Amazon Alexa side and not with this plugin.

Damianod27 commented 3 years ago

When I was a mile away from Huba Smartthings, I was able to add Virtuals to trigger scenes in Alexa routines. Virualne devices work in Alexa for me. They don't work in routines. As already mentioned in smarthings they worked. So I think it can be done. image

NorthernMan54 commented 3 years ago

Please keep in mind that only motion and contact sensors can be used to trigger a routine, and this is not a motion or contact sensor. This limitation exists on the Amazon Alexa side and not with this plugin.

Damianod27 commented 3 years ago

Yes, of course I know. I think that if it was possible in SmartThings, it can be here. It worked perfectly for me. However, I changed the platform. It was possible to add a virtual device to trigger scenes in routines

https://youtu.be/BqJ3cHHcNyc

https://github.com/bjpierron/SmartThings-Alexa

NorthernMan54 commented 3 years ago

You need to use a virtual motion or contact sensor, and not a switch!

Damianod27 commented 3 years ago

I had the Smarthings Hub and it worked. In Alex, a virtual device created in smarthings could be used to trigger routines. In the Smarthings hub, I had a routine set up with Motion sensor Detected to Virtual Switch on. In Alexa, I had a routine triggered with Virtual Switch. If Virtual Switch ON then do this and this. It worked perfectly for me. However, I sold smarthings hub because I have FIBARO HC2 and Raspberry Pi 4 with Canbee 2. I needed Smarthings Hub only for Zigbee devices now I have Canbee 2 Zigbee. If I had Hub SmartThings I would show it to you. I think if it could be done there, it could be done in Homebridge.

NorthernMan54 commented 3 years ago

And yes it can be done, as I use several in my setup, you just need to use a virtual motion or contact sensor, and not a switch! The plugin you are using is the wrong one. Look for a dummy contact sensor

Damianod27 commented 3 years ago

Can you recommend me something? What are you using. Does your triggering routine work in Alexa? Thank you for your time

NorthernMan54 commented 3 years ago

google 'homebridge dummy contact sensor'

Damianod27 commented 3 years ago

Thank you very much. I have already installed and configured. Everything works as I wanted. It is a pity that we did not understand each other immediately

image