This simple automation could've prevented this nightmare

Last week, we had a scary moment as our child unexpectedly climbed out of her crib. Normally, this wouldn't bother us since we're watching her and her environment is safe and reasonable for her to explore but since none of us in the house expected it, she was not only able to wander around the house but she also went outside for several minutes. And with NONE OF US KNEW! Needless to say, she is okay, but this new development urged us to expand our smart-home to allow her the freedom of mobility without compromising security. My family agreed on this following smarthome automation.

Baby Escape Detection Automation

This automation uses a motion sensor to detect motion directly in front of the crib. If the child escapes the crib and touches the ground, the motion sensor will trigger. which will set the smart bulbs in both the baby and parent's room to red and send a message to the Google Speakers in both rooms. This is a simple automation and has a lot of room to expand such as activate cameras and locking doors. This automation was designed to take advantage of existing hardware I already had in the room so the only additional thing I needed to purchase was the Aqara Motion Sensor. For quick access to the hardware I used in this automation click the links below.

[{"id":"6924f70e4770af68","type":"group","z":"e798dd74dc6d028f","name":"Baby Escape Detection","style":{"stroke":"#ff0000","label":true,"fill":"#ffbfbf","color":"#000000","label-position":"n"},"nodes":["81d13cab794759d9","782a8f38f5822bbc","2afdc5ed489534b7","2bc27662ecc64123","364638db5e6fd4a2","b09a557d350472e6","9aa2f9c289979809","1366aa6f9c15baa1","3129758485196c78","0c45d934629548b9"],"x":114,"y":459,"w":832,"h":262,"info":"## Overview\nThis automation uses motion sensors to\ntrigger a quiet alarm. This can be used for\nwhatever use case that fits the aformentioned\ndescription. \n\n## Example\nI use this to get alerted when my child escapes\nher crib. The motion sensor is placed near \nthe floor close to the crib. If the child\nsuccessfully makes it to the floor, red\nlights will turn on in both the child's \nroom as well as my room and a message \nplays on the Google nest minis."},{"id":"81d13cab794759d9","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Set Volume to Mid way","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"media_player","service":"volume_set","areaId":[],"deviceId":[],"entityId":["media_player.master_bedroom_display","media_player.office_display","media_player.rues_room_speaker"],"data":"{\"volume_level\": 0.5}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":250,"y":580,"wires":[["364638db5e6fd4a2"]]},{"id":"782a8f38f5822bbc","type":"ha-device","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Motion Sensor Detected","server":"228d3d53.df8e02","version":0,"debugenabled":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":0,"deviceType":"trigger","device":"cdbbbe6ad56ced3227a5477da3cdcc6e","event":{"type":"motion","platform":"device","device_id":"cdbbbe6ad56ced3227a5477da3cdcc6e","entity_id":"dc199451434572a54997f51b17b4fdd2","domain":"binary_sensor","metadata":{"secondary":false}},"capabilities":[],"outputProperties":[],"x":250,"y":500,"wires":[["2afdc5ed489534b7"]]},{"id":"2afdc5ed489534b7","type":"api-current-state","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Bedtime Guard is active","server":"228d3d53.df8e02","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.aulora_bedtime_guard","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":540,"wires":[["81d13cab794759d9"],[]]},{"id":"2bc27662ecc64123","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Set lights red","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.baby_lamp","light.master_bedroom_light"],"data":"{\"color_name\": \"red\", \"brightness\": 255}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":510,"y":600,"wires":[[]]},{"id":"364638db5e6fd4a2","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Save previous light state","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"scene","service":"create","areaId":[],"deviceId":[],"entityId":[],"data":"{\"scene_id\": \"lights\", \"snapshot_entities\":[\"light.master_bedroom_light\",  \"light.baby_lamp\"]}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":250,"y":620,"wires":[["2bc27662ecc64123","b09a557d350472e6","9aa2f9c289979809","1366aa6f9c15baa1","0c45d934629548b9"]]},{"id":"b09a557d350472e6","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Message parents","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"tts","service":"google_translate_say","areaId":[],"deviceId":[],"entityId":["media_player.master_bedroom_display"],"data":"{\"message\": \"Check on Aulora. She may have escaped from her bed\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":530,"y":560,"wires":[[]]},{"id":"9aa2f9c289979809","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Message Aulora","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"tts","service":"google_translate_say","areaId":[],"deviceId":[],"entityId":["media_player.rues_room_speaker"],"data":"{\"message\": \"Aulora,  Do not leave your room. When the light is red, you stay inside your room and wait for your mommy and daddy.\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":520,"y":640,"wires":[[]]},{"id":"1366aa6f9c15baa1","type":"delay","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Reset lights in 1 hour","pauseType":"delay","timeout":"1","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":540,"y":680,"wires":[["3129758485196c78"]]},{"id":"3129758485196c78","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Set lights to previous state","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.lights"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":800,"y":680,"wires":[[]]},{"id":"0c45d934629548b9","type":"api-call-service","z":"e798dd74dc6d028f","g":"6924f70e4770af68","name":"Turn off bedtime guard","server":"228d3d53.df8e02","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.aulora_bedtime_guard"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":540,"y":520,"wires":[[]]},{"id":"228d3d53.df8e02","type":"server","name":"Home Assistant","addon":true}]
Previous
Previous

ESPresence Automations

Next
Next

AI Master Class