Welcome home message system

Hi. Probably someone has already done this, alright I couldn’t find it (at least not in node red), so I hope someone can help me. I have the following presence detection system which sets a specific person to Home/Just Arrived/Just Left/Away/Extended Away according the state. Now I want to include a welcome home message. So, if person 1 or person 2, person 3 or person 4 arrive home, they get a welcome home message with there name. But if multiple persons arrive home, each person should be greeted. If it’s possible, I’d like to also have specifics on what time a person arrived at home, and what time a person left. All of course in node red. You can find the node red of my presence detection here

Why not add a call service to announce where the “set xxxx just arrived” node is?

Ok, and what will happen if 2 persons come home then? I think only the last person will be announced. And even if that’s not the case, it’s better to have an announcement saying “welcome home person x and y” then one that says “welcome home person x”, “welcome home person y”

Delay the message with a wait until.
And you want until the other person is home and have a timeout of 20 seconds.
If it times out then only one came home, if it passes then both came home.

1 Like

Ok, I’ll try that, thanks

Almost all of my HA alerts have a tts component. Many times multiple fire at once and the messages just play back to back. I don’t use any wait/delay nodes to delay messages.

But in this case it’s not wanted to play them after each other, as I understand it the message should be change do “both” is home instead of “one” then “one”.

They want to add timestamps for time away, so would they would need to be separated. That could be achieved using an input boolean for the person away.

Then using the time since last changed attribute data.timeSinceChangedMs to get the time away. That time is in ms and can use the date time formatter to change it to hours minutes and second

1 Like

It’s true that we need to be announced both at the same time if we come home both at the same time. But I also like the idea of the time difference, I’ll look into that. Thanks

But generally the phones do not arrive home at the same time, that is why I suggested a 20 wait until.
I have the exact system implemented here and I use a wait until node to wait for the other person, else just greet one.

2 Likes

That’s is indeed the case :thinking: