I came up with a fairly simple way of getting the Echo 4th generation ultrasound motion detector into HA using Nabu Casa. I thought others may be interested in to use this technique:
Create a template switch for each Echo device you want a motion sensor for. I tried this with virtual switches but it didn’t seem to work correctly (the routine didn’t seem to turn on/off the switch), so I just used a template that calls an empty script (create this empty script too, obviously), like this:
Create a binary sensor for each echo device (not strictly required, but looks neater than leaving the raw switch and prevents anyone from turning our virtual motion sensor on and off):
Either use the binary sensor directly for motion sensor automations, or create a per-room group of all of your real and virtual echo motion switches in each room. I do the latter as I combine the echo motion sensors with real motion sensor so any of the echos and/or the real motion sensor trigger the motion sensor group. Using groups also has the advantage of not breaking the interface if the sensor is unavailable (as it sometimes is for my Shelly motion sensors) and you can also click on the group to see which motion sensors have triggered the group motion event.
Use the motion group as a trigger for your motion automations.
Seems to work ok so far. I need to try it for a while and see how long Alexa keeps these virtual sensors on for before turning them off - if it doesn’t work reliably, I will instead create a script to turn off the motion sensor switch after x minutes of turning on (instead of the Alexa routine turning it off).
It works, but it’s not very reliable… I have two pairs of echo dots in each of the living room and bedroom… sometimes only one of them triggers and quite often they take a long time to turn off. Sometimes they trigger falsely (I think from motion outside the window). I use a node red rule to provide for different treatment for the true motion sensor versus the echo one. Not ideal but better than nothing.
thanks. really nice solution.
Do you know how much time do you have to wait until the detector change to nobody in the room?
I have seen that there is a lapse configuration in Alexa app, but I don’t know which time lapse would be best
Thanks NickC and JayReturns for sharing your solutions.
I implemented Jay’s and it worked right away.
Now I gotta learn Echo’s quirks for motion detection, lol
Hi. I just setup these, including the routines in the Alexa app. When I manually trigger them from the app, the sensors properly update in HA. However, I can’t get the sensors to trigger on 2 different Echo Dot Gen4s via Motion. I even setup a separate routine on one of them where Motion turns on a light. The “Show activity” option in the app also indicates the routine has not been executed.
I have enabled ultrasonic motion detection on both devices in the Alexa app.
Any advice on getting the motion activity to be recognized on the device?
Thanks,
Neil
I’m in the same boat here. I followed the template steps listed above and while all of the entities appear the Echo’s themselves never seem to fire any events that HA can see. Maybe Amazon turned something off to save costs?
HI, does this still work? I’m using @JayReturns method above for the YAML code, which appears to work manually but nothing appears to be triggered from the Gen4 Echo dot.
I am new to home assistant and alexa app. But I think the template is somehow always returning false.
In the configuration.yaml, I need to use {{ states('switch.kitchen_echo_ultrasound_motion') == 'on' }} instead for checking the sensor. Then I do the normal “expose entity” to alexa and add the device there and create the routine when echo detect motion then turn on/off that switch exposed.
Finally create the automation in the home-assistant for that switch to trigger on/off the light
First off, thanks to everyone who has figured this out and shared it before - very much appreciated.
I am struggling to get the first part done, i.e. creating the switch and having that exposed. My config in the configuration file is as below:
# to get echo motion to HA
switch:
- platform: template
switches:
bedroom_dot_ultrasound_motion:
friendly_name: "Bedroom Echo Ultrasound Motion"
turn_on:
service: script.turn_on
data:
entity_id: script.null
turn_off:
service: script.turn_on
data:
entity_id: script.null
The script exists, but I cannot for the life of me figure out why it will not create and expose the switch, currently running on Home Assistant 2023.10.3 and have restarted a number of times, but not seeing any errors on the logs, nor am I seeing the switch in the entities list of the server. Anyone have any ideas on what I am doing wrong?
I managed to get around this by simply ignoring the template switches and using a boolean helper exposed to Alexa, that I could then turn on based on the motion detection using a routine. For the record this works on the 5th gen echo.
To try and get around some of the other issues raised by others on this thread, I’ve also done the following:
on the Alexa routine set the trigger for motion detection to be reset every minute.
on the HA automation, switch off the input_boolean that is triggered by the routine.
Is there a way to set up home assistant to change what the “Tap Detection” does on the echo when you press it? I want a way to turn off my alarm by slapping my echo but currently that only snoozes the alarm. Thanks
@WaffleMaster22 This kind of question deserves its own thread if there isn’t one already.
Have you tried looking at the Echo entities in Developer Tools and seeing what changes when you press the snooze button?