Able to ask who is home?

Hi!

I want to be able to ask any voice assistent “who´s home?”. Is it possible to do that with Alexa or Google assistent? We live 5 people in the same (kinda large) house. I have all family members registrated in Network monitor. So I can manually check this in the UI. But it would be sweet to just have to ask as I walk through the front door. Anyone have it figured out?
Take care!
/Fanan

Should be hard. Create a Reactor that uses TTS to read present members and then get that triggered by a virtual switch in Alexa.

You might find it simpler to read all of the house members with a home / away status but pretty sure it should work

C

1 Like

I’ll be honest, I don’t think it’ll work. I got fed up when Alexa could no longer accurately tell me if doors were locked. If you can’t get an accurate answer about something as important as a lock, don’t expect it to work with anything else reliably.

I thought it was an Alexa issue. I moved a lock to another hub (competitor) and it works 100%. Until the Vera to Ezlo transformation is complete, the Google and Alexa skills will be old tech, first generation skills.

Now, if you don’t mind housing a voice assistant on a local device like a 24/7 PC or Pi, you’ll have some options that should be reliable.

1 Like

Yes as @Catman said, create a virtual switch for each user (let’s call this ‘Home Switch’) and use reactor to turn the switch on when said user is home and off when they’re not.

You will need a few things to make this work: Reactor, Alexa TTS Plugin, Switchboard plugin

To begin create a virtual switch, this one will trigger the TTS command. Connect this switch to Alexa (let’s call this switch the ‘TTS trigger’) and create a routine with it and name it “who is home” and have it turn the virtual switch on.

Back in reactor create an ‘AND’ group and name it ‘Who’s home’ add a condition if ‘TTS trigger’ is on in one subgroup, and in another ‘OR’ Subgroup create the conditions if either of the ‘home switch’ are on. This way when the Alexa routine runs and someone is home (one of the ‘home switch’ is on) the condition will go true.

Now you’re going to want to set a few expressions. This part I’m not 100% sure on but I’ve given a try so it should work. In the reactor sensor head over to the expression tab and click create new expression. Name this variable VSwtich and copy paste this into the next box over list(687,692,453) replace those numbers with the device IDs of those Virtual switches you made to signify what user is home.

Then create a another variable and name this one VSwtich_On and copy paste this into the box next to it status_lights = iterate( lights, if( getstate( _, "urn:schemas-upnp-org:device:BinaryLight:1", "Status") == "1", _, null ) ) . This will get the devices that are turned on (meaning that person is home).

Once again create another new variable and name this VSwtich_name and copy paste this iterate( lights, getattribute( _, "name" ) ) This will get the name of the Virtual switchs that are on so make sure each virtual switch is named using the name of each person.

Lastly create a another variable name this message and copy paste this " join( VSwitch_name, ", " ) + " are home" This will create the text string that Alexa will read out. Note that if one person is home it will still read as ‘… are home’ which isn’t grammatically correct ;).

In your activity section for the conditions above create an activity when the ‘Who’s Home’ group goes true set a device action for the Alexa TTS plugin and set the ‘text’ variable to {message}. Then add an another device action to turn the ‘TTS Trigger’ virtual switch off. I can help you set up a command so that if no one is home Alexa will say that too but give these steps a try first and see if it works.

3 Likes

Cool answer. Not the way I’d have done it but that probably means you’re right and my way wouldn’t work :smiley:

FWIW I’d have one switch, one reactor. Read the variables of in or out into the reactor and then either create statement that reads all house members with status or create a phrase for each possible state. I suspect that means your way is way more efficient

C

I was thinking of something similar but I found that making the expressions do the hard work would be easier! I use a similar setup to even ask Alexa what alarm zones are open, works very well.

1 Like

Thanks! I´ll give it a try when a have a spare moment…!

How do you make the assumption somebody is home ? You use “ping” to their phones or something? This will not work reliably many times…

More accurate would be to interrogate the wireless AP/controller if the phone is still registered, and even like that these days with power-saving is not always accurate in this case.

From the moment you put phones down or close the lid they even disconnect from the Wifi often…ping will not respond anymore …

iPhone locator…

C

See your point - but my teenagers and wife are phone-oholics, so their phones have never been in power saving mode. Maybe night time…
That said, maybe I got bigger issues to deal with than home automation… :rofl:

1 Like

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules